--- smsdaemon/Task.h 2008/12/07 20:58:41 149 +++ smsdaemon/Task.h 2008/12/18 06:53:29 196 @@ -7,19 +7,19 @@ /* A Task is some piece of code that must be executed regularly, no matter whether * the daemon has received any SMS. - * + * * Tasks exist in two flavours: persistant and temporary. * * A persistant task is one which lives throughout the execution of the smsdaemon instance. - * A pointer to a persistant task can be retrieved via TaskManager::GetTask(std::string name), + * A pointer to a persistant task can be retrieved via TaskManager::GetTask(std::string name), * and thus it must have a unique name. * * A temporary tasks is of a more short-lived nature. It behaves like a fire-and-forget piece of code. - * A temporary task can be created at any time by any piece of code. This creation must be dynamicaly + * A temporary task can be created at any time by any piece of code. This creation must be dynamicaly * through the new() operator. When created it registers itself with the task manager, and here after any * references to the task must be nulled. - * When the temporary task has done its work it must set the protected variale to true, and the - * task instance will here after be deleted by the task-manager. + * When the temporary task has done its work it must set the protected variale to true, and the + * task instance will here after be deleted by the task-manager. * Temporary tasks does not need a unique name, and once created you cannot get a pointer to it again. */ @@ -28,12 +28,21 @@ public: Task(std::string name, bool isTemporary); - std::string GetName() {return _name;} - + std::string GetName() + { + return _name; + } + virtual void ExecuteTask(ISmsTransceiver& modem) = 0; - bool IsTemporary() { return _isTemporary; } - bool IsFinished() { return _isFinished; } + bool IsTemporary() + { + return _isTemporary; + } + bool IsFinished() + { + return _isFinished; + } virtual ~Task() {} protected: