mapiAttachment.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright 2005 - 2016 Zarafa and its licensors
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Affero General Public License, version 3,
  6. * as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Affero General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Affero General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. *
  16. */
  17. // -*- Mode: C++; -*-
  18. #ifndef MAPIATTACHMENT_H
  19. #define MAPIATTACHMENT_H
  20. #include <kopano/zcdefs.h>
  21. #include <vmime/defaultAttachment.hpp>
  22. #include <string>
  23. namespace KC {
  24. class mapiAttachment _kc_final : public vmime::defaultAttachment {
  25. public:
  26. mapiAttachment(vmime::shared_ptr<const vmime::contentHandler> data,
  27. const vmime::encoding& enc,
  28. const vmime::mediaType& type,
  29. const std::string& contentid,
  30. const vmime::word filename,
  31. const vmime::text& desc = vmime::NULL_TEXT,
  32. const vmime::word& name = vmime::NULL_WORD);
  33. void addCharset(vmime::charset ch);
  34. private:
  35. vmime::word m_filename;
  36. std::string m_contentid;
  37. bool m_hasCharset;
  38. vmime::charset m_charset;
  39. void generatePart(vmime::shared_ptr<vmime::bodyPart> part) const;
  40. };
  41. } /* namespace */
  42. #endif