diff options
author | Othmar Gsenger <otti@anytun.org> | 2009-01-12 21:41:30 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2009-01-12 21:41:30 +0000 |
commit | 33cad772126bd4b87249a3798b43edda59396e89 (patch) | |
tree | 2cc7862d0f66f3dd270a2e52208f333e166a981a /src/syncQueue.h | |
parent | moved rtp stuff to anyrtpproxy and removed it from anytun (diff) |
fixed anytun-nosync build target
Diffstat (limited to 'src/syncQueue.h')
-rw-r--r-- | src/syncQueue.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/syncQueue.h b/src/syncQueue.h index f076b4a..5cb4f6e 100644 --- a/src/syncQueue.h +++ b/src/syncQueue.h @@ -46,7 +46,7 @@ class SyncQueue public: SyncQueue():syncServer_(NULL) {}; ~SyncQueue() {}; - + static SyncQueue& instance(); void setSyncServerPtr(SyncServer *); void push(const std::string & ); void push(const SyncCommand & ); @@ -54,10 +54,20 @@ public: bool empty(); private: + static Mutex instMutex; + static SyncQueue* inst; + class instanceCleaner { + public: ~instanceCleaner() { + if(SyncQueue::inst != 0) + delete SyncQueue::inst; + } + }; SyncQueue(const SyncQueue &s); void operator=(const SyncQueue &s); Mutex mutex_; SyncServer * syncServer_; }; +extern SyncQueue& gSyncQueue; + #endif |