12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #ifndef ECSYNCSETTINGS_INCLUDED
- #define ECSYNCSETTINGS_INCLUDED
- #include <mutex>
- #include <kopano/zcdefs.h>
- namespace KC {
- #define EC_SYNC_OPT_STREAM 1
- #define EC_SYNC_OPT_CHANGENOTIF 2
- #define EC_SYNC_OPT_STATECOLLECT 4
- #define EC_SYNC_OPT_CONTINUOUS 8
- #define EC_SYNC_OPT_ALL (EC_SYNC_OPT_STREAM | EC_SYNC_OPT_CHANGENOTIF | EC_SYNC_OPT_STATECOLLECT)
- class _kc_export ECSyncSettings _kc_final {
- public:
- static ECSyncSettings* GetInstance();
-
- bool SyncLogEnabled() const;
- ULONG SyncLogLevel() const;
- bool ContinuousLogging() const;
-
- bool SyncStreamEnabled() const;
- bool ChangeNotificationsEnabled() const;
- bool StateCollectorEnabled() const;
-
- ULONG StreamTimeout() const;
- ULONG StreamBufferSize() const;
- ULONG StreamBatchSize() const;
-
- bool EnableSyncLog(bool bEnable);
- ULONG SetSyncLogLevel(ULONG ulLogLevel);
- ULONG SetSyncOptions(ULONG ulOptions);
- ULONG SetStreamTimeout(ULONG ulTimeout);
- ULONG SetStreamBufferSize(ULONG ulBufferSize);
- ULONG SetStreamBatchSize(ULONG ulBatchSize);
- private:
- _kc_hidden ECSyncSettings(void);
- ULONG m_ulSyncLog = 0, m_ulSyncLogLevel;
- ULONG m_ulSyncOpts = EC_SYNC_OPT_ALL, m_ulStreamTimeout = 30000;
- ULONG m_ulStreamBufferSize = 131072, m_ulStreamBatchSize = 256;
- static std::mutex s_hMutex;
- static ECSyncSettings *s_lpInstance;
- struct _kc_hidden __initializer {
- ~__initializer();
- };
- static __initializer __i;
- };
- }
- #endif
|