ECExchangeModifyTable.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 EC_EXCHANGE_MODIFY_TABLE_H
  18. #define EC_EXCHANGE_MODIFY_TABLE_H
  19. #include <kopano/zcdefs.h>
  20. #include <kopano/ECUnknown.h>
  21. #include <kopano/ECMemTable.h>
  22. #include <mapidefs.h>
  23. #include <edkmdb.h>
  24. #include "IECExchangeModifyTable.h"
  25. class ECExchangeModifyTable _kc_final : public ECUnknown {
  26. public:
  27. ECExchangeModifyTable(ULONG ulUniqueTag, ECMemTable *table, ECMAPIProp *lpParent, ULONG ulStartRuleId, ULONG ulFlags);
  28. virtual ~ECExchangeModifyTable();
  29. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  30. virtual HRESULT __stdcall GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError);
  31. virtual HRESULT __stdcall GetTable(ULONG ulFlags, LPMAPITABLE *lppTable);
  32. virtual HRESULT __stdcall ModifyTable(ULONG ulFlags, LPROWLIST lpMods);
  33. virtual HRESULT __stdcall DisablePushToServer();
  34. /* static creates */
  35. static HRESULT __stdcall CreateRulesTable(ECMAPIProp *lpParent, ULONG ulFlags, LPEXCHANGEMODIFYTABLE *lppObj);
  36. static HRESULT __stdcall CreateACLTable(ECMAPIProp *lpParent, ULONG ulFlags, LPEXCHANGEMODIFYTABLE *lppObj);
  37. class xExchangeModifyTable _kc_final : public IExchangeModifyTable {
  38. #include <kopano/xclsfrag/IUnknown.hpp>
  39. #include <kopano/xclsfrag/IExchangeModifyTable.hpp>
  40. } m_xExchangeModifyTable;
  41. class xECExchangeModifyTable _kc_final :
  42. public IECExchangeModifyTable {
  43. #include <kopano/xclsfrag/IUnknown.hpp>
  44. #include <kopano/xclsfrag/IExchangeModifyTable.hpp>
  45. // <kopano/xclsfrag/IECExchangeModifyTable.hpp>
  46. virtual HRESULT __stdcall DisablePushToServer(void) _kc_override;
  47. } m_xECExchangeModifyTable;
  48. private:
  49. static HRESULT HrSerializeTable(ECMemTable *lpTable, char **lppSerialized);
  50. static HRESULT HrDeserializeTable(char *lpSerialized, ECMemTable *lpTable, ULONG *ulRuleId);
  51. static HRESULT OpenACLS(ECMAPIProp *lpecMapiProp, ULONG ulFlags, ECMemTable *lpTable, ULONG *lpulUniqueID);
  52. static HRESULT SaveACLS(ECMAPIProp *lpecMapiProp, ECMemTable *lpTable);
  53. ULONG m_ulUniqueId;
  54. ULONG m_ulUniqueTag;
  55. ULONG m_ulFlags;
  56. ECMAPIProp *m_lpParent;
  57. ECMemTable *m_ecTable;
  58. bool m_bPushToServer = true;
  59. };
  60. class ECExchangeRuleAction _kc_final : public ECUnknown {
  61. public:
  62. HRESULT __stdcall ActionCount(ULONG *lpcActions);
  63. HRESULT __stdcall GetAction(ULONG ulActionNumber, LARGE_INTEGER *lpruleid, LPACTION *lppAction);
  64. class xExchangeRuleAction _kc_final : public IExchangeRuleAction {
  65. #include <kopano/xclsfrag/IUnknown.hpp>
  66. // <kopano/xclsfrag/IExchangeRuleAction.hpp>
  67. virtual HRESULT __stdcall ActionCount(ULONG *lpcActions) _kc_override;
  68. virtual HRESULT __stdcall GetAction(ULONG ulActionNumber, LARGE_INTEGER *lpruleid, LPACTION *lppAction) _kc_override;
  69. } m_xExchangeRuleAction;
  70. };
  71. #endif