Commit | Line | Data |
---|---|---|
c5db9dfd GMF |
1 | /* |
2 | The software in this package is distributed under the GNU General | |
3 | Public License version 2 (with a special exception described below). | |
4 | ||
5 | A copy of GNU General Public License (GPL) is included in this distribution, | |
6 | in the file COPYING.GPL. | |
7 | ||
8 | As a special exception, if other files instantiate templates or use macros | |
9 | or inline functions from this file, or you compile this file and link it | |
10 | with other works to produce a work based on this file, this file | |
11 | does not by itself cause the resulting work to be covered | |
12 | by the GNU General Public License. | |
13 | ||
14 | However the source code for this file must still be made available | |
15 | in accordance with section (3) of the GNU General Public License. | |
16 | ||
17 | This exception does not invalidate any other reasons why a work based | |
18 | on this file might be covered by the GNU General Public License. | |
19 | */ | |
20 | #ifndef STATUS_NOTIFIER_COMMAND_H | |
21 | #define STATUS_NOTIFIER_COMMAND_H | |
22 | ||
23 | #include <string> | |
24 | ||
25 | #include <boost/scoped_ptr.hpp> | |
26 | ||
27 | #define UNDER_TEST | |
28 | ||
29 | //----------------------------------------------------------------------------- | |
30 | // StatusNotifierCommand | |
31 | //----------------------------------------------------------------------------- | |
32 | ||
33 | /** | |
34 | * @brief This class provides methods to handle status-notifier-cmd | |
35 | * configuration. | |
36 | */ | |
37 | class StatusNotifierCommand | |
38 | { | |
39 | public: | |
40 | static const std::string StatusToken; | |
41 | ||
42 | public: | |
43 | explicit StatusNotifierCommand( const std::string &status_notifier_cmd ); | |
44 | virtual ~StatusNotifierCommand(); | |
45 | ||
46 | bool set_token_value( | |
47 | const std::string &token, | |
48 | const std::string &value | |
49 | ); | |
50 | std::string get_token_value() const; | |
51 | ||
52 | bool execute() const; | |
53 | }; | |
54 | ||
55 | //----------------------------------------------------------------------------- | |
56 | // StatusNotifierCommandItem | |
57 | //----------------------------------------------------------------------------- | |
58 | ||
59 | typedef boost::scoped_ptr<StatusNotifierCommand> StatusNotifierCommandItem; | |
60 | ||
61 | //----------------------------------------------------------------------------- | |
62 | ||
63 | const std::string StatusNotifierCommand::StatusToken("${status}"); | |
64 | ||
65 | //----------------------------------------------------------------------------- | |
66 | ||
67 | StatusNotifierCommand::StatusNotifierCommand( | |
68 | const std::string & | |
69 | ) | |
70 | { | |
71 | } | |
72 | ||
73 | StatusNotifierCommand::~StatusNotifierCommand() | |
74 | { | |
75 | } | |
76 | ||
77 | bool StatusNotifierCommand::set_token_value( | |
78 | const std::string &, | |
6c675e3a | 79 | const std::string & |
c5db9dfd GMF |
80 | ) |
81 | { | |
82 | return true; | |
83 | } | |
84 | ||
85 | std::string StatusNotifierCommand::get_token_value() const | |
86 | { | |
87 | return std::string(); | |
88 | } | |
89 | ||
90 | bool StatusNotifierCommand::execute() const | |
91 | { | |
92 | return true; | |
93 | } | |
94 | ||
95 | #endif // STATUS_NOTIFIER_COMMAND_H |