#ifndef __PLUGIN_H__ #define __PLUGIN_H__ #include /* * Abstract parent class for a sms-daemon plugin. */ 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(IGsmModem& modem, SMS& sms) = 0; /* * returns the command that triggers this plugin, for example: "myplugin" */ virtual std::string GetCommand() {return _command;} /* * Returns a desciption of this plugin - displayed when somebody calls "help" */ virtual std::string GetDescription() {return _description;} virtual ~Plugin() {} protected: std::string _command; std::string _description; }; #endif // __PLUGIN_H__