edkmdb.i 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. %{
  2. // Hack to get around OP_DELETE being an enum in perl\lib\core\opnames.h and EdkMdb.h
  3. namespace EdkMdb {
  4. #include <edkmdb.h>
  5. }
  6. using namespace EdkMdb;
  7. %}
  8. class IExchangeImportContentsChanges : public IUnknown {
  9. public:
  10. virtual HRESULT GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR* OUTPUT /*lppMAPIError*/) = 0;
  11. virtual HRESULT Config(IStream * lpStream, ULONG ulFlags) = 0;
  12. virtual HRESULT UpdateState(IStream * lpStream) = 0;
  13. virtual HRESULT ImportMessageChange(ULONG cValues, LPSPropValue lpProps, ULONG ulFlags, IMessage ** lppMessage) = 0;
  14. virtual HRESULT ImportMessageDeletion(ULONG ulFlags, LPENTRYLIST lpSourceEntryList) = 0;
  15. virtual HRESULT ImportPerUserReadStateChange(ULONG cElements, LPREADSTATE lpReadState) = 0;
  16. virtual HRESULT ImportMessageMove(ULONG cbSourceKeySrcFolder, BYTE * pbSourceKeySrcFolder, ULONG cbSourceKeySrcMessage, BYTE * pbSourceKeySrcMessage, ULONG cbPCLMessage, BYTE * pbPCLMessage, ULONG cbSourceKeyDestMessage, BYTE * pbSourceKeyDestMessage, ULONG cbChangeNumDestMessage, BYTE * pbChangeNumDestMessage) = 0;
  17. %extend {
  18. virtual ~IExchangeImportContentsChanges() { self->Release(); }
  19. }
  20. };
  21. class IExchangeImportHierarchyChanges : public IUnknown {
  22. public:
  23. virtual HRESULT GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR* OUTPUT /*lppMAPIError*/) = 0;
  24. virtual HRESULT Config(IStream * lpStream, ULONG ulFlags) = 0;
  25. virtual HRESULT UpdateState(IStream * lpStream) = 0;
  26. virtual HRESULT ImportFolderChange(ULONG cValues, LPSPropValue lpProps) = 0;
  27. virtual HRESULT ImportFolderDeletion(ULONG ulFlags, LPENTRYLIST lpSrcEntryList) = 0;
  28. %extend {
  29. virtual ~IExchangeImportHierarchyChanges() { self->Release(); }
  30. }
  31. };
  32. class IExchangeExportChanges : public IUnknown {
  33. public:
  34. virtual HRESULT GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR* OUTPUT /*lppMAPIError*/) = 0;
  35. virtual HRESULT Config(IStream * lpStream, ULONG ulFlags, IUnknown *lpUnk, LPSRestriction lpRestriction, LPSPropTagArray lpIncludeProps, LPSPropTagArray lpExcludeProps, ULONG ulBufferSize) = 0;
  36. virtual HRESULT Synchronize(ULONG* lpulSteps, ULONG *INOUT /*lpulProgress*/) = 0;
  37. virtual HRESULT UpdateState(IStream * lpStream) = 0;
  38. %extend {
  39. virtual ~IExchangeExportChanges() { self->Release(); }
  40. }
  41. };
  42. class IExchangeManageStore : public IUnknown {
  43. public:
  44. virtual HRESULT CreateStoreEntryID(LPTSTR lpszMsgStoreDN, LPTSTR lpszMailboxDN, ULONG ulFlags, ULONG *OUTPUT, LPENTRYID *OUTPUT) = 0;
  45. virtual HRESULT EntryIDFromSourceKey(ULONG cFolderKeySize, BYTE *lpFolderSourceKey, ULONG cMessageKeySize, BYTE *lpMessageSourceKey, ULONG *OUTPUT, LPENTRYID *OUTPUT) = 0;
  46. virtual HRESULT GetRights(ULONG cbUserEntryID, LPENTRYID lpUserEntryID, ULONG cbEntryID, LPENTRYID lpEntryID, ULONG *lpulRights) = 0;
  47. virtual HRESULT GetMailboxTable(LPTSTR lpszServerName, IMAPITable **OUTPUT /*lppTable*/, ULONG ulFlags) = 0;
  48. virtual HRESULT GetPublicFolderTable(LPTSTR lpszServerName, IMAPITable **OUTPUT /*lppTable*/, ULONG ulFlags) = 0;
  49. %extend {
  50. virtual ~IExchangeManageStore() { self->Release(); }
  51. }
  52. };
  53. class IExchangeModifyTable : public IUnknown {
  54. public:
  55. virtual HRESULT GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR* OUTPUT /*lppMAPIError*/) = 0;
  56. virtual HRESULT GetTable(ULONG ulFlags, IMAPITable ** OUTPUT /*lppTable*/) = 0;
  57. virtual HRESULT ModifyTable(ULONG ulFlags, LPROWLIST lpMods) = 0;
  58. %extend {
  59. virtual ~IExchangeModifyTable() { self->Release(); }
  60. }
  61. };
  62. #if SWIGPYTHON
  63. %{
  64. #include <kopano/swig_iunknown.h>
  65. typedef IUnknownImplementor<IExchangeImportContentsChanges> ExchangeImportContentsChanges;
  66. typedef IUnknownImplementor<IExchangeImportHierarchyChanges> ExchangeImportHierarchyChanges;
  67. typedef IUnknownImplementor<IExchangeExportChanges> ExchangeExportChanges;
  68. %}
  69. %feature("director") ExchangeImportContentsChanges;
  70. %feature("nodirector") ExchangeImportContentsChanges::QueryInterface;
  71. class ExchangeImportContentsChanges : public IExchangeImportContentsChanges {
  72. public:
  73. ExchangeImportContentsChanges(ULONG cInterfaces, LPCIID lpInterfaces);
  74. %extend {
  75. virtual ~ExchangeImportContentsChanges() { delete self; }
  76. }
  77. };
  78. %feature("director") ExchangeImportHierarchyChanges;
  79. %feature("nodirector") ExchangeImportHierarchyChanges::QueryInterface;
  80. class ExchangeImportHierarchyChanges : public IExchangeImportHierarchyChanges {
  81. public:
  82. ExchangeImportHierarchyChanges(ULONG cInterfaces, LPCIID lpInterfaces);
  83. %extend {
  84. virtual ~ExchangeImportHierarchyChanges() { delete self; }
  85. }
  86. };
  87. %feature("director") ExchangeExportChanges;
  88. %feature("nodirector") ExchangeExportChanges::QueryInterface;
  89. class ExchangeExportChanges : public IExchangeExportChanges {
  90. public:
  91. ExchangeExportChanges(ULONG cInterfaces, LPCIID lpInterfaces);
  92. %extend {
  93. virtual ~ExchangeExportChanges() { delete self; }
  94. }
  95. };
  96. #endif // SWIGPYTHON
  97. #define SYNC_UNICODE 0x01
  98. #define SYNC_NO_DELETIONS 0x02
  99. #define SYNC_NO_SOFT_DELETIONS 0x04
  100. #define SYNC_READ_STATE 0x08
  101. #define SYNC_ASSOCIATED 0x10
  102. #define SYNC_NORMAL 0x20
  103. #define SYNC_NO_CONFLICTS 0x40
  104. #define SYNC_ONLY_SPECIFIED_PROPS 0x80
  105. #define SYNC_NO_FOREIGN_KEYS 0x100
  106. #define SYNC_LIMITED_IMESSAGE 0x200
  107. #define SYNC_CATCHUP 0x400
  108. #define SYNC_NEW_MESSAGE 0x800
  109. #define SYNC_MSG_SELECTIVE 0x1000
  110. #define SYNC_BEST_BODY 0x2000
  111. #define SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED 0x4000
  112. #define SYNC_PROGRESS_MODE 0x8000
  113. #define SYNC_FXRECOVERMODE 0x10000
  114. #define SYNC_DEFER_CONFIG 0x20000
  115. #define SYNC_FORCE_UNICODE 0x40000
  116. #define DELETE_HARD_DELETE 0x10
  117. #define ROWLIST_REPLACE 1
  118. #define ROW_ADD 1
  119. #define ROW_MODIFY 2
  120. #define ROW_REMOVE 4
  121. #define ROW_EMPTY 5
  122. %constant unsigned int SYNC_E_UNKNOWN_FLAGS = 0x80040106;
  123. %constant unsigned int SYNC_E_INVALID_PARAMETER = 0x80070057;
  124. %constant unsigned int SYNC_E_ERROR = 0x80004005;
  125. %constant unsigned int SYNC_E_OBJECT_DELETED = 0x80040800;
  126. %constant unsigned int SYNC_E_IGNORE = 0x80040801;
  127. %constant unsigned int SYNC_E_CONFLICT = 0x80040802;
  128. %constant unsigned int SYNC_E_NO_PARENT = 0x80040803;
  129. %constant unsigned int SYNC_E_INCEST = 0x80040804;
  130. %constant unsigned int SYNC_E_UNSYNCHRONIZED = 0x80040805;
  131. %constant unsigned int SYNC_W_PROGRESS = 0x00040820;
  132. %constant unsigned int SYNC_W_CLIENT_CHANGE_NEWER = 0x00040821;