Parent Directory | Revision Log
Added first basic edition of smsdaemon. So far sending & receiving sms works and a basic sample plugin is implemented.
1 | torben | 26 | #ifndef __COMMON_H__ |
2 | #define __COMMON_H__ | ||
3 | |||
4 | #include <string> | ||
5 | #define VERSION "smsdaemon v0.1 by Torben Nielsen\n" | ||
6 | |||
7 | |||
8 | #include "PluginManager.h" | ||
9 | #include "TaskManager.h" | ||
10 | |||
11 | //Singleton | ||
12 | class Common | ||
13 | { | ||
14 | public: | ||
15 | static Common* instance(); | ||
16 | |||
17 | bool isDaemon; | ||
18 | bool isDebug; | ||
19 | int uid; | ||
20 | int gid; | ||
21 | volatile bool mainContinue; | ||
22 | |||
23 | std::string pidfile; | ||
24 | std::string spooldir; | ||
25 | |||
26 | PluginManager pluginManager; | ||
27 | TaskManager taskManager; | ||
28 | |||
29 | |||
30 | void logMessage(std::string str); | ||
31 | void setLogfile(std::string file) {_logFile = file;} | ||
32 | |||
33 | void loadConfig(int argc, char* argv[]); | ||
34 | |||
35 | |||
36 | private: | ||
37 | Common() {} | ||
38 | Common(const Common&) {} | ||
39 | Common& operator=(const Common) {return *this;} | ||
40 | |||
41 | void printUsage(); | ||
42 | |||
43 | std::string _logFile; | ||
44 | }; | ||
45 | |||
46 | |||
47 | #endif //__COMMON_H__ |
ViewVC Help | |
Powered by ViewVC 1.1.20 |