X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftask.h;h=183deee40e5c8d0b6b3b60455a2e3f14e933fdb5;hb=HEAD;hp=e7e37e3f04423d525afdf44e00a2e9c854c5c4b1;hpb=0aa50a0d3e5567e9295ecf4d7ba6d4b14fa73b9b;p=builder.git diff --git a/source/task.h b/source/task.h deleted file mode 100644 index e7e37e3..0000000 --- a/source/task.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef TASK_H_ -#define TASK_H_ - -#include -#include - -/** -Tasks are used to manage other programs and worker threads involved in the -build process. They are run asynchronously by default, but a wait() method is -provided should it be necessary to wait for a task to finish. -*/ -class Task -{ -public: - enum Status - { - RUNNING, - SUCCESS, - ERROR - }; - - sigc::signal signal_finished; - -protected: - Task() { } -public: - virtual ~Task() { } - - /** Returns the command being executed for this task. Only makes sense if - an external command is involved. */ - virtual std::string get_command() const = 0; - - /// Starts the task. - virtual void start() = 0; - - /// Checks the status of the task and immediately returns. - virtual Status check() = 0; - - /// Waits for the task to finish and returns its final status. - virtual Status wait() = 0; -}; - -#endif