--- smsdaemon/plugins/SpamPlugin.cpp 2008/06/11 08:25:34 44 +++ smsdaemon/plugins/SpamPlugin.cpp 2008/12/08 21:49:49 158 @@ -1,9 +1,11 @@ #include "SpamPlugin.h" -#include "GsmModem.h" +#include "ISmsTransceiver.h" +#include "Sms.h" -#include "util.h" -#include "common.h" +#include "Util.h" +#include "Logger.h" #include +#include using namespace std; @@ -16,14 +18,14 @@ const string USAGE = "Usage: spam message"; -void SpamPlugin::Execute(IGsmModem& modem, SMS& sms) +void SpamPlugin::Execute(ISmsTransceiver& modem, SMS& sms) { - string cmd = GetSmsData(sms); + string cmd = sms.ExtractParameters(); if (cmd == "") { - modem.SendSms(sms.sender, USAGE); + modem.SendSms(sms.GetSender(), USAGE, false); return; } @@ -32,7 +34,7 @@ if (parts.size() < 2 ) { - modem.SendSms(sms.sender, USAGE); + modem.SendSms(sms.GetSender(), USAGE, false); return; } @@ -43,7 +45,7 @@ ostringstream os; os << "Spamming " << nr << " " << count << " times."; - Common::instance()->logMessage(os.str()); + Logger::logMessage(os.str()); string message; for (unsigned i=2; i