7 |
* Abstract parent class for a sms-daemon plugin. |
* Abstract parent class for a sms-daemon plugin. |
8 |
*/ |
*/ |
9 |
|
|
|
#include "Sms.h" |
|
10 |
|
|
11 |
class GsmModem; |
class ISmsTransceiver; |
12 |
|
class SMS; |
13 |
|
|
14 |
class Plugin |
class Plugin |
15 |
{ |
{ |
21 |
* Note: the plugin is responsible for parsing and validating the arguments, |
* Note: the plugin is responsible for parsing and validating the arguments, |
22 |
* and if necessary write a error message back to the user. |
* and if necessary write a error message back to the user. |
23 |
*/ |
*/ |
24 |
virtual void Execute(GsmModem& modem, SMS& sms) = 0; |
virtual void Execute(ISmsTransceiver& modem, SMS& sms) = 0; |
25 |
|
|
26 |
/* |
/* |
27 |
* returns the command that triggers this plugin, for example: "myplugin" |
* returns the command that triggers this plugin, for example: "myplugin" |
33 |
*/ |
*/ |
34 |
virtual std::string GetDescription() {return _description;} |
virtual std::string GetDescription() {return _description;} |
35 |
|
|
36 |
|
|
37 |
|
/* |
38 |
|
* A helper plugin is not accessible to the client but can be used to build a proxy / decorater plugin |
39 |
|
*/ |
40 |
|
virtual bool IsHelper() {return false;} |
41 |
|
|
42 |
virtual ~Plugin() {} |
virtual ~Plugin() {} |
43 |
protected: |
protected: |
44 |
std::string _description; |
|
45 |
std::string _command; |
std::string _command; |
46 |
|
std::string _description; |
47 |
}; |
}; |
48 |
|
|
49 |
|
|