1 |
#include "DelaySpamPlugin.h" |
#include "SpamPlugin.h" |
2 |
#include "ISmsTransceiver.h" |
#include "ISmsTransceiver.h" |
3 |
#include "Sms.h" |
#include "Sms.h" |
4 |
|
|
5 |
#include "tasks/DelaySpamTask.h" |
#include "tasks/SpamTask.h" |
6 |
#include "TaskManager.h" |
#include "TaskManager.h" |
7 |
|
|
8 |
#include "Common.h" |
#include "Common.h" |
19 |
|
|
20 |
const string USAGE = "Usage: delayspam <recipient> <nr> <interval> message"; |
const string USAGE = "Usage: delayspam <recipient> <nr> <interval> message"; |
21 |
|
|
22 |
DelaySpamPlugin::DelaySpamPlugin() |
SpamPlugin::SpamPlugin() |
23 |
: Plugin("delayspam", "Like spam plugin but with interval between transmitted SMS") |
: Plugin("delayspam", "Like spam plugin but with interval between transmitted SMS") |
24 |
{ |
{ |
25 |
} |
} |
26 |
|
|
27 |
void DelaySpamPlugin::Execute(ISmsTransceiver& modem, SMS& sms) |
void SpamPlugin::Execute(ISmsTransceiver& modem, SMS& sms) |
28 |
{ |
{ |
29 |
|
|
30 |
string cmd = sms.ExtractParameters(); |
string cmd = sms.ExtractParameters(); |
65 |
|
|
66 |
Logger::logMessage(os.str()); |
Logger::logMessage(os.str()); |
67 |
|
|
68 |
DelaySpamTask* task = new DelaySpamTask(); |
SpamTask* task = new SpamTask(); |
69 |
task->SetDestination( nr ); |
task->SetDestination( nr ); |
70 |
task->SetNumber( count ); |
task->SetNumber( count ); |
71 |
task->SetInterval( interval ); |
task->SetInterval( interval ); |