// Copyright (c) 2005-2007 Hartmut Kaiser // Copyright (c) 2005-2007 Andre Merzky (andre@merzky.net) // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef ADAPTORS_OPENCLOUD_JOB_SERVICE_HPP #define ADAPTORS_OPENCLOUD_JOB_SERVICE_HPP // stl includes #include #include // saga includes #include #include // saga engine includes #include // saga adaptor includes #include #include #include // saga package includes #include // adaptor includes #include "opencloud_job_adaptor.hpp" //////////////////////////////////////////////////////////////////////// namespace opencloud_job { class job_service_cpi_impl : public saga::adaptors::v1_0::job_service_cpi { private: typedef saga::adaptors::v1_0::job_service_cpi base_cpi; // adaptor data typedef saga::adaptors::adaptor_data adaptor_data_type; // saga context saga::context c_ ; // saga session saga::session s_ ; public: // constructor of the job_service cpi job_service_cpi_impl (proxy * p, cpi_info const & info, saga::ini::ini const & glob_ini, saga::ini::ini const & adap_ini, TR1::shared_ptr adaptor); // destructor of the job_service cpi ~job_service_cpi_impl (void); // CPI functions void sync_create_job (saga::job::job & ret, saga::job::description jd); void sync_run_job (saga::job::job & ret, std::string cmd, std::string host, saga::job::ostream & in, saga::job::istream & out, saga::job::istream & err); void sync_list (std::vector & ret); void sync_get_job (saga::job::job & ret, std::string jobid); void sync_get_self (saga::job::self & ret); // This adaptor implements the async functions // based on its own synchronous functions. saga::task async_create_job (saga::job::description jd); saga::task async_run_job (std::string cmd, std::string host, saga::job::ostream & in, saga::job::istream & out, saga::job::istream & err); saga::task async_list (void); saga::task async_get_job (std::string jobid); saga::task async_get_self (void); }; // class job_service_cpi_impl } // namespace opencloud_job //////////////////////////////////////////////////////////////////////// #endif // ADAPTORS_OPENCLOUD_JOB_SERVICE_HPP