ecdefs.i 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. %module ecdefs
  2. %include "typemaps.i"
  3. %{
  4. #include "IECChangeAdvisor.h"
  5. #include "IECChangeAdviseSink.h"
  6. #include <kopano/IECSingleInstance.h>
  7. #include "IECImportContentsChanges.h"
  8. #include "IECImportHierarchyChanges.h"
  9. %}
  10. class IECChangeAdvisor : public IUnknown {
  11. public:
  12. virtual HRESULT GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError) = 0;
  13. virtual HRESULT Config(IStream * lpStream, GUID * lpGUID, IECChangeAdviseSink* lpAdviseSink, ULONG ulFlags) = 0;
  14. virtual HRESULT UpdateState(IStream * lpStream) = 0;
  15. virtual HRESULT AddKeys(LPENTRYLIST lpEntryList) = 0;
  16. virtual HRESULT RemoveKeys(LPENTRYLIST lpEntryList) = 0;
  17. virtual HRESULT IsMonitoringSyncId(ULONG ulSyncId) = 0;
  18. virtual HRESULT UpdateSyncState(ULONG ulSyncId, ULONG ulChangeId) = 0;
  19. %extend {
  20. virtual ~IECChangeAdvisor() { self->Release(); }
  21. }
  22. };
  23. class IECChangeAdviseSink : public IUnknown {
  24. public:
  25. virtual ULONG OnNotify(ULONG ulFlags, LPENTRYLIST lpEntryList) = 0;
  26. %extend {
  27. virtual ~IECChangeAdviseSink() { self->Release(); }
  28. }
  29. };
  30. class IECImportContentsChanges : public IExchangeImportContentsChanges {
  31. public:
  32. virtual HRESULT ConfigForConversionStream(IStream * lpStream, ULONG ulFlags, ULONG cValuesConversion, LPSPropValue lpPropArrayConversion) = 0;
  33. virtual HRESULT ImportMessageChangeAsAStream(ULONG cValues, LPSPropValue lpProps, ULONG ulFlags, IStream ** lppStream) = 0;
  34. virtual HRESULT SetMessageInterface(const IID& refiid) = 0;
  35. %extend {
  36. virtual ~IECImportContentsChanges() { self->Release(); }
  37. }
  38. };
  39. class IECImportHierarchyChanges : public IExchangeImportHierarchyChanges {
  40. public:
  41. virtual HRESULT ImportFolderChangeEx(ULONG cValues, LPSPropValue lpProps, BOOL fNew) = 0;
  42. %extend {
  43. virtual ~IECImportHierarchyChanges() { self->Release(); }
  44. }
  45. };
  46. class IECSingleInstance : public IUnknown {
  47. public:
  48. virtual HRESULT GetSingleInstanceId(ULONG *OUTPUT /*lpcbInstanceID*/, LPENTRYID *OUTPUT /*lppInstanceID*/) = 0;
  49. virtual HRESULT SetSingleInstanceId(ULONG cbInstanceID, LPENTRYID lpInstanceID) = 0;
  50. %extend {
  51. virtual ~IECSingleInstance() { self->Release(); }
  52. }
  53. };
  54. #if SWIGPYTHON
  55. %{
  56. #include <kopano/swig_iunknown.h>
  57. typedef IUnknownImplementor<IECChangeAdviseSink> ECChangeAdviseSink;
  58. typedef IUnknownImplementor<IECImportContentsChanges> ECImportContentsChanges;
  59. typedef IUnknownImplementor<IECImportHierarchyChanges> ECImportHierarchyChanges;
  60. %}
  61. %feature("director") ECChangeAdviseSink;
  62. %feature("nodirector") ECChangeAdviseSink::QueryInterface;
  63. class ECChangeAdviseSink : public IECChangeAdviseSink {
  64. public:
  65. ECChangeAdviseSink(ULONG cInterfaces, LPCIID lpInterfaces);
  66. %extend {
  67. virtual ~ECChangeAdviseSink() { delete self; }
  68. }
  69. };
  70. %feature("director") ECImportContentsChanges;
  71. %feature("nodirector") ECImportContentsChanges::QueryInterface;
  72. class ECImportContentsChanges : public IECImportContentsChanges {
  73. public:
  74. ECImportContentsChanges(ULONG cInterfaces, LPCIID lpInterfaces);
  75. %extend {
  76. virtual ~ECImportContentsChanges() { delete self; }
  77. }
  78. };
  79. %feature("director") ECImportHierarchyChanges;
  80. %feature("nodirector") ECImportHierarchyChanges::QueryInterface;
  81. class ECImportHierarchyChanges : public IECImportHierarchyChanges {
  82. public:
  83. ECImportHierarchyChanges(ULONG cInterfaces, LPCIID lpInterfaces);
  84. %extend {
  85. virtual ~ECImportHierarchyChanges() { delete self; }
  86. }
  87. };
  88. #endif // SWIGPYTHON