/[projects]/smsdaemon/Plugin.h
ViewVC logotype

Annotation of /smsdaemon/Plugin.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 26 - (hide annotations) (download)
Mon Jun 9 18:15:53 2008 UTC (15 years, 11 months ago) by torben
File MIME type: text/plain
File size: 797 byte(s)
Added first basic edition of smsdaemon.

So far sending & receiving sms works and a basic sample plugin is implemented.

1 torben 26 #ifndef __PLUGIN_H__
2     #define __PLUGIN_H__
3    
4     #include <string>
5    
6     /*
7     * Abstract parent class for a sms-daemon plugin.
8     */
9    
10     #include "Sms.h"
11    
12     class GsmModem;
13    
14     class Plugin
15     {
16     public:
17    
18     /* Called when a incomming sms triggers this plugin.
19     * Use the conversation object to write the response.
20     * Note: the plugin is responsible for parsing and validating the arguments,
21     * and if necessary write a error message back to the user.
22     */
23     virtual void Execute(GsmModem& modem, SMS& sms) = 0;
24    
25     /*
26     * returns the command that triggers this plugin, for example: "myplugin"
27     */
28     virtual std::string GetCommand() = 0;
29    
30     /*
31     * Returns a desciption of this plugin - displayed when somebody calls "help"
32     */
33     virtual std::string GetDescription() = 0;
34    
35     virtual ~Plugin() {}
36    
37     };
38    
39    
40     #endif // __PLUGIN_H__

  ViewVC Help
Powered by ViewVC 1.1.20