WSStoreTableView.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 WSSTORETABLEVIEW_H
  18. #define WSSTORETABLEVIEW_H
  19. #include <mutex>
  20. #include <kopano/zcdefs.h>
  21. #include "WSTableView.h"
  22. class WSStoreTableView : public WSTableView {
  23. protected:
  24. WSStoreTableView(ULONG ulType, ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, ULONG cbEntryId, LPENTRYID, ECMsgStore *, WSTransport *);
  25. virtual ~WSStoreTableView(void) _kc_impdtor;
  26. public:
  27. static HRESULT Create(ULONG ulType, ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, ULONG cbEntryId, LPENTRYID, ECMsgStore *, WSTransport *, WSTableView **);
  28. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  29. };
  30. class WSTableOutGoingQueue _kc_final : public WSStoreTableView {
  31. protected:
  32. WSTableOutGoingQueue(KCmd *, std::recursive_mutex &, ECSESSIONID, ULONG cbEntryId, LPENTRYID, ECMsgStore *, WSTransport *);
  33. public:
  34. static HRESULT Create(KCmd *, std::recursive_mutex &, ECSESSIONID, ULONG cbEntryId, LPENTRYID, ECMsgStore *, WSTransport *, WSTableOutGoingQueue **);
  35. virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
  36. virtual HRESULT HrOpenTable();
  37. };
  38. class WSTableMultiStore _kc_final : public WSStoreTableView {
  39. protected:
  40. WSTableMultiStore(ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, ULONG cbEntryId, LPENTRYID, ECMsgStore *, WSTransport *);
  41. virtual ~WSTableMultiStore();
  42. public:
  43. static HRESULT Create(ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, ULONG cbEntryId, LPENTRYID, ECMsgStore *, WSTransport *, WSTableMultiStore **);
  44. virtual HRESULT HrOpenTable();
  45. virtual HRESULT HrSetEntryIDs(LPENTRYLIST lpMsgList);
  46. private:
  47. struct entryList m_sEntryList;
  48. };
  49. /* not really store tables, but the code is the same.. */
  50. class WSTableMisc _kc_final : public WSStoreTableView {
  51. protected:
  52. WSTableMisc(ULONG ulTableType, ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, ULONG cbEntryId, LPENTRYID, ECMsgStore *, WSTransport *);
  53. public:
  54. static HRESULT Create(ULONG ulTableType, ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, ULONG cbEntryId, LPENTRYID, ECMsgStore *, WSTransport *, WSTableMisc **);
  55. virtual HRESULT HrOpenTable();
  56. private:
  57. ULONG m_ulTableType;
  58. };
  59. /**
  60. * MailBox table which shows all the stores
  61. */
  62. class WSTableMailBox _kc_final : public WSStoreTableView {
  63. protected:
  64. WSTableMailBox(ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, ECMsgStore *, WSTransport *);
  65. public:
  66. static HRESULT Create(ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, ECMsgStore *, WSTransport *, WSTableMailBox **);
  67. };
  68. #endif