#ifndef CHECKTASK_H #define CHECKTASK_H namespace icinga { enum CheckState { StateOK, StateWarning, StateCritical, StateUnreachable, StateUncheckable, StateUnknown }; struct CheckResult { time_t StartTime; time_t EndTime; CheckState State; string Output; Dictionary::Ptr PerformanceData; }; class I2_ICINGA_API CheckTask : public Object { public: typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; typedef function Factory; virtual void Execute(void) = 0; virtual bool IsFinished(void) const = 0; virtual CheckResult GetResult(void) = 0; static void RegisterType(string type, Factory factory); static CheckTask::Ptr CreateTask(const Service& service); private: static map m_Types; }; } #endif /* CHECKTASK_H */