/* * CheckResultsOperation.hpp * * Created on: Dec 11, 2011 * Author: heber */ #ifndef FRAGMENTCONTROLLER_CHECKRESULTSOPERATION_HPP_ #define FRAGMENTCONTROLLER_CHECKRESULTSOPERATION_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include "Connection.hpp" #include "Operations/AsyncOperation.hpp" /** This Operations requests number of present jobs and present results (done * jobs) from the server. * */ class CheckResultsOperation : public AsyncOperation { public: /// Constructor for class CheckResultsOperation. CheckResultsOperation(Connection &_connection) : AsyncOperation(std::string("checkresults"), _connection), jobInfo((size_t)2, 0) {} /// Destructor for class CheckResultsOperation ~CheckResultsOperation() {} public: // virtual function pointer to the connection handler virtual void handle_connect(const boost::system::error_code& e, boost::asio::ip::tcp::resolver::iterator endpoint_iterator); /// Callback function when doneJobs have been received. void handle_ReceiveJobInfo(const boost::system::error_code& e); /// Getter for presentJobs size_t getPresentJobs() const; /// Getter for doneJobs size_t getDoneJobs() const; protected: /// current jobs left to calculate and currently calculated results std::vector jobInfo; }; #endif /* FRAGMENTCONTROLLER_CHECKRESULTSOPERATION_HPP_ */