123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #ifndef WSMAPIPROPSTORAGE_H
- #define WSMAPIPROPSTORAGE_H
- #include <kopano/zcdefs.h>
- #include <mutex>
- #include <kopano/ECUnknown.h>
- #include "IECPropStorage.h"
- #include <kopano/kcodes.h>
- #include "soapKCmdProxy.h"
- #include "WSTransport.h"
- #include <mapi.h>
- #include <mapispi.h>
- namespace KC {
- class convert_context;
- }
- class WSMAPIPropStorage _kc_final : public ECUnknown {
- protected:
- WSMAPIPropStorage(ULONG cbParentEntryId, LPENTRYID lpParentEntryId, ULONG cbEntryId, LPENTRYID, ULONG ulFlags, KCmd *, std::recursive_mutex &, ECSESSIONID, unsigned int ulServerCapabilities, WSTransport *);
- virtual ~WSMAPIPropStorage();
- public:
- static HRESULT Create(ULONG cbParentEntryId, LPENTRYID lpParentEntryId, ULONG cbEntryId, LPENTRYID, ULONG ulFlags, KCmd * , std::recursive_mutex &, ECSESSIONID, unsigned int ulServerCapabilities, WSTransport *, WSMAPIPropStorage **);
- virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
-
- virtual HRESULT HrSetSyncId(ULONG ulSyncId);
-
- virtual HRESULT RegisterAdvise(ULONG ulEventMask, ULONG ulConnection);
- virtual HRESULT GetEntryIDByRef(ULONG *lpcbEntryID, LPENTRYID *lppEntryID);
- private:
-
- virtual HRESULT HrReadProps(LPSPropTagArray *lppPropTags,ULONG *cValues, LPSPropValue *ppValues);
-
- virtual HRESULT HrLoadProp(ULONG ulObjId, ULONG ulPropTag, LPSPropValue *lppsPropValue);
-
- virtual HRESULT HrWriteProps(ULONG cValues, LPSPropValue pValues, ULONG ulFlags = 0);
-
- virtual HRESULT HrDeleteProps(const SPropTagArray *lpsPropTagArray);
-
- virtual HRESULT HrSaveObject(ULONG ulFlags, MAPIOBJECT *lpsMapiObject);
-
- virtual HRESULT HrLoadObject(MAPIOBJECT **lppsMapiObject);
- virtual IECPropStorage* GetServerStorage();
-
- virtual ECRESULT EcFillPropTags(struct saveObject *lpsSaveObj, MAPIOBJECT *lpsMapiObj);
- virtual ECRESULT EcFillPropValues(struct saveObject *lpsSaveObj, MAPIOBJECT *lpsMapiObj);
- virtual HRESULT HrMapiObjectToSoapObject(MAPIOBJECT *lpsMapiObject, struct saveObject *lpSaveObj, convert_context *lpConverter);
- virtual HRESULT HrUpdateSoapObject(MAPIOBJECT *lpsMapiObject, struct saveObject *lpsSaveObj, convert_context *lpConverter);
- virtual void DeleteSoapObject(struct saveObject *lpSaveObj);
- virtual HRESULT HrUpdateMapiObject(MAPIOBJECT *lpClientObj, struct saveObject *lpsServerObj);
- virtual ECRESULT ECSoapObjectToMapiObject(struct saveObject *lpsSaveObj, MAPIOBJECT *lpsMapiObject);
- virtual HRESULT LockSoap();
- virtual HRESULT UnLockSoap();
- static HRESULT Reload(void *lpParam, ECSESSIONID sessionId);
-
- friend class ECParentStorage;
- public:
- class xECPropStorage _kc_final : public IECPropStorage {
- #include <kopano/xclsfrag/IECUnknown.hpp>
- #include <kopano/xclsfrag/IECPropStorage.hpp>
- } m_xECPropStorage;
- private:
- entryId m_sEntryId;
- entryId m_sParentEntryId;
- KCmd* lpCmd;
- std::recursive_mutex &lpDataLock;
- ECSESSIONID ecSessionId;
- unsigned int ulServerCapabilities;
- ULONG m_ulSyncId = 0, m_ulConnection = 0, m_ulEventMask = 0;
- ULONG m_ulFlags;
- ULONG m_ulSessionReloadCallback;
- WSTransport *m_lpTransport;
- bool m_bSubscribed = false;
- };
- #endif
|