PublishFreeBusy.h 1.9 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 _PublishFreeBusy_H_
  18. #define _PublishFreeBusy_H_
  19. #include <kopano/zcdefs.h>
  20. #include <mapix.h>
  21. #include <mapidefs.h>
  22. #include <ctime>
  23. #include "freebusy.h"
  24. #include <kopano/CommonUtil.h>
  25. namespace KC {
  26. class ECLogger;
  27. struct TSARRAY {
  28. ULONG ulType;
  29. time_t tsTime;
  30. ULONG ulStatus;
  31. };
  32. extern _kc_export HRESULT HrPublishDefaultCalendar(IMAPISession *, IMsgStore *, time_t start, ULONG months);
  33. class PublishFreeBusy _kc_final {
  34. public:
  35. PublishFreeBusy(IMAPISession *, IMsgStore *defstore, time_t start, ULONG months);
  36. HRESULT HrInit();
  37. HRESULT HrGetResctItems(IMAPITable **lppTable);
  38. HRESULT HrProcessTable(IMAPITable *lpTable , FBBlock_1 **lppfbBlocks, ULONG *lpcValues);
  39. HRESULT HrMergeBlocks(FBBlock_1 **lppfbBlocks,ULONG *cValues);
  40. HRESULT HrPublishFBblocks(FBBlock_1 *lpfbBlocks ,ULONG cValues);
  41. private:
  42. IMAPISession *m_lpSession;
  43. IMsgStore *m_lpDefStore;
  44. FILETIME m_ftStart;
  45. FILETIME m_ftEnd;
  46. time_t m_tsStart;
  47. time_t m_tsEnd;
  48. PROPMAP_DECL()
  49. PROPMAP_DEF_NAMED_ID (APPT_STARTWHOLE)
  50. PROPMAP_DEF_NAMED_ID (APPT_ENDWHOLE)
  51. PROPMAP_DEF_NAMED_ID (APPT_CLIPEND)
  52. PROPMAP_DEF_NAMED_ID (APPT_ISRECURRING)
  53. PROPMAP_DEF_NAMED_ID (APPT_FBSTATUS)
  54. PROPMAP_DEF_NAMED_ID (APPT_RECURRINGSTATE)
  55. PROPMAP_DEF_NAMED_ID (APPT_TIMEZONESTRUCT)
  56. };
  57. } /* namespace */
  58. #endif //_PublishFreeBusy_H_