/[projects]/smsdaemon/plugins/ListPlugin.cpp
ViewVC logotype

Annotation of /smsdaemon/plugins/ListPlugin.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 196 - (hide annotations) (download)
Thu Dec 18 06:53:29 2008 UTC (15 years, 5 months ago) by torben
File size: 587 byte(s)
Make pretty

astyle -t -b -N

1 torben 118 #include "ListPlugin.h"
2 torben 149 #include "ISmsTransceiver.h"
3 torben 118 #include "Sms.h"
4 torben 158 #include "Common.h"
5 torben 118 #include "PluginManager.h"
6    
7     ListPlugin::ListPlugin()
8 torben 196 : Plugin("list", "return a list of all loaded plugins")
9 torben 118 {
10     }
11    
12 torben 149 void ListPlugin::Execute(ISmsTransceiver& modem, SMS& sms)
13 torben 118 {
14    
15     std::vector<Plugin*> plugins = Common::instance()->GetPluginManager()->GetPluginList();
16    
17     std::vector<Plugin*>::iterator it;
18    
19    
20     std::string reply = "Loaded plugins:\n";
21     for (it = plugins.begin(); it != plugins.end(); ++it)
22     {
23 torben 137 reply += (*it)->GetCommand() + "\n";
24 torben 118 }
25    
26 torben 142 modem.SendSms(sms.GetSender(), reply, true);
27 torben 118 }

  ViewVC Help
Powered by ViewVC 1.1.20