ECMsgStorePublic.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 ECMSGSTOREPUBLIC_H
  18. #define ECMSGSTOREPUBLIC_H
  19. #include <kopano/zcdefs.h>
  20. #include <mapidefs.h>
  21. #include <mapispi.h>
  22. #include <edkmdb.h>
  23. #include "ECMsgStore.h"
  24. #include "ClientUtil.h"
  25. #include <kopano/ECMemTable.h>
  26. class ECMsgStorePublic _kc_final : public ECMsgStore {
  27. protected:
  28. ECMsgStorePublic(char *lpszProfname, LPMAPISUP lpSupport, WSTransport *lpTransport, BOOL fModify, ULONG ulProfileFlags, BOOL fIsSpooler, BOOL bOfflineStore);
  29. ~ECMsgStorePublic(void);
  30. public:
  31. static HRESULT GetPropHandler(ULONG ulPropTag, void* lpProvider, ULONG ulFlags, LPSPropValue lpsPropValue, void *lpParam, void *lpBase);
  32. static HRESULT SetPropHandler(ULONG ulPropTag, void *lpProvider, const SPropValue *lpsPropValue, void *lpParam);
  33. static HRESULT Create(char *lpszProfname, LPMAPISUP lpSupport, WSTransport *lpTransport, BOOL fModify, ULONG ulProfileFlags, BOOL fIsSpooler, BOOL bOfflineStore, ECMsgStore **lppECMsgStore);
  34. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  35. virtual HRESULT OpenEntry(ULONG cbEntryID, LPENTRYID lpEntryID, LPCIID lpInterface, ULONG ulFlags, ULONG *lpulObjType, LPUNKNOWN *lppUnk);
  36. virtual HRESULT SetEntryId(ULONG cbEntryId, LPENTRYID lpEntryId);
  37. HRESULT InitEntryIDs();
  38. HRESULT GetPublicEntryId(enumPublicEntryID ePublicEntryID, void *lpBase, ULONG *lpcbEntryID, LPENTRYID *lppEntryID);
  39. HRESULT ComparePublicEntryId(enumPublicEntryID ePublicEntryID, ULONG cbEntryID, LPENTRYID lpEntryID, ULONG *lpulResult);
  40. ECMemTable *GetIPMSubTree();
  41. // Folder with the favorites links
  42. HRESULT GetDefaultShortcutFolder(IMAPIFolder** lppFolder);
  43. virtual HRESULT Advise(ULONG cbEntryID, LPENTRYID lpEntryID, ULONG ulEventMask, LPMAPIADVISESINK lpAdviseSink, ULONG *lpulConnection);
  44. protected:
  45. ENTRYID *m_lpIPMSubTreeID = nullptr, *m_lpIPMFavoritesID = nullptr;
  46. ENTRYID *m_lpIPMPublicFoldersID = nullptr;
  47. ULONG m_cIPMSubTreeID = 0, m_cIPMFavoritesID = 0;
  48. ULONG m_cIPMPublicFoldersID = 0;
  49. ECMemTable *m_lpIPMSubTree = nullptr; // Build-in IPM subtree
  50. IMsgStore *m_lpDefaultMsgStore = nullptr;
  51. HRESULT BuildIPMSubTree();
  52. // entryid : level
  53. };
  54. #endif // #ifndef ECMSGSTOREPUBLIC_H