summaryrefslogtreecommitdiffabout
path: root/src/process.h
blob: b6d709124fc0f42fc02e479f2abbd125e06603f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef __PROCESS_H
#define __PROCESS_H

#include <string>
#include <map>
using namespace std;

class configuration;

typedef map<string,string> headers_t;

class process {
    public:
	string pidfile;
	string restart_cmd;
	string notify;
	string user;
	string group;
	string chroot;
	headers_t mailto_headers;

	int patience;

	process()
	    : patience(0) { }

	void check(const string& id,configuration& config);
	void launch(const string& id,configuration& config);
	void do_notify(const string& id,const string& event,const string& description,configuration& config);
	void notify_mailto(const string& email,const string& id,const string& event,
		const string& description,configuration& config);
};

typedef map<string,process> processes_t;

#endif /* __PROCESS_H */