00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _StateManager_
00022 #define _StateManager_
00023
00024 #include <set>
00025 #include "qpid/sys/Monitor.h"
00026
00027 namespace qpid {
00028 namespace client {
00029
00031 class StateManager
00032 {
00033 int state;
00034 mutable sys::Monitor stateLock;
00035
00036 public:
00037 StateManager(int initial);
00038 void setState(int state);
00039 int getState() const ;
00040 void waitForStateChange(int current);
00041 void waitFor(std::set<int> states);
00042 void waitFor(int state);
00043 };
00044
00045 }}
00046
00047 #endif