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

Diff of /smsdaemon/Task.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 96 by torben, Mon Jun 16 14:04:19 2008 UTC revision 149 by torben, Sun Dec 7 20:58:41 2008 UTC
# Line 3  Line 3 
3    
4  #include <string>  #include <string>
5    
6  class IGsmModem;  class ISmsTransceiver;
7    
8  /* A Task is some piece of code that must be executed regularly, no matter whether  /* A Task is some piece of code that must be executed regularly, no matter whether
9   * the daemon has received any SMS.   * the daemon has received any SMS.
10   *   *
11   * Tasks exist in two flavours: normal and temporary.   * Tasks exist in two flavours: persistant and temporary.
12   *   *
13   * A normal task is one which lives throughout the execution of the smsdaemon instance.   * A persistant task is one which lives throughout the execution of the smsdaemon instance.
14   * A pointer to a normal tasks can be retrieved via TaskManager::GetTask(std::string name),   * A pointer to a persistant task can be retrieved via TaskManager::GetTask(std::string name),
15   * and thus it must have a unique name.   * and thus it must have a unique name.
16   *   *
17   * A temporary tasks is of a more short-lived nature. It behaves like a fire-and-forget piece of code.   * A temporary tasks is of a more short-lived nature. It behaves like a fire-and-forget piece of code.
# Line 30  public: Line 30  public:
30    
31          std::string GetName() {return _name;}          std::string GetName() {return _name;}
32                    
33          virtual void ExecuteTask(IGsmModem& modem) = 0;          virtual void ExecuteTask(ISmsTransceiver& modem) = 0;
34    
35          bool IsTemporary() { return _isTemporary; }              bool IsTemporary() { return _isTemporary; }    
36          bool IsFinished() { return _isFinished; }          bool IsFinished() { return _isFinished; }

Legend:
Removed from v.96  
changed lines
  Added in v.149

  ViewVC Help
Powered by ViewVC 1.1.20