ECFBBlockList.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 block list
  20. *
  21. * @addtogroup libfreebusy
  22. * @{
  23. */
  24. #ifndef ECFBBLOCKLIST_H
  25. #define ECFBBLOCKLIST_H
  26. #include "freebusy.h"
  27. #include <map>
  28. #include <kopano/zcdefs.h>
  29. namespace KC {
  30. typedef std::map<LONG, FBBlock_1>mapFB;
  31. class ECFBBlockList _kc_final {
  32. public:
  33. ECFBBlockList(void);
  34. void Copy(ECFBBlockList *lpfbBlkList);
  35. HRESULT Add(FBBlock_1* lpFBBlock);
  36. HRESULT Next(FBBlock_1* pblk);
  37. HRESULT Reset();
  38. HRESULT Skip(LONG items);
  39. HRESULT Restrict(LONG tmStart, LONG tmEnd);
  40. void Clear();
  41. ULONG Size();
  42. HRESULT Merge(FBBlock_1* lpFBBlock);
  43. HRESULT GetEndTime(LONG *rtmEnd);
  44. private:
  45. mapFB m_FBMap;
  46. mapFB::iterator m_FBIter;
  47. LONG m_tmRestictStart;
  48. LONG m_tmRestictEnd;
  49. bool m_bInitIter;
  50. };
  51. } /* namespace */
  52. #endif // ECFBBLOCKLIST_H
  53. /** @} */