IECServiceAdmin.i 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. %include "typemaps.i"
  2. %apply (ULONG cbEntryID, LPENTRYID lpEntryID) {(ULONG cbUserId, LPENTRYID lpUserId), (ULONG cbStoreId, LPENTRYID lpStoreId), (ULONG cbRootId, LPENTRYID lpRootId), (ULONG cbCompanyId, LPENTRYID lpCompanyId), (ULONG cbGroupId, LPENTRYID lpGroupId), (ULONG cbSenderId, LPENTRYID lpSenderId), (ULONG cbRecipientId, LPENTRYID lpRecipientId), (ULONG cbSetCompanyId, LPENTRYID lpSetCompanyId)};
  3. %apply (ULONG *, MAPIARRAY *) {(ULONG *OUTPUT, LPECUSER *OUTPUT), (ULONG *OUTPUT, LPECGROUP *OUTPUT), (ULONG *OUTPUT, LPECCOMPANY *OUTPUT)};
  4. %apply MAPISTRUCT_W_FLAGS {LPECUSER, LPECCOMPANY, LPECGROUP};
  5. %apply MAPISTRUCT * {LPECUSER *OUTPUT, LPECQUOTA *OUTPUT, LPECUSERCLIENTUPDATESTATUS *OUTPUT, LPECCOMPANY *OUTPUT, LPECGROUP *OUTPUT, LPECQUOTASTATUS *OUTPUT};
  6. %apply MAPISTRUCT {LPECQUOTA};
  7. %apply MAPILIST {LPECSVRNAMELIST};
  8. %apply MAPILIST * {LPECSERVERLIST* OUTPUT};
  9. %typemap(in,numinputs=0) (bool *OUTPUT) (bool bBool = NULL) {
  10. $1 = &bBool;
  11. }
  12. %typemap(argout, fragment="SWIG_From_int") bool *OUTPUT{
  13. %append_output(SWIG_From_int((int)*$1));
  14. }
  15. %typemap(argout) (LPECUSER *OUTPUT) {
  16. %append_output(Object_from_LPECUSER(*($1), ulFlags));
  17. }
  18. %typemap(argout) (ULONG *OUTPUT, LPECUSER *OUTPUT) {
  19. %append_output(List_from_LPECUSER(*($2),*($1), ulFlags));
  20. }
  21. %typemap(argout) (LPECCOMPANY *OUTPUT) {
  22. %append_output(Object_from_LPECCOMPANY(*($1), ulFlags));
  23. }
  24. %typemap(argout) (ULONG *OUTPUT, LPECCOMPANY *OUTPUT) {
  25. %append_output(List_from_LPECCOMPANY(*($2),*($1), ulFlags));
  26. }
  27. %typemap(argout) (LPECGROUP *OUTPUT) {
  28. %append_output(Object_from_LPECGROUP(*($1), ulFlags));
  29. }
  30. %typemap(argout) (ULONG *OUTPUT, LPECGROUP *OUTPUT) {
  31. %append_output(List_from_LPECGROUP(*($2),*($1), ulFlags));
  32. }
  33. #define ECSTORE_TYPE_PRIVATE 0
  34. #define ECSTORE_TYPE_PUBLIC 1
  35. #define ECSTORE_TYPE_ARCHIVE 2
  36. class IECServiceAdmin : public IUnknown {
  37. public:
  38. // Create/Delete stores
  39. virtual HRESULT CreateStore(ULONG ulStoreType, ULONG cbUserId, LPENTRYID lpUserId, ULONG* lpcbStoreId, LPENTRYID* lppStoreId, ULONG* lpcbRootId, LPENTRYID *lppRootId) = 0;
  40. virtual HRESULT CreateEmptyStore(ULONG ulStoreType, ULONG cbUserId, LPENTRYID lpUserId, ULONG ulFlags, ULONG* lpcbStoreId_oio, LPENTRYID* lppStoreId_oio, ULONG* lpcbRootId_oio, LPENTRYID *lppRootId_oio) = 0;
  41. virtual HRESULT ResolveStore(LPGUID lpGuid, ULONG *lpulUserID, ULONG* OUTPUT, LPENTRYID* OUTPUT) = 0;
  42. virtual HRESULT HookStore(ULONG ulStoreType, ULONG cbUserId, LPENTRYID lpUserId, LPGUID lpGuid) = 0;
  43. virtual HRESULT UnhookStore(ULONG ulStoreType, ULONG cbUserId, LPENTRYID lpUserId) = 0;
  44. virtual HRESULT RemoveStore(LPGUID lpGuid) = 0;
  45. // User functions
  46. virtual HRESULT CreateUser(LPECUSER lpECUser, ULONG ulFlags, ULONG *OUTPUT, LPENTRYID *OUTPUT) = 0;
  47. virtual HRESULT DeleteUser(ULONG cbUserId, LPENTRYID lpUserId) = 0;
  48. virtual HRESULT SetUser(LPECUSER lpECUser, ULONG ulFlags) = 0;
  49. virtual HRESULT GetUser(ULONG cbUserId, LPENTRYID lpUserId, ULONG ulFlags, LPECUSER *OUTPUT /*lppECUser*/) = 0;
  50. virtual HRESULT ResolveUserName(LPTSTR lpszUserName, ULONG ulFlags, ULONG *OUTPUT, LPENTRYID *OUTPUT) = 0;
  51. virtual HRESULT GetUserList(ULONG cbCompanyId, LPENTRYID lpCompanyId, ULONG ulFlags, ULONG *OUTPUT /*lpcUsers*/, LPECUSER *OUTPUT /*lppsUsers*/) = 0;
  52. virtual HRESULT GetSendAsList(ULONG cbUserId, LPENTRYID lpUserId, ULONG ulFlags, ULONG *OUTPUT /*lpcSenders*/, LPECUSER *OUTPUT /*lppSenders*/) = 0;
  53. virtual HRESULT AddSendAsUser(ULONG cbUserId, LPENTRYID lpUserId, ULONG cbSenderId, LPENTRYID lpSenderId) = 0;
  54. virtual HRESULT DelSendAsUser(ULONG cbUserId, LPENTRYID lpUserId, ULONG cbSenderId, LPENTRYID lpSenderId) = 0;
  55. virtual HRESULT GetUserClientUpdateStatus(ULONG cbUserId, LPENTRYID lpUserId, ULONG ulFlags, LPECUSERCLIENTUPDATESTATUS *OUTPUT /*lppECUCUS*/) = 0;
  56. virtual HRESULT RemoveAllObjects(ULONG cbUserId, LPENTRYID lpUserId) = 0;
  57. // Group functions
  58. virtual HRESULT CreateGroup(LPECGROUP lpECGroup, ULONG ulFlags, ULONG *OUTPUT, LPENTRYID *OUTPUT) = 0;
  59. virtual HRESULT DeleteGroup(ULONG cbGroupId, LPENTRYID lpGroupId) = 0;
  60. virtual HRESULT SetGroup(LPECGROUP lpECGroup, ULONG ulFlags) = 0;
  61. virtual HRESULT GetGroup(ULONG cbGroupId, LPENTRYID lpGroupId, ULONG ulFlags, LPECGROUP *OUTPUT/*lppECGroup*/) = 0;
  62. virtual HRESULT ResolveGroupName(LPTSTR lpszGroupName, ULONG ulFlags, ULONG *OUTPUT, LPENTRYID *OUTPUT) = 0;
  63. virtual HRESULT GetGroupList(ULONG cbCompanyId, LPENTRYID lpCompanyId, ULONG ulFlags, ULONG *OUTPUT /*lpcGroups*/, LPECGROUP *OUTPUT /*lppsGroups*/) = 0;
  64. virtual HRESULT DeleteGroupUser(ULONG cbGroupId, LPENTRYID lpGroupId, ULONG cbUserId, LPENTRYID lpUserId) = 0;
  65. virtual HRESULT AddGroupUser(ULONG cbGroupId, LPENTRYID lpGroupId, ULONG cbUserId, LPENTRYID lpUserId) = 0;
  66. virtual HRESULT GetUserListOfGroup(ULONG cbGroupId, LPENTRYID lpGroupId, ULONG ulFlags, ULONG *OUTPUT /*lpcUsers*/, LPECUSER *OUTPUT /*lppsUsers*/) = 0;
  67. virtual HRESULT GetGroupListOfUser(ULONG cbUserId, LPENTRYID lpUserId, ULONG ulFlags, ULONG *OUTPUT /*lpcGroups*/, LPECGROUP *OUTPUT /*lppsGroups*/) = 0;
  68. // Company functions
  69. virtual HRESULT CreateCompany(LPECCOMPANY lpECCompany, ULONG ulFlags, ULONG *OUTPUT, LPENTRYID *OUTPUT) = 0;
  70. virtual HRESULT DeleteCompany(ULONG cbCompanyId, LPENTRYID lpCompanyId) = 0;
  71. virtual HRESULT SetCompany(LPECCOMPANY lpECCompany, ULONG ulFlags) = 0;
  72. virtual HRESULT GetCompany(ULONG cbCompanyId, LPENTRYID lpCompanyId, ULONG ulFlags, LPECCOMPANY *OUTPUT/*lppECCompany*/) = 0;
  73. virtual HRESULT ResolveCompanyName(LPTSTR lpszCompanyName, ULONG ulFlags, ULONG *OUTPUT, LPENTRYID *OUTPUT) = 0;
  74. virtual HRESULT GetCompanyList(ULONG ulFlags, ULONG *OUTPUT /*lpcCompanies*/, LPECCOMPANY *OUTPUT /*lppsCompanies*/) = 0;
  75. virtual HRESULT AddCompanyToRemoteViewList(ULONG cbSetCompanyId, LPENTRYID lpSetCompanyId, ULONG cbCompanyId, LPENTRYID lpCompanyId) = 0;
  76. virtual HRESULT DelCompanyFromRemoteViewList(ULONG cbSetCompanyId, LPENTRYID lpSetCompanyId, ULONG cbCompanyId, LPENTRYID lpCompanyId) = 0;
  77. virtual HRESULT GetRemoteViewList(ULONG cbCompanyId, LPENTRYID lpCompanyId, ULONG ulFlags, ULONG *OUTPUT /*lpcCompanies*/, LPECCOMPANY *OUTPUT /*lppsCompanies*/) = 0;
  78. virtual HRESULT AddUserToRemoteAdminList(ULONG cbUserId, LPENTRYID lpUserId, ULONG cbCompanyId, LPENTRYID lpCompanyId) = 0;
  79. virtual HRESULT DelUserFromRemoteAdminList(ULONG cbUserId, LPENTRYID lpUserId, ULONG cbCompanyId, LPENTRYID lpCompanyId) = 0;
  80. virtual HRESULT GetRemoteAdminList(ULONG cbCompanyId, LPENTRYID lpCompanyId, ULONG ulFlags, ULONG *OUTPUT /*lpcUsers*/, LPECUSER *OUTPUT /*lppsUsers*/) = 0;
  81. virtual HRESULT SyncUsers(ULONG cbCompanyId, LPENTRYID lpCompanyId) = 0;
  82. // Quota functions
  83. virtual HRESULT GetQuota(ULONG cbUserId, LPENTRYID lpUserId, bool bGetUserDefault, LPECQUOTA* OUTPUT) = 0;
  84. virtual HRESULT SetQuota(ULONG cbUserId, LPENTRYID lpUserId, LPECQUOTA lpsQuota) = 0;
  85. virtual HRESULT AddQuotaRecipient(ULONG cbCompanyId, LPENTRYID lpCompanyId, ULONG cbRecipientId, LPENTRYID lpRecipientId, ULONG ulType) = 0;
  86. virtual HRESULT DeleteQuotaRecipient(ULONG cbCompanyId, LPENTRYID lpCompanyId, ULONG cbRecipientId, LPENTRYID lpRecipientId, ULONG ulType) = 0;
  87. virtual HRESULT GetQuotaRecipients(ULONG cbUserId, LPENTRYID lpUserId, ULONG ulFlags, ULONG *OUTPUT /*lpcUsers*/, LPECUSER *OUTPUT /*lppsUsers*/) = 0;
  88. virtual HRESULT GetQuotaStatus(ULONG cbUserId, LPENTRYID lpUserId, LPECQUOTASTATUS* OUTPUT/*lppsQuotaStatus*/) = 0;
  89. virtual HRESULT PurgeSoftDelete(ULONG ulDays) = 0;
  90. virtual HRESULT PurgeCache(ULONG ulFlags) = 0;
  91. virtual HRESULT PurgeDeferredUpdates(ULONG *OUTPUT) = 0;
  92. virtual HRESULT OpenUserStoresTable(ULONG ulFlags, IMAPITable **OUTPUT /*lppTable*/) = 0;
  93. // Multiserver functions
  94. virtual HRESULT GetServerDetails(LPECSVRNAMELIST lpServerNameList, ULONG ulFlags, LPECSERVERLIST* OUTPUT/*lppsServerList*/) = 0;
  95. virtual HRESULT ResolvePseudoUrl(const char *url, char** OUTMAPICHAR/*lppszServerPath*/, bool *OUTPUT /*lpbIsPeer*/) = 0;
  96. // Public store function(s)
  97. virtual HRESULT GetPublicStoreEntryID(ULONG ulFlags, ULONG *OUTPUT /*lpcbStoreID*/, LPENTRYID *OUTPUT /*lppStoreID*/) = 0;
  98. // Archive store function(s)
  99. virtual HRESULT GetArchiveStoreEntryID(LPTSTR lpszUserName, LPTSTR lpszServerName, ULONG ulFlags, ULONG *OUTPUT /*lpcbStoreID*/, LPENTRYID *OUTPUT /*lppStoreID*/) = 0;
  100. virtual HRESULT ResetFolderCount(ULONG cbEntryID, LPENTRYID lpEntryID, ULONG *OUTPUT /*lpulUpdates*/) = 0;
  101. %extend {
  102. ~IECServiceAdmin() { self->Release(); }
  103. }
  104. };