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_implementation_version =
00050 "ImplementationVersion";
00051 char const* const service_description_interface_version =
00052 "InterfaceVersion";
00053 char const* const service_description_capability = "Capabilities";
00054 char const* const service_description_information_provider_url =
00055 "InformationServiceUrl";
00056 char const* const service_description_implementor = "Implementor";
00057
00058 }
00059
00061
00092 class SAGA_SD_PACKAGE_EXPORT service_description
00093 : public saga::object,
00094 public saga::detail::attribute<service_description>
00095 {
00096 protected:
00098
00099 TR1::shared_ptr <saga::impl::service_description> get_impl_sp(void) const;
00100 saga::impl::service_description* get_impl (void) const;
00102
00103 friend struct saga::detail::attribute<service_description>;
00104 friend class saga::impl::service_description;
00105 friend class saga::impl::discoverer_cpi_impl;
00106 friend class saga::impl::info_provider;
00107
00108 explicit service_description(saga::impl::service_description *impl);
00109 void set_session(boost::shared_ptr<saga::session> sess);
00110 void set_data(std::string data_key, std::string data_value);
00111
00112 using saga::detail::attribute<service_description>::set_attribute;
00113 using saga::detail::attribute<service_description>::set_vector_attribute;
00114
00115 public:
00119 service_description (saga::url loc);
00120 explicit service_description (saga::object const& o);
00121
00122 using saga::detail::attribute<service_description>::get_attribute;
00123 using saga::detail::attribute<service_description>::get_vector_attribute;
00124
00128 ~service_description (void) SAGA_THROW_SPEC(throw());
00129
00130
00131 service_description &operator= (saga::object const& o)
00132 SAGA_THROW_SPEC(throw());
00133
00134
00142 std::string get_url() SAGA_THROW_SPEC(throw());
00143
00167 std::vector<saga::sd::service_description> get_related_services()
00168 SAGA_THROW_SPEC(throw(saga::authorization_failed,
00169 saga::authentication_failed,
00170 saga::timeout,
00171 saga::no_success));
00172
00180 saga::sd::service_data &get_data() SAGA_THROW_SPEC(throw());
00181 };
00182 }
00183 }
00185
00186
00187 #if defined(BOOST_MSVC)
00188 #pragma warning(pop)
00189 #endif
00190
00191 #endif // !defined(SAGA_PACKAGES_SD_SERVICE_DESCRIPTION_HPP)
00192