00001 #ifndef SAGA_PACKAGES_SD_SERVICE_DESCRIPTION_HPP
00002
00003 #define SAGA_PACKAGES_SD_SERVICE_DESCRIPTION_HPP
00004
00005 #include <saga/saga/util.hpp>
00006 #include <saga/saga/base.hpp>
00007 #include <saga/saga/types.hpp>
00008 #include <saga/saga/session.hpp>
00009 #include <saga/saga/call.hpp>
00010 #include <saga/saga/detail/attribute.hpp>
00011
00012 #include <saga/saga/packages/sd/config.hpp>
00013
00014 #include <saga/saga/packages/sd/service_data.hpp>
00015
00017 namespace glite_sd_adaptor {
00018 class info_provider;
00019 class discoverer_cpi_impl;
00020 }
00021
00022
00023 #if defined(BOOST_MSVC)
00024 #pragma warning(push)
00025 #pragma warning(disable: 4251 4231 4275 4660)
00026 #endif
00027
00028 namespace saga
00029 {
00030 namespace sd {
00031 namespace attributes
00032 {
00034
00035
00036 char const* const service_description_url = "Url";
00037 char const* const service_description_type = "Type";
00038 char const* const service_description_uid = "Uid";
00039 char const* const service_description_site = "Site";
00040 char const* const service_description_name = "Name";
00041 char const* const service_description_relatedservices = "Related_Services";
00042 char const* const service_description_vo = "VO";
00043
00044 }
00045
00047
00048 class SAGA_SD_PACKAGE_EXPORT service_description
00049 : public saga::object,
00050 public saga::detail::attribute<service_description>
00051 {
00052 private:
00053 saga::sd::service_data data;
00054 bool data_flag;
00055
00056 protected:
00057 friend struct saga::detail::attribute<service_description>;
00058 friend class saga::impl::service_description;
00059 friend class glite_sd_adaptor::discoverer_cpi_impl;
00060 friend class glite_sd_adaptor::info_provider;
00061
00062
00063
00064
00065
00066 explicit service_description(saga::impl::service_description *impl);
00067 void set_provider(const boost::shared_ptr<glite_sd_adaptor::info_provider>);
00068 void set_data(std::string data_key, std::string data_value);
00069 void set_data_flag(bool df);
00070
00071 using saga::detail::attribute<service_description>::set_attribute;
00072 using saga::detail::attribute<service_description>::set_vector_attribute;
00073
00074 public:
00075
00076 using saga::detail::attribute<service_description>::get_attribute;
00077 using saga::detail::attribute<service_description>::get_vector_attribute;
00078
00079 service_description (void);
00080 explicit service_description (saga::object const& o);
00081
00082 ~service_description (void);
00083
00084
00085 service_description &operator= (saga::object const& o);
00086
00087
00088 std::string get_url();
00089
00090 std::vector<saga::sd::service_description> get_related_services();
00091
00092 saga::sd::service_data &get_data();
00093 };
00094 }
00095 }
00097
00098
00099 #if defined(BOOST_MSVC)
00100 #pragma warning(pop)
00101 #endif
00102
00103 #endif // !defined(SAGA_PACKAGES_SD_SERVICE_DESCRIPTION_HPP)
00104