* 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 <satp@wirdorange.org>
*
* This file is part of Anytun.
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;