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_runner_h
00025 #define manager_runner_h
00026
00027 #ifndef _REENTRANT
00028 #define _REENTRANT
00029 #endif
00030
00031 #include "config.h"
00032 #include "fab.h"
00033 #include "queue.h"
00034 #include "util.h"
00035 #include "rock.h"
00036 #include <map>
00037 #include <vector>
00038 using std::map;
00039 using std::vector;
00040
00041 namespace karoo {
00042 class manager;
00043 class manager_runner : public pebble
00044 {
00045 private:
00046 manager* parent;
00047 text url;
00048 text localhost;
00049 int poll_delay;
00050 int retry_delay;
00051 int url_reload_frequency;
00052 int poll_count;
00053 time_t startup_time_allowance;
00054 time_t shutdown_time_allowance;
00055 map<text,remote_rock*> rocks;
00056 vector<remote_rock*> rocks_arr;
00057 karoo_mutex hup_mut;
00058 bool hup;
00059 public:
00060 manager_runner(manager* parent, const text& url, int poll_delay, int retry_delay, int url_reload_frequency, time_t startup_time_allowance, time_t shutdown_time_allowance);
00061 virtual ~manager_runner();
00062 void run();
00063 void traverse(fab& conf, nxml_data_t* node);
00064
00065 void hangup();
00066 };
00067
00068 }
00069
00070 #endif