ECABContainer.h 3.4 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 ECABCONTAINER_H
  18. #define ECABCONTAINER_H
  19. #include <kopano/zcdefs.h>
  20. #include <kopano/Util.h>
  21. #include "IECExportAddressbookChanges.h"
  22. #include "IECImportAddressbookChanges.h"
  23. #include "ECABLogon.h"
  24. #include "ECABProp.h"
  25. class ECABContainer : public ECABProp {
  26. protected:
  27. ECABContainer(void* lpProvider, ULONG ulObjType, BOOL fModify, const char *szClassName);
  28. virtual ~ECABContainer();
  29. public:
  30. static HRESULT Create(void* lpProvider, ULONG ulObjType, BOOL fModify, ECABContainer **lppABContainer);
  31. static HRESULT DefaultABContainerGetProp(ULONG ulPropTag, void* lpProvider, ULONG ulFLags, LPSPropValue lpsPropValue, void *lpParam, void *lpBase);
  32. static HRESULT TableRowGetProp(void* lpProvider, struct propVal *lpsPropValSrc, LPSPropValue lpsPropValDst, void **lpBase, ULONG ulType);
  33. // IUnknown
  34. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  35. // IABContainer
  36. virtual HRESULT CreateEntry(ULONG cbEntryID, LPENTRYID lpEntryID, ULONG ulCreateFlags, LPMAPIPROP* lppMAPIPropEntry);
  37. virtual HRESULT CopyEntries(LPENTRYLIST lpEntries, ULONG ulUIParam, LPMAPIPROGRESS lpProgress, ULONG ulFlags);
  38. virtual HRESULT DeleteEntries(LPENTRYLIST lpEntries, ULONG ulFlags);
  39. virtual HRESULT ResolveNames(const SPropTagArray *lpPropTagArray, ULONG ulFlags, LPADRLIST lpAdrList, LPFlagList lpFlagList);
  40. // From IMAPIContainer
  41. virtual HRESULT GetContentsTable(ULONG ulFlags, LPMAPITABLE *lppTable);
  42. virtual HRESULT GetHierarchyTable(ULONG ulFlags, LPMAPITABLE *lppTable);
  43. virtual HRESULT OpenEntry(ULONG cbEntryID, LPENTRYID lpEntryID, LPCIID lpInterface, ULONG ulFlags, ULONG *lpulObjType, LPUNKNOWN *lppUnk);
  44. virtual HRESULT SetSearchCriteria(LPSRestriction lpRestriction, LPENTRYLIST lpContainerList, ULONG ulSearchFlags);
  45. virtual HRESULT GetSearchCriteria(ULONG ulFlags, LPSRestriction *lppRestriction, LPENTRYLIST *lppContainerList, ULONG *lpulSearchState);
  46. // From IMAPIProp
  47. virtual HRESULT OpenProperty(ULONG ulPropTag, LPCIID lpiid, ULONG ulInterfaceOptions, ULONG ulFlags, LPUNKNOWN *lppUnk);
  48. virtual HRESULT CopyTo(ULONG ciidExclude, LPCIID rgiidExclude, const SPropTagArray *lpExcludeProps, ULONG ulUIParam, LPMAPIPROGRESS lpProgress, LPCIID lpInterface, LPVOID lpDestObj, ULONG ulFlags, LPSPropProblemArray *lppProblems);
  49. virtual HRESULT CopyProps(const SPropTagArray *lpIncludeProps, ULONG ulUIParam, LPMAPIPROGRESS lpProgress, LPCIID lpInterface, LPVOID lpDestObj, ULONG ulFlags, LPSPropProblemArray *lppProblems);
  50. class xABContainer _kc_final : public IABContainer {
  51. #include <kopano/xclsfrag/IUnknown.hpp>
  52. #include <kopano/xclsfrag/IABContainer.hpp>
  53. #include <kopano/xclsfrag/IMAPIContainer.hpp>
  54. #include <kopano/xclsfrag/IMAPIProp.hpp>
  55. } m_xABContainer;
  56. private:
  57. IECImportAddressbookChanges *m_lpImporter = nullptr;
  58. ALLOC_WRAP_FRIEND;
  59. };
  60. #endif