ECMemTablePublic.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 ECMEMTABLEPUBLIC_H
  18. #define ECMEMTABLEPUBLIC_H
  19. #include <kopano/zcdefs.h>
  20. #include <kopano/ECMemTable.h>
  21. #include "ECMAPIFolderPublic.h"
  22. #include <mapidefs.h>
  23. class ECMemTablePublic _kc_final : public ECMemTable {
  24. public:
  25. struct t_sRelation {
  26. unsigned int ulRowID;
  27. IMAPIFolder* lpFolder;
  28. LPMAPIADVISESINK lpAdviseSink;
  29. ULONG ulAdviseConnectionId;
  30. ULONG cbEntryID; // Folder entryid
  31. LPENTRYID lpEntryID;
  32. };
  33. typedef std::map<std::string, t_sRelation> ECMAPFolderRelation; // <instancekey, relation>
  34. protected:
  35. ECMemTablePublic(ECMAPIFolderPublic *lpECParentFolder, const SPropTagArray *lpsPropTags, ULONG ulRowPropTag);
  36. virtual ~ECMemTablePublic(void);
  37. public:
  38. static HRESULT Create(ECMAPIFolderPublic *lpECParentFolder, ECMemTablePublic **lppECMemTable);
  39. static void FreeRelation(t_sRelation* lpRelation);
  40. HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  41. //virtual ULONG AddRef(void) _kc_override;
  42. //virtual ULONG Release(void) _kc_override;
  43. HRESULT Init(ULONG ulFlags);
  44. HRESULT ModifyRow(SBinary* lpInstanceKey, LPSRow lpsRow);
  45. HRESULT DelRow(SBinary* lpInstanceKey);
  46. HRESULT AdviseFolder(ULONG cbSourceKey, LPBYTE lpbSourceKey, LPMAPIFOLDER lpFolder);
  47. ECMAPIFolderPublic *m_lpECParentFolder;
  48. IMAPIAdviseSink *m_lpShortCutAdviseSink = nullptr;
  49. ULONG m_ulFlags = 0; //UNICODE flags
  50. IMAPITable *m_lpShortcutTable = nullptr;
  51. ULONG m_ulRowId = 1;
  52. ECMAPFolderRelation m_mapRelation; //Relation between shortcut instancekey and rowid
  53. };
  54. #endif //#ifndef ECMEMTABLEPUBLIC_H