1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #ifndef ECNOTIFYCLIENT_H
- #define ECNOTIFYCLIENT_H
- #include <mutex>
- #include <kopano/zcdefs.h>
- #include <kopano/ECUnknown.h>
- #include <IECChangeAdviseSink.h>
- #include "ics_client.hpp"
- #include "ECNotifyMaster.h"
- #include <map>
- #include <list>
- #include <mapispi.h>
- struct ECADVISE;
- struct ECCHANGEADVISE;
- typedef std::map<int, ECADVISE*> ECMAPADVISE;
- typedef std::map<int, ECCHANGEADVISE*> ECMAPCHANGEADVISE;
- typedef std::list<std::pair<syncid_t,connection_t> > ECLISTCONNECTION;
- class SessionGroupData;
- class ECNotifyClient _kc_final : public ECUnknown {
- protected:
- ECNotifyClient(ULONG ulProviderType, void *lpProvider, ULONG ulFlags, LPMAPISUP lpSupport);
- virtual ~ECNotifyClient();
- public:
- static HRESULT Create(ULONG ulProviderType, void *lpProvider, ULONG ulFlags, LPMAPISUP lpSupport, ECNotifyClient**lppNotifyClient);
- virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
- virtual HRESULT Advise(ULONG cbKey, LPBYTE lpKey, ULONG ulEventMask, LPMAPIADVISESINK lpAdviseSink, ULONG *lpulConnection);
- virtual HRESULT Advise(const ECLISTSYNCSTATE &lstSyncStates, IECChangeAdviseSink *lpChangeAdviseSink, ECLISTCONNECTION *lplstConnections);
- virtual HRESULT Unadvise(ULONG ulConnection);
- virtual HRESULT Unadvise(const ECLISTCONNECTION &lstConnections);
-
- virtual HRESULT Reregister(ULONG ulConnection, ULONG cbKey = 0, LPBYTE lpKey = NULL);
- virtual HRESULT ReleaseAll();
- virtual HRESULT Notify(ULONG ulConnection, const NOTIFYLIST &lNotifications);
- virtual HRESULT NotifyChange(ULONG ulConnection, const NOTIFYLIST &lNotifications);
- virtual HRESULT NotifyReload();
-
- virtual HRESULT RegisterAdvise(ULONG cbKey, LPBYTE lpKey, ULONG ulEventMask, bool bSynchronous, LPMAPIADVISESINK lpAdviseSink, ULONG *lpulConnection);
- virtual HRESULT RegisterChangeAdvise(ULONG ulSyncId, ULONG ulChangeId, IECChangeAdviseSink *lpChangeAdviseSink, ULONG *lpulConnection);
- virtual HRESULT UnRegisterAdvise(ULONG ulConnection);
- virtual HRESULT UpdateSyncStates(const ECLISTSYNCID &lstSyncID, ECLISTSYNCSTATE *lplstSyncState);
- private:
- ECMAPADVISE m_mapAdvise;
- ECMAPCHANGEADVISE m_mapChangeAdvise;
- SessionGroupData* m_lpSessionGroup;
- ECNotifyMaster* m_lpNotifyMaster;
- WSTransport* m_lpTransport;
- LPMAPISUP m_lpSupport;
- void* m_lpProvider;
- ULONG m_ulProviderType;
- std::recursive_mutex m_hMutex;
- ECSESSIONGROUPID m_ecSessionGroupId;
- };
- #endif
|