Parent Directory | Revision Log
Loaded tasks should also be configurable
1 | #ifndef __MANAGER_H__ |
2 | #define __MANAGER_H__ |
3 | |
4 | #include <string> |
5 | #include <map> |
6 | #include <list> |
7 | |
8 | class Task; |
9 | |
10 | class ISmsTransceiver; |
11 | |
12 | class TaskManager |
13 | { |
14 | public: |
15 | TaskManager(); |
16 | ~TaskManager(); |
17 | |
18 | void ExecuteTasks(ISmsTransceiver& modem); |
19 | |
20 | void LoadTasks(); |
21 | void DestroyTasks(); |
22 | |
23 | void AddPersistantTask(Task* task); |
24 | void AddTemporaryTask(Task* task); |
25 | |
26 | Task* GetPersistantTask(const std::string& taskname); |
27 | |
28 | |
29 | private: |
30 | Task* CreateTask(const std::string& taskName, const std::map<std::string, std::string>& arguments); |
31 | |
32 | std::map<std::string, Task*> _persistant_tasks; |
33 | |
34 | std::list<Task*> _temp_tasks; |
35 | |
36 | int _lastExecuted; |
37 | }; |
38 | |
39 | #endif //__MANAGER_H__ |
ViewVC Help | |
Powered by ViewVC 1.1.20 |