5 |
#include <sstream> |
#include <sstream> |
6 |
#include <stdlib.h> |
#include <stdlib.h> |
7 |
|
|
8 |
#include "common.h" |
#include "Common.h" |
9 |
|
|
10 |
#include "ISmsTransceiver.h" |
#include "ISmsTransceiver.h" |
11 |
|
|
12 |
#include "Plugin.h" |
#include "Plugin.h" |
13 |
#include "kbhit.h" |
#include "kbhit.h" |
14 |
|
|
15 |
#include "util.h" |
#include "Util.h" |
16 |
|
|
17 |
#include "TaskManager.h" |
#include "TaskManager.h" |
18 |
#include "PluginManager.h" |
#include "PluginManager.h" |
52 |
for (unsigned int i=0; i<sms.size(); ++i) |
for (unsigned int i=0; i<sms.size(); ++i) |
53 |
{ |
{ |
54 |
string cmd = sms[i].ExtractCommand(); |
string cmd = sms[i].ExtractCommand(); |
55 |
|
|
56 |
cmd = Util::str_tolower(cmd); |
cmd = Util::str_tolower(cmd); |
57 |
|
|
58 |
Plugin* pl = manager->GetPlugin(cmd); |
Plugin* pl = manager->GetPlugin(cmd); |
68 |
_modem.SendSms(sms[i].GetSender(), "Unknown command!", false); |
_modem.SendSms(sms[i].GetSender(), "Unknown command!", false); |
69 |
} |
} |
70 |
|
|
|
_modem.DeleteSms(sms[i].GetIndex()); |
|
71 |
cmn->smsCounter.incomming++; |
cmn->smsCounter.incomming++; |
72 |
} |
} |
73 |
} |
} |
116 |
Logger::logMessage("SMS daemon started"); |
Logger::logMessage("SMS daemon started"); |
117 |
|
|
118 |
_modem.DeleteAllSms(); |
_modem.DeleteAllSms(); |
119 |
|
|
120 |
try |
try |
121 |
{ |
{ |
122 |
MainLoop(); |
MainLoop(); |