-rw-r--r-- | src/process.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/process.h b/src/process.h new file mode 100644 index 0000000..b6d7091 --- a/dev/null +++ b/src/process.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef __PROCESS_H | ||
2 | #define __PROCESS_H | ||
3 | |||
4 | #include <string> | ||
5 | #include <map> | ||
6 | using namespace std; | ||
7 | |||
8 | class configuration; | ||
9 | |||
10 | typedef map<string,string> headers_t; | ||
11 | |||
12 | class process { | ||
13 | public: | ||
14 | string pidfile; | ||
15 | string restart_cmd; | ||
16 | string notify; | ||
17 | string user; | ||
18 | string group; | ||
19 | string chroot; | ||
20 | headers_t mailto_headers; | ||
21 | |||
22 | int patience; | ||
23 | |||
24 | process() | ||
25 | : patience(0) { } | ||
26 | |||
27 | void check(const string& id,configuration& config); | ||
28 | void launch(const string& id,configuration& config); | ||
29 | void do_notify(const string& id,const string& event,const string& description,configuration& config); | ||
30 | void notify_mailto(const string& email,const string& id,const string& event, | ||
31 | const string& description,configuration& config); | ||
32 | }; | ||
33 | |||
34 | typedef map<string,process> processes_t; | ||
35 | |||
36 | #endif /* __PROCESS_H */ | ||