1 |
#include "ListPlugin.h" |
#include "ListPlugin.h" |
2 |
#include "IGsmModem.h" |
#include "ISmsTransceiver.h" |
3 |
#include "Sms.h" |
#include "Sms.h" |
4 |
#include "common.h" |
#include "common.h" |
5 |
#include "PluginManager.h" |
#include "PluginManager.h" |
9 |
{ |
{ |
10 |
} |
} |
11 |
|
|
12 |
void ListPlugin::Execute(IGsmModem& modem, SMS& sms) |
void ListPlugin::Execute(ISmsTransceiver& modem, SMS& sms) |
13 |
{ |
{ |
14 |
|
|
15 |
std::vector<Plugin*> plugins = Common::instance()->GetPluginManager()->GetPluginList(); |
std::vector<Plugin*> plugins = Common::instance()->GetPluginManager()->GetPluginList(); |
20 |
std::string reply = "Loaded plugins:\n"; |
std::string reply = "Loaded plugins:\n"; |
21 |
for (it = plugins.begin(); it != plugins.end(); ++it) |
for (it = plugins.begin(); it != plugins.end(); ++it) |
22 |
{ |
{ |
23 |
reply += (*it)->GetCommand() + " - " + (*it)->GetDescription() + "\n"; |
reply += (*it)->GetCommand() + "\n"; |
24 |
} |
} |
25 |
|
|
26 |
modem.SendSms(sms.sender, reply, true); |
modem.SendSms(sms.GetSender(), reply, true); |
27 |
} |
} |