--- smsdaemon/Plugin.h 2008/06/09 18:15:53 26 +++ smsdaemon/Plugin.h 2008/06/11 12:57:26 54 @@ -7,33 +7,37 @@ * Abstract parent class for a sms-daemon plugin. */ -#include "Sms.h" -class GsmModem; +class IGsmModem; +class SMS; class Plugin { public: + Plugin(std::string cmd, std::string desc); /* Called when a incomming sms triggers this plugin. * Use the conversation object to write the response. * Note: the plugin is responsible for parsing and validating the arguments, * and if necessary write a error message back to the user. */ - virtual void Execute(GsmModem& modem, SMS& sms) = 0; + virtual void Execute(IGsmModem& modem, SMS& sms) = 0; /* * returns the command that triggers this plugin, for example: "myplugin" */ - virtual std::string GetCommand() = 0; + virtual std::string GetCommand() {return _command;} /* * Returns a desciption of this plugin - displayed when somebody calls "help" */ - virtual std::string GetDescription() = 0; + virtual std::string GetDescription() {return _description;} virtual ~Plugin() {} +protected: + std::string _command; + std::string _description; };