X-Git-Url: https://git.syn-net.org/debian/?p=anytun.git;a=blobdiff_plain;f=src%2FsyncQueue.h;h=e5eb8d79b33e51d3d10f25ab250858d6126fad0a;hp=8da82b9aa41972e2c23fc673e07b03ec258fe82d;hb=ef0cacf2508418915d3f64b04003be3c13fed3cc;hpb=ece844834d2cecc028ce81ca283f5d441088580e diff --git a/src/syncQueue.h b/src/syncQueue.h index 8da82b9..e5eb8d7 100644 --- a/src/syncQueue.h +++ b/src/syncQueue.h @@ -11,7 +11,7 @@ * tunneling and relaying of packets of any protocol. * * - * Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl, + * Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl, * Christian Pointner * * This file is part of Anytun. @@ -45,28 +45,31 @@ class SyncQueue { public: - SyncQueue():syncServer_(NULL) {}; - ~SyncQueue() {}; + SyncQueue():syncServer_(NULL) {}; + ~SyncQueue() {}; static SyncQueue& instance(); - void setSyncServerPtr(SyncServer *); - void push(const std::string & ); - void push(const SyncCommand & ); - std::string pop(); - bool empty(); + void setSyncServerPtr(SyncServer*); + void push(const std::string&); + void push(const SyncCommand&); + std::string pop(); + bool empty(); private: static Mutex instMutex; - static SyncQueue* inst; - class instanceCleaner { - public: ~instanceCleaner() { - if(SyncQueue::inst != 0) - delete SyncQueue::inst; - } + static SyncQueue* inst; + class instanceCleaner + { + public: + ~instanceCleaner() { + if(SyncQueue::inst != 0) { + delete SyncQueue::inst; + } + } }; - SyncQueue(const SyncQueue &s); - void operator=(const SyncQueue &s); + SyncQueue(const SyncQueue& s); + void operator=(const SyncQueue& s); Mutex mutex_; - SyncServer * syncServer_; + SyncServer* syncServer_; }; extern SyncQueue& gSyncQueue;