ECFreeBusyUpdate.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. /**
  18. * @file
  19. * Updates the freebusy data
  20. *
  21. * @addtogroup libfreebusy
  22. * @{
  23. */
  24. #ifndef ECFREEBUSYUPDATE_H
  25. #define ECFREEBUSYUPDATE_H
  26. #include <kopano/zcdefs.h>
  27. #include "freebusy.h"
  28. #include "freebusyguid.h"
  29. #include <kopano/ECUnknown.h>
  30. #include <kopano/Trace.h>
  31. #include <kopano/ECDebug.h>
  32. #include <kopano/ECGuid.h>
  33. #include <mapi.h>
  34. #include <mapidefs.h>
  35. #include "ECFBBlockList.h"
  36. namespace KC {
  37. /**
  38. * Implementatie of the IFreeBusyUpdate interface
  39. */
  40. class ECFreeBusyUpdate _kc_final : public ECUnknown {
  41. private:
  42. ECFreeBusyUpdate(IMessage* lpMessage);
  43. ~ECFreeBusyUpdate(void);
  44. public:
  45. static HRESULT Create(IMessage* lpMessage, ECFreeBusyUpdate **lppECFreeBusyUpdate);
  46. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  47. virtual HRESULT Reload(void) { return S_OK; }
  48. virtual HRESULT PublishFreeBusy(FBBlock_1 *lpBlocks, ULONG nBlocks);
  49. virtual HRESULT RemoveAppt(void) { return S_OK; }
  50. virtual HRESULT ResetPublishedFreeBusy();
  51. virtual HRESULT ChangeAppt(void) { return S_OK; }
  52. virtual HRESULT SaveChanges(FILETIME ftStart, FILETIME ftEnd);
  53. virtual HRESULT GetFBTimes(void) { return S_OK; }
  54. virtual HRESULT Intersect(void) { return S_OK; }
  55. class xFreeBusyUpdate _kc_final : public IFreeBusyUpdate {
  56. #include <kopano/xclsfrag/IUnknown.hpp>
  57. // <kopano/xclsfrag/IFreeBusyUpdate.hpp>
  58. virtual HRESULT __stdcall Reload(void) _kc_override;
  59. virtual HRESULT __stdcall PublishFreeBusy(FBBlock_1 *lpBlocks, ULONG nBlocks) _kc_override;
  60. virtual HRESULT __stdcall RemoveAppt(void) _kc_override;
  61. virtual HRESULT __stdcall ResetPublishedFreeBusy(void) _kc_override;
  62. virtual HRESULT __stdcall ChangeAppt(void) _kc_override;
  63. virtual HRESULT __stdcall SaveChanges(FILETIME ftBegin, FILETIME ftEnd) _kc_override;
  64. virtual HRESULT __stdcall GetFBTimes(void) _kc_override;
  65. virtual HRESULT __stdcall Intersect(void) _kc_override;
  66. } m_xFreeBusyUpdate;
  67. private:
  68. IMessage* m_lpMessage; /**< Pointer to the free/busy message received from GetFreeBusyMessage */
  69. ECFBBlockList m_fbBlockList; /**< Freebusy time blocks */
  70. };
  71. } /* namespace */
  72. #endif // ECFREEBUSYUPDATE_H
  73. /** @} */