ECAttach.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #ifndef ECATTACH_H
  18. #define ECATTACH_H
  19. #include <kopano/zcdefs.h>
  20. #include <mapidefs.h>
  21. #include <kopano/Util.h>
  22. #include "ECMessage.h"
  23. #include "ECMAPIProp.h"
  24. #include "Mem.h"
  25. class ECMsgStore;
  26. class ECAttach : public ECMAPIProp {
  27. protected:
  28. ECAttach(ECMsgStore *lpMsgStore, ULONG ulObjType, BOOL fModify, ULONG ulAttachNum, ECMAPIProp *lpRoot);
  29. virtual ~ECAttach(void) _kc_impdtor;
  30. public:
  31. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  32. static HRESULT Create(ECMsgStore *lpMsgStore, ULONG ulObjType, BOOL fModify, ULONG ulAttachNum, ECMAPIProp *lpRoot, ECAttach **lppAttach);
  33. // Override for SaveChanges
  34. virtual HRESULT SaveChanges(ULONG ulFlags);
  35. // Override for OpenProperty
  36. virtual HRESULT OpenProperty(ULONG ulPropTag, LPCIID lpiid, ULONG ulInterfaceOptions, ULONG ulFlags, LPUNKNOWN *lppUnk);
  37. static HRESULT GetPropHandler(ULONG ulPropTag, void* lpProvider, ULONG ulFlags, LPSPropValue lpsPropValue, void *lpParam, void *lpBase);
  38. static HRESULT SetPropHandler(ULONG ulPropTag, void *lpProvider, const SPropValue *lpsPropValue, void *lpParam);
  39. // Override for CopyTo
  40. virtual HRESULT CopyTo(ULONG ciidExclude, LPCIID rgiidExclude, const SPropTagArray *lpExcludeProps, ULONG ulUIParam, LPMAPIPROGRESS lpProgress, LPCIID lpInterface, LPVOID lpDestObj, ULONG ulFlags, LPSPropProblemArray *lppProblems);
  41. // Override for HrSetRealProp - should reset instance ID when changed
  42. virtual HRESULT HrSetRealProp(const SPropValue *lpsPropValue);
  43. virtual HRESULT HrSaveChild(ULONG ulFlags, MAPIOBJECT *lpsMapiObject);
  44. class xAttach _kc_final : public IAttach {
  45. #include <kopano/xclsfrag/IUnknown.hpp>
  46. #include <kopano/xclsfrag/IMAPIProp.hpp>
  47. } m_xAttach;
  48. private:
  49. ULONG ulAttachNum;
  50. ALLOC_WRAP_FRIEND;
  51. };
  52. class ECAttachFactory _kc_final : public IAttachFactory {
  53. public:
  54. HRESULT Create(ECMsgStore *lpMsgStore, ULONG ulObjType, BOOL fModify, ULONG ulAttachNum, ECMAPIProp *lpRoot, ECAttach **lppAttach) const;
  55. };
  56. #endif // ECATTACH_H