/[projects]/smsdaemon/SmsDaemon.cpp
ViewVC logotype

Diff of /smsdaemon/SmsDaemon.cpp

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

revision 88 by torben, Mon Jun 16 09:04:05 2008 UTC revision 92 by torben, Mon Jun 16 11:30:20 2008 UTC
# Line 12  Line 12 
12    
13  #include "util.h"  #include "util.h"
14    
15    #include "TaskManager.h"
16    #include "PluginManager.h"
17    
18  using namespace std;  using namespace std;
19    
20    
# Line 30  void SmsDaemon::CheckSms() Line 33  void SmsDaemon::CheckSms()
33  {  {
34          Common* cmn = Common::instance();          Common* cmn = Common::instance();
35    
36          PluginManager& manager = cmn->pluginManager;          PluginManager* manager = cmn->GetPluginManager();
37          vector<SMS> sms = _modem.ReadSms();          vector<SMS> sms = _modem.ReadSms();
38    
39          for (unsigned int i=0; i<sms.size(); ++i)          for (unsigned int i=0; i<sms.size(); ++i)
# Line 39  void SmsDaemon::CheckSms() Line 42  void SmsDaemon::CheckSms()
42                                                    
43                  cmd = Util::str_tolower(cmd);                  cmd = Util::str_tolower(cmd);
44    
45                  Plugin* pl = manager.GetPlugin(cmd);                  Plugin* pl = manager->GetPlugin(cmd);
46    
47                  CreateLogMessage(sms[i], pl != 0);                  CreateLogMessage(sms[i], pl != 0);
48    
# Line 71  void SmsDaemon::MainLoop() Line 74  void SmsDaemon::MainLoop()
74    
75                  CheckSms();                  CheckSms();
76    
77                  cmn->taskManager.ExecuteTasks();                  cmn->GetTaskManager()->ExecuteTasks(_modem);
78    
79                  if (cmn->isDebug && kbhit())                  if (cmn->isDebug && kbhit())
80                          break;                          break;
# Line 90  void SmsDaemon::Start() Line 93  void SmsDaemon::Start()
93    
94          cmn->logMessage("--------------------------------");          cmn->logMessage("--------------------------------");
95    
96          cmn->taskManager.LoadTasks();          cmn->GetTaskManager()->LoadTasks();
97          cmn->pluginManager.LoadPlugins();          cmn->GetPluginManager()->LoadPlugins();
98          cmn->logMessage("SMS daemon started");          cmn->logMessage("SMS daemon started");
99    
100          _modem.DeleteAllSms();          _modem.DeleteAllSms();

Legend:
Removed from v.88  
changed lines
  Added in v.92

  ViewVC Help
Powered by ViewVC 1.1.20