ECABObjectTable.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 ECAB_OBJECTTABLE_H
  18. #define ECAB_OBJECTTABLE_H
  19. #include <kopano/zcdefs.h>
  20. #include "soapH.h"
  21. #include "ECGenericObjectTable.h"
  22. #include "ECUserManagement.h"
  23. struct soap;
  24. namespace KC {
  25. // Objectdata for abprovider
  26. struct ECODAB {
  27. unsigned int ulABId;
  28. unsigned int ulABType; // MAPI_ABCONT, MAPI_DISTLIST, MAPI_MAILUSER
  29. unsigned int ulABParentId;
  30. unsigned int ulABParentType; // MAPI_ABCONT, MAPI_DISTLIST, MAPI_MAILUSER
  31. };
  32. #define AB_FILTER_SYSTEM 0x00000001
  33. #define AB_FILTER_ADDRESSLIST 0x00000002
  34. #define AB_FILTER_CONTACTS 0x00000004
  35. class ECABObjectTable : public ECGenericObjectTable {
  36. protected:
  37. ECABObjectTable(ECSession *lpSession, unsigned int ulABId, unsigned int ulABType, unsigned int ulABParentId, unsigned int ulABParentType, unsigned int ulFlags, const ECLocale &locale);
  38. virtual ~ECABObjectTable();
  39. public:
  40. static ECRESULT Create(ECSession *lpSession, unsigned int ulABId, unsigned int ulABType, unsigned int ulABParentId, unsigned int ulABParentType, unsigned int ulFlags, const ECLocale &locale, ECABObjectTable **lppTable);
  41. //Overrides
  42. ECRESULT GetColumnsAll(ECListInt* lplstProps);
  43. ECRESULT Load();
  44. static ECRESULT QueryRowData(ECGenericObjectTable *lpThis, struct soap *soap, ECSession *lpSession, ECObjectTableList* lpRowList, struct propTagArray *lpsPropTagArray, void* lpObjectData, struct rowSet **lppRowSet, bool bTableData,bool bTableLimit);
  45. protected:
  46. /* Load hierarchy objects */
  47. ECRESULT LoadHierarchyAddressList(unsigned int ulObjectId, unsigned int ulFlags,
  48. list<localobjectdetails_t> **lppObjects);
  49. ECRESULT LoadHierarchyCompany(unsigned int ulObjectId, unsigned int ulFlags,
  50. list<localobjectdetails_t> **lppObjects);
  51. ECRESULT LoadHierarchyContainer(unsigned int ulObjectId, unsigned int ulFlags,
  52. list<localobjectdetails_t> **lppObjects);
  53. /* Load contents objects */
  54. ECRESULT LoadContentsAddressList(unsigned int ulObjectId, unsigned int ulFlags,
  55. list<localobjectdetails_t> **lppObjects);
  56. ECRESULT LoadContentsCompany(unsigned int ulObjectId, unsigned int ulFlags,
  57. list<localobjectdetails_t> **lppObjects);
  58. ECRESULT LoadContentsDistlist(unsigned int ulObjectId, unsigned int ulFlags,
  59. list<localobjectdetails_t> **lppObjects);
  60. private:
  61. virtual ECRESULT GetMVRowCount(unsigned int ulObjId, unsigned int *lpulCount);
  62. ECRESULT ReloadTableMVData(ECObjectTableList* lplistRows, ECListInt* lplistMVPropTag);
  63. protected:
  64. unsigned int m_ulUserManagementFlags;
  65. };
  66. } /* namespace */
  67. #endif