/[projects]/smsdaemon/Common.h
ViewVC logotype

Diff of /smsdaemon/Common.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 36 by torben, Tue Jun 10 15:34:19 2008 UTC revision 217 by torben, Tue Dec 23 14:20:43 2008 UTC
# Line 2  Line 2 
2  #define __COMMON_H__  #define __COMMON_H__
3    
4  #include <string>  #include <string>
 #define VERSION "smsdaemon v0.1 by Torben Nielsen\n"  
   
   
 #include "PluginManager.h"  
 #include "TaskManager.h"  
5    
6  //time_t is defines as long int ! //No need to include time.h  //time_t is defines as long int ! //No need to include time.h
7    
# Line 28  public: Line 23  public:
23    
24          bool isDaemon;          bool isDaemon;
25          bool isDebug;          bool isDebug;
26            bool daemonized;
27          int uid;          int uid;
28          int gid;          int gid;
29          volatile bool mainContinue;          volatile bool mainContinue;
30            volatile bool reloadConfig;
31    
32            std::string configFilePath;
33    
34          std::string pidfile;          std::string pidfile;
35          std::string spooldir;          std::string spooldir;
36    
         PluginManager pluginManager;  
         TaskManager taskManager;  
37          long int daemonStart;          long int daemonStart;
38    
39    
40          SmsCounter smsCounter;          SmsCounter smsCounter;
41    
42          void logMessage(std::string str);          class PluginManager* GetPluginManager();
43          void setLogfile(std::string file) {_logFile = file;}          class TaskManager* GetTaskManager();
44            class ConfigFile* GetConfigfile();
45            void SetConfigfile(class ConfigFile*);
46    
47    
48          void loadConfig(int argc, char* argv[]);          void loadConfig(int argc, char* argv[]);
49    
50          std::string getStatusMessage();  
51            std::string getStatusMessage();
52  private:  private:
53          Common() {}          Common();
54          Common(const Common&) {}          Common(const Common&) {}
55          Common& operator=(const Common) {return *this;}          Common& operator=(const Common)
56            {
57                    return *this;
58            }
59            ~Common();
60    
61    
62    
63            class PluginManager* _pluginManager;
64            class TaskManager* _taskManager;
65            class ConfigFile* _configFile;
66    
67          void printUsage();          void printUsage();
68    
69          std::string _logFile;  
70  };  };
71    
72    

Legend:
Removed from v.36  
changed lines
  Added in v.217

  ViewVC Help
Powered by ViewVC 1.1.20