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 #include <saga/saga/exception.hpp>
00012 #include <saga/saga/url.hpp>
00013
00014 #include <saga/saga/packages/sd/config.hpp>
00015
00016 #include <saga/saga/packages/sd/service_data.hpp>
00017
00019 namespace saga
00020 {
00021 namespace impl
00022 {
00023 class info_provider;
00024 class discoverer_cpi_impl;
00025 }
00026 }
00027
00028
00029 #if defined(BOOST_MSVC)
00030 #pragma warning(push)
00031 #pragma warning(disable: 4251 4231 4275 4660)
00032 #endif
00033
00034 namespace saga
00035 {
00036 namespace sd {
00037 namespace attributes
00038 {
00040
00041
00042 char const* const service_description_url = "Url";
00043 char const* const service_description_type = "Type";
00044 char const* const service_description_uid = "Uid";
00045 char const* const service_description_site = "Site";
00046 char const* const service_description_name = "Name";
00047 char const* const service_description_relatedservices = "RelatedServices";
00048 char const* const service_description_vo = "VO";
00049 char const* const service_description_information_provider_url =
00050 "InformationProviderUrl";
00051
00052 }
00053
00055
00086 class SAGA_SD_PACKAGE_EXPORT service_description
00087 : public saga::object,
00088 public saga::detail::attribute<service_description>
00089 {
00090 private:
00091 saga::sd::service_data data;
00092
00093
00094 protected:
00095 friend struct saga::detail::attribute<service_description>;
00096 friend class saga::impl::service_description;
00097 friend class saga::impl::discoverer_cpi_impl;
00098 friend class saga::impl::info_provider;
00099
00100 explicit service_description(saga::impl::service_description *impl);
00101 void set_session(const boost::shared_ptr<saga::session>);
00102 void set_data(std::string data_key, std::string data_value);
00103
00104 using saga::detail::attribute<service_description>::set_attribute;
00105 using saga::detail::attribute<service_description>::set_vector_attribute;
00106
00107 public:
00111 service_description (saga::url loc);
00112 explicit service_description (saga::object const& o);
00113
00114 using saga::detail::attribute<service_description>::get_attribute;
00115 using saga::detail::attribute<service_description>::get_vector_attribute;
00116
00120 ~service_description (void) SAGA_THROW_SPEC(throw());
00121
00122
00123 service_description &operator= (saga::object const& o)
00124 SAGA_THROW_SPEC(throw());
00125
00126
00134 std::string get_url() SAGA_THROW_SPEC(throw());
00135
00159 std::vector<saga::sd::service_description> get_related_services()
00160 SAGA_THROW_SPEC(throw(saga::authorization_failed,
00161 saga::authentication_failed,
00162 saga::timeout,
00163 saga::no_success));
00164
00172 saga::sd::service_data &get_data() SAGA_THROW_SPEC(throw());
00173 };
00174 }
00175 }
00177
00178
00179 #if defined(BOOST_MSVC)
00180 #pragma warning(pop)
00181 #endif
00182
00183 #endif // !defined(SAGA_PACKAGES_SD_SERVICE_DESCRIPTION_HPP)
00184