1 |
#include "ShellExecPlugin.h" |
#include "ShellExecPlugin.h" |
2 |
#include "IGsmModem.h" |
#include "ISmsTransceiver.h" |
3 |
#include "Sms.h" |
#include "Sms.h" |
4 |
|
|
5 |
#include "util.h" |
#include "util.h" |
12 |
{ |
{ |
13 |
} |
} |
14 |
|
|
15 |
void ShellExecPlugin::Execute(IGsmModem& modem, SMS& sms) |
void ShellExecPlugin::Execute(ISmsTransceiver& modem, SMS& sms) |
16 |
{ |
{ |
17 |
std::string command = _exeCommand; |
std::string command = _exeCommand; |
18 |
|
|
19 |
if (_allowParameters) |
if (_allowParameters) |
20 |
{ |
{ |
21 |
std::string parameters = GetSmsData(sms); |
std::string parameters = sms.ExtractParameters(); |
22 |
|
|
23 |
parameters = Util::str_replace(parameters, "||"); |
parameters = Util::str_replace(parameters, "||"); |
24 |
parameters = Util::str_replace(parameters, "&&"); |
parameters = Util::str_replace(parameters, "&&"); |
48 |
message = "OK"; |
message = "OK"; |
49 |
} |
} |
50 |
|
|
51 |
modem.SendSms(sms.sender, message, false ); |
modem.SendSms(sms.GetSender(), message, false ); |
52 |
} |
} |