00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef manager_h
00025 #define manager_h
00026
00027 #ifndef _REENTRANT
00028 #define _REENTRANT
00029 #endif
00030
00031 #include "config.h"
00032 #include "fab.h"
00033 #include "rock.h"
00034
00035 namespace karoo {
00036
00037 class manager_runner;
00038
00039 class manager : public rock
00040 {
00041 private:
00042 manager_runner* runner;
00043 text root;
00044 public:
00045 manager(const vector<text>& opts, int argc, char *argv[]);
00046 virtual ~manager();
00047
00048 bool startup(const text& url, int poll_delay, int retry_delay, int url_reload_frequency, time_t startup_time_allowance, time_t shutdown_time_allowance);
00049 bool sync(map<text,remote_rock*>& rocks, vector<remote_rock*>& rocks_arr);
00050
00051 static text getLocalIP();
00052 static text getIP(const char* name);
00053 text getRoot() const { return root; }
00054 void hangup();
00055 };
00056
00057 }
00058
00059 #include "manager_runner.h"
00060 #endif