ECFreeBusySupport.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. * Free/busy data for specified users
  20. *
  21. * @addtogroup libfreebusy
  22. * @{
  23. */
  24. #ifndef ECFREEBUSYSUPPORT_H
  25. #define ECFREEBUSYSUPPORT_H
  26. #include <kopano/zcdefs.h>
  27. #include "freebusy.h"
  28. #include "freebusyguid.h"
  29. #include <mapi.h>
  30. #include <mapidefs.h>
  31. #include <mapix.h>
  32. #include <kopano/ECUnknown.h>
  33. #include <kopano/Trace.h>
  34. #include <kopano/ECDebug.h>
  35. #include <kopano/ECGuid.h>
  36. #include "ECFBBlockList.h"
  37. namespace KC {
  38. /**
  39. * Implementatie of the IFreeBusySupport interface
  40. */
  41. class _kc_export ECFreeBusySupport _kc_final : public ECUnknown {
  42. private:
  43. _kc_hidden ECFreeBusySupport(void);
  44. _kc_hidden ~ECFreeBusySupport(void);
  45. public:
  46. static HRESULT Create(ECFreeBusySupport** lppFreeBusySupport);
  47. // From IUnknown
  48. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  49. // IFreeBusySupport
  50. virtual HRESULT Open(IMAPISession* lpMAPISession, IMsgStore* lpMsgStore, BOOL bStore);
  51. virtual HRESULT Close();
  52. _kc_hidden virtual HRESULT LoadFreeBusyData(ULONG max, FBUser *fbuser, IFreeBusyData **fbdata, HRESULT *status, ULONG *have_read);
  53. _kc_hidden virtual HRESULT LoadFreeBusyUpdate(ULONG nusers, FBUser *users, IFreeBusyUpdate **fbup, ULONG *nfbup, void *data4);
  54. _kc_hidden virtual HRESULT CommitChanges(void) { return S_OK; }
  55. _kc_hidden virtual HRESULT GetDelegateInfo(FBUser, void *) { return E_NOTIMPL; }
  56. _kc_hidden virtual HRESULT SetDelegateInfo(void *) { return E_NOTIMPL; }
  57. _kc_hidden virtual HRESULT AdviseFreeBusy(void *) { return E_NOTIMPL; }
  58. _kc_hidden virtual HRESULT Reload(void *) { return E_NOTIMPL; }
  59. _kc_hidden virtual HRESULT GetFBDetailSupport(void **, BOOL) { return E_NOTIMPL; }
  60. _kc_hidden virtual HRESULT HrHandleServerSched(void *) { return E_NOTIMPL; }
  61. _kc_hidden virtual HRESULT HrHandleServerSchedAccess(void) { return S_OK; }
  62. _kc_hidden virtual BOOL FShowServerSched(BOOL) { return FALSE; }
  63. _kc_hidden virtual HRESULT HrDeleteServerSched(void) { return S_OK; }
  64. _kc_hidden virtual HRESULT GetFReadOnly(void *) { return E_NOTIMPL; }
  65. _kc_hidden virtual HRESULT SetLocalFB(void *) { return E_NOTIMPL; }
  66. _kc_hidden virtual HRESULT PrepareForSync(void) { return E_NOTIMPL; }
  67. _kc_hidden virtual HRESULT GetFBPublishMonthRange(void *) { return E_NOTIMPL; }
  68. _kc_hidden virtual HRESULT PublishRangeChanged(void) { return E_NOTIMPL; }
  69. _kc_hidden virtual HRESULT CleanTombstone(void) { return E_NOTIMPL; }
  70. _kc_hidden virtual HRESULT GetDelegateInfoEx(FBUser sFBUser, unsigned int *lpulStatus, unsigned int *lpulStart, unsigned int *lpulEnd);
  71. _kc_hidden virtual HRESULT PushDelegateInfoToWorkspace(void) { return E_NOTIMPL; }
  72. // Interface for Outlook 2002 and up
  73. class _kc_hidden xFreeBusySupport _kc_final : public IFreeBusySupport {
  74. #include <kopano/xclsfrag/IUnknown.hpp>
  75. #include <kopano/xclsfrag/IFreeBusySupport.hpp>
  76. virtual HRESULT __stdcall CleanTombstone(void) _kc_override;
  77. } m_xFreeBusySupport;
  78. // Interface for Outlook 2000
  79. class _kc_hidden xFreeBusySupportOutlook2000 _kc_final :
  80. public IFreeBusySupportOutlook2000
  81. {
  82. #include <kopano/xclsfrag/IUnknown.hpp>
  83. #include <kopano/xclsfrag/IFreeBusySupport.hpp>
  84. } m_xFreeBusySupportOutlook2000;
  85. private:
  86. IMAPISession *m_lpSession = nullptr;
  87. IMsgStore *m_lpPublicStore = nullptr, *m_lpUserStore = nullptr;
  88. IMAPIFolder *m_lpFreeBusyFolder = nullptr;
  89. unsigned int m_ulOutlookVersion;
  90. };
  91. } /* namespace */
  92. #endif // ECFREEBUSYSUPPORT_H
  93. /** @} */