ECEnumFBBlock.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 blocks
  20. *
  21. * @addtogroup libfreebusy
  22. * @{
  23. */
  24. #ifndef ECENUMFBBLOCK_H
  25. #define ECENUMFBBLOCK_H
  26. #include <kopano/zcdefs.h>
  27. #include "freebusy.h"
  28. #include <kopano/ECUnknown.h>
  29. #include <kopano/Trace.h>
  30. #include <kopano/ECDebug.h>
  31. #include <kopano/ECGuid.h>
  32. #include "freebusyguid.h"
  33. #include "ECFBBlockList.h"
  34. namespace KC {
  35. /**
  36. * Implementatie of the IEnumFBBlock interface
  37. */
  38. class ECEnumFBBlock _kc_final : public ECUnknown {
  39. private:
  40. ECEnumFBBlock(ECFBBlockList* lpFBBlock);
  41. public:
  42. static HRESULT Create(ECFBBlockList* lpFBBlock, ECEnumFBBlock **lppECEnumFBBlock);
  43. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  44. virtual HRESULT Next(LONG celt, FBBlock_1 *pblk, LONG *pcfetch);
  45. virtual HRESULT Skip(LONG celt);
  46. virtual HRESULT Reset();
  47. virtual HRESULT Clone(IEnumFBBlock **) { return E_NOTIMPL; }
  48. virtual HRESULT Restrict(FILETIME ftmStart, FILETIME ftmEnd);
  49. /* IEnumFBBlock wrapper class */
  50. class xEnumFBBlock _kc_final : public IEnumFBBlock {
  51. #include <kopano/xclsfrag/IUnknown.hpp>
  52. // <kopano/xclsfrag/IEnumFBBlock.hpp>
  53. virtual HRESULT __stdcall Next(LONG celt, FBBlock_1 *pblk, LONG *pcfetch) _kc_override;
  54. virtual HRESULT __stdcall Skip(LONG celt) _kc_override;
  55. virtual HRESULT __stdcall Reset(void) _kc_override;
  56. virtual HRESULT __stdcall Clone(IEnumFBBlock **ppclone) _kc_override;
  57. virtual HRESULT __stdcall Restrict(FILETIME start, FILETIME end) _kc_override;
  58. } m_xEnumFBBlock;
  59. ECFBBlockList m_FBBlock; /**< Freebusy time blocks */
  60. };
  61. } /* namespace */
  62. #endif // ECENUMFBBLOCK_H
  63. /** @} */