From cc49b6f53ae726d4e9b87ad9709e47d6f3e6fc9b Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 1 Aug 2017 13:28:41 +0200 Subject: [PATCH 01/17] add subscribe to conf event api --- coreapi/CMakeLists.txt | 11 +- coreapi/linphonecore.c | 12 + src/conference/conference-event-package.cpp | 101 + src/conference/conference-event-package.h | 51 + src/conference/conference-info.cxx | 9272 +++++++++++++++++++ src/conference/conference-info.hxx | 3862 ++++++++ src/conference/conference-info.xsd | 387 + src/conference/conference-listener.h | 41 + src/conference/xml.hxx | 503 + tester/CMakeLists.txt | 15 +- tester/confeventpackage_tester.cpp | 717 ++ tester/eventapi_tester.c | 6 +- tester/liblinphone_tester.h | 3 +- tester/tester.c | 2 +- 14 files changed, 14974 insertions(+), 9 deletions(-) create mode 100644 src/conference/conference-event-package.cpp create mode 100644 src/conference/conference-event-package.h create mode 100644 src/conference/conference-info.cxx create mode 100644 src/conference/conference-info.hxx create mode 100644 src/conference/conference-info.xsd create mode 100644 src/conference/conference-listener.h create mode 100644 src/conference/xml.hxx create mode 100644 tester/confeventpackage_tester.cpp diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index 4dd144b9d..b0747a5fd 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -38,6 +38,9 @@ set(LINPHONE_PRIVATE_HEADER_FILES ../src/object/object.h ../src/object/singleton.h ../src/utils/general.h + ../src/conference/conference-listener.h + ../src/conference/conference-event-package.h + ../src/conference/conference-info.hxx bellesip_sal/sal_impl.h carddav.h conference_private.h @@ -122,7 +125,12 @@ set(LINPHONE_SOURCE_FILES_C xmlrpc.c vtables.c ) -set(LINPHONE_SOURCE_FILES_CXX conference.cc) +set(LINPHONE_SOURCE_FILES_CXX + conference.cc + ../src/conference/conference-event-package.cpp + ../src/conference/conference-info.cxx +) +set(LINPHONE_INCLUDE_DIRS ${LINPHONE_INCLUDE_DIRS} /Users/reisbenjamin/xsd-4.0.0-i686-macosx/libxsd /usr/local/Cellar/xerces-c/3.1.4/include) if(ANDROID) list(APPEND LINPHONE_SOURCE_FILES_CXX linphonecore_jni.cc) set_source_files_properties(linphonecore_jni.cc PROPERTIES COMPILE_DEFINITIONS "USE_JAVAH") @@ -158,6 +166,7 @@ set(LIBS ${MEDIASTREAMER2_LIBRARIES} ${ORTP_LIBRARIES} ${XML2_LIBRARIES} + /usr/local/Cellar/xerces-c/3.1.4/lib/libxerces-c.dylib ) if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") list(APPEND LIBS "Ws2_32") diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 327ce21b2..07d215d8c 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -45,6 +45,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "mediastreamer2/msjpegwriter.h" #include "mediastreamer2/msogl.h" #include "mediastreamer2/msvolume.h" +#include "conference/conference-event-package.h" #ifdef INET6 #ifndef _WIN32 @@ -2115,12 +2116,23 @@ static void linphone_core_internal_notify_received(LinphoneCore *lc, LinphoneEve linphone_friend_list_notify_presence_received(list, lev, body); friendLists = friendLists->next; } + } else if (strcmp(notified_event, "Conference") == 0) { + LinphonePrivate::Conference::ConferenceEventPackage *cep = reinterpret_cast(linphone_event_get_user_data(lev)); + if(cep) { + ms_message("notify event for conference %s", cep->getConfId().c_str()); + cep->notifyReceived((char *) linphone_content_get_buffer(body)); + } } } static void linphone_core_internal_subscription_state_changed(LinphoneCore *lc, LinphoneEvent *lev, LinphoneSubscriptionState state) { if (strcasecmp(linphone_event_get_name(lev), "Presence") == 0) { linphone_friend_list_subscription_state_changed(lc, lev, state); + } else if (strcmp(linphone_event_get_name(lev), "Conference") == 0) { + LinphonePrivate::Conference::ConferenceEventPackage *cep = reinterpret_cast(linphone_event_get_user_data(lev)); + if(cep) { + + } } } diff --git a/src/conference/conference-event-package.cpp b/src/conference/conference-event-package.cpp new file mode 100644 index 000000000..41a2b26bf --- /dev/null +++ b/src/conference/conference-event-package.cpp @@ -0,0 +1,101 @@ +/* + * conference-event-package.cpp + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "conference-event-package.h" +#include "conference-info.hxx" +#include "private.h" + +using namespace std; +using namespace conference_info; +using namespace LinphonePrivate; + +class LinphonePrivate::Conference::ConferenceEventPackagePrivate : public ObjectPrivate { +public: + LinphoneCore *lc; + ConferenceListener *listener; + LinphoneAddress *confAddr; + string confId; + LinphoneEvent *lev; +}; + +Conference::ConferenceEventPackage::ConferenceEventPackage(LinphoneCore *lc, ConferenceListener *listener, LinphoneAddress *confAddr) : Object(new Conference::ConferenceEventPackagePrivate) { + L_D(ConferenceEventPackage); + xercesc::XMLPlatformUtils::Initialize(); + d->lc = lc; + d->listener = listener; + d->confAddr = confAddr; + linphone_address_ref(confAddr); + d->lev = NULL; +} + +Conference::ConferenceEventPackage::~ConferenceEventPackage() { + L_D(ConferenceEventPackage); + xercesc::XMLPlatformUtils::Terminate(); + linphone_address_unref(d->confAddr); + if(d->lev) linphone_event_unref(d->lev); +} + +void Conference::ConferenceEventPackage::subscribe(string confId) { + L_D(ConferenceEventPackage); + d->confId = confId; + d->lev = linphone_core_create_subscribe(d->lc, d->confAddr, "Conference", 600); + linphone_event_ref(d->lev); + linphone_event_set_internal(d->lev, TRUE); + linphone_event_set_user_data(d->lev, this); + linphone_event_add_custom_header(d->lev, "Conf-id", d->confId.c_str()); // TODO : ??? + linphone_event_send_subscribe(d->lev, NULL); +} + +void Conference::ConferenceEventPackage::unsubscribe() { + L_D(ConferenceEventPackage); + linphone_event_terminate(d->lev); +} + +void Conference::ConferenceEventPackage::notifyReceived(const char *xmlBody) { + L_D(ConferenceEventPackage); + istringstream data(xmlBody); + unique_ptr confInfo = parseConference_info(data, xml_schema::Flags::dont_validate); + if(strcmp(confInfo->getEntity().c_str(), linphone_address_as_string(d->confAddr)) == 0) { + for (const auto &user : confInfo->getUsers()->getUser()) { + LinphoneAddress *addr = linphone_core_interpret_url(d->lc, user.getEntity()->c_str()); + if(user.getState() == "deleted") { + d->listener->participantRemoved(addr); + } else { + bool isAdmin = false; + if(user.getRoles()) { + for (const auto &entry : user.getRoles()->getEntry()) { + if (entry == "admin") { + isAdmin = true; + break; + } + } + } + if(user.getState() == "full") { + d->listener->participantAdded(addr); + } + d->listener->participantSetAdmin(addr, isAdmin); + } + linphone_address_unref(addr); + } + } +} + +string Conference::ConferenceEventPackage::getConfId() { + L_D(ConferenceEventPackage); + return d->confId; +} diff --git a/src/conference/conference-event-package.h b/src/conference/conference-event-package.h new file mode 100644 index 000000000..3237cf41d --- /dev/null +++ b/src/conference/conference-event-package.h @@ -0,0 +1,51 @@ +/* + * conference-event-package.h + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _CONFERENCE_EVENT_PACKAGE_H_ +#define _CONFERENCE_EVENT_PACKAGE_H_ + +#include + +#include "object/object.h" +#include "conference-listener.h" +#include "linphone/core.h" + +namespace LinphonePrivate { + namespace Conference { + class ConferenceEventPackagePrivate; + + // ------------------------------------------------------------------------- + // ConferenceEventPackage. + // ------------------------------------------------------------------------- + class ConferenceEventPackage : public Object { + public: + ConferenceEventPackage(LinphoneCore *lc, ConferenceListener *listener, LinphoneAddress *confAddr); + ~ConferenceEventPackage(); + void subscribe(std::string confId); + void notifyReceived(const char *xmlBody); + void unsubscribe(); + std::string getConfId(); + + private: + L_DECLARE_PRIVATE(ConferenceEventPackage); + L_DISABLE_COPY(ConferenceEventPackage); + }; + } +} + +#endif // ifndef _CONFERENCE_EVENT_PACKAGE_H_ diff --git a/src/conference/conference-info.cxx b/src/conference/conference-info.cxx new file mode 100644 index 000000000..d43cb20d0 --- /dev/null +++ b/src/conference/conference-info.cxx @@ -0,0 +1,9272 @@ +// Copyright (c) 2005-2014 Code Synthesis Tools CC +// +// This program was generated by CodeSynthesis XSD, an XML Schema to +// C++ data binding compiler. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// In addition, as a special exception, Code Synthesis Tools CC gives +// permission to link this program with the Xerces-C++ library (or with +// modified versions of Xerces-C++ that use the same license as Xerces-C++), +// and distribute linked combinations including the two. You must obey +// the GNU General Public License version 2 in all respects for all of +// the code used other than Xerces-C++. If you modify this copy of the +// program, you may extend this exception to your version of the program, +// but you are not obligated to do so. If you do not wish to do so, delete +// this exception statement from your version. +// +// Furthermore, Code Synthesis Tools CC makes a special exception for +// the Free/Libre and Open Source Software (FLOSS) which is described +// in the accompanying FLOSSE file. +// + +// Begin prologue. +// +// +// End prologue. + +#include + +#include "conference-info.hxx" + +namespace conference_info +{ + // Conference_type + // + + const Conference_type::Conference_descriptionOptional& Conference_type:: + getConference_description () const + { + return this->conference_description_; + } + + Conference_type::Conference_descriptionOptional& Conference_type:: + getConference_description () + { + return this->conference_description_; + } + + void Conference_type:: + setConference_description (const Conference_descriptionType& x) + { + this->conference_description_.set (x); + } + + void Conference_type:: + setConference_description (const Conference_descriptionOptional& x) + { + this->conference_description_ = x; + } + + void Conference_type:: + setConference_description (::std::unique_ptr< Conference_descriptionType > x) + { + this->conference_description_.set (std::move (x)); + } + + const Conference_type::Host_infoOptional& Conference_type:: + getHost_info () const + { + return this->host_info_; + } + + Conference_type::Host_infoOptional& Conference_type:: + getHost_info () + { + return this->host_info_; + } + + void Conference_type:: + setHost_info (const Host_infoType& x) + { + this->host_info_.set (x); + } + + void Conference_type:: + setHost_info (const Host_infoOptional& x) + { + this->host_info_ = x; + } + + void Conference_type:: + setHost_info (::std::unique_ptr< Host_infoType > x) + { + this->host_info_.set (std::move (x)); + } + + const Conference_type::Conference_stateOptional& Conference_type:: + getConference_state () const + { + return this->conference_state_; + } + + Conference_type::Conference_stateOptional& Conference_type:: + getConference_state () + { + return this->conference_state_; + } + + void Conference_type:: + setConference_state (const Conference_stateType& x) + { + this->conference_state_.set (x); + } + + void Conference_type:: + setConference_state (const Conference_stateOptional& x) + { + this->conference_state_ = x; + } + + void Conference_type:: + setConference_state (::std::unique_ptr< Conference_stateType > x) + { + this->conference_state_.set (std::move (x)); + } + + const Conference_type::UsersOptional& Conference_type:: + getUsers () const + { + return this->users_; + } + + Conference_type::UsersOptional& Conference_type:: + getUsers () + { + return this->users_; + } + + void Conference_type:: + setUsers (const UsersType& x) + { + this->users_.set (x); + } + + void Conference_type:: + setUsers (const UsersOptional& x) + { + this->users_ = x; + } + + void Conference_type:: + setUsers (::std::unique_ptr< UsersType > x) + { + this->users_.set (std::move (x)); + } + + const Conference_type::Sidebars_by_refOptional& Conference_type:: + getSidebars_by_ref () const + { + return this->sidebars_by_ref_; + } + + Conference_type::Sidebars_by_refOptional& Conference_type:: + getSidebars_by_ref () + { + return this->sidebars_by_ref_; + } + + void Conference_type:: + setSidebars_by_ref (const Sidebars_by_refType& x) + { + this->sidebars_by_ref_.set (x); + } + + void Conference_type:: + setSidebars_by_ref (const Sidebars_by_refOptional& x) + { + this->sidebars_by_ref_ = x; + } + + void Conference_type:: + setSidebars_by_ref (::std::unique_ptr< Sidebars_by_refType > x) + { + this->sidebars_by_ref_.set (std::move (x)); + } + + const Conference_type::Sidebars_by_valOptional& Conference_type:: + getSidebars_by_val () const + { + return this->sidebars_by_val_; + } + + Conference_type::Sidebars_by_valOptional& Conference_type:: + getSidebars_by_val () + { + return this->sidebars_by_val_; + } + + void Conference_type:: + setSidebars_by_val (const Sidebars_by_valType& x) + { + this->sidebars_by_val_.set (x); + } + + void Conference_type:: + setSidebars_by_val (const Sidebars_by_valOptional& x) + { + this->sidebars_by_val_ = x; + } + + void Conference_type:: + setSidebars_by_val (::std::unique_ptr< Sidebars_by_valType > x) + { + this->sidebars_by_val_.set (std::move (x)); + } + + const Conference_type::AnySequence& Conference_type:: + getAny () const + { + return this->any_; + } + + Conference_type::AnySequence& Conference_type:: + getAny () + { + return this->any_; + } + + void Conference_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Conference_type::EntityType& Conference_type:: + getEntity () const + { + return this->entity_.get (); + } + + Conference_type::EntityType& Conference_type:: + getEntity () + { + return this->entity_.get (); + } + + void Conference_type:: + setEntity (const EntityType& x) + { + this->entity_.set (x); + } + + void Conference_type:: + setEntity (::std::unique_ptr< EntityType > x) + { + this->entity_.set (std::move (x)); + } + + ::std::unique_ptr< Conference_type::EntityType > Conference_type:: + detachEntity () + { + return this->entity_.detach (); + } + + const Conference_type::StateType& Conference_type:: + getState () const + { + return this->state_.get (); + } + + Conference_type::StateType& Conference_type:: + getState () + { + return this->state_.get (); + } + + void Conference_type:: + setState (const StateType& x) + { + this->state_.set (x); + } + + void Conference_type:: + setState (::std::unique_ptr< StateType > x) + { + this->state_.set (std::move (x)); + } + + ::std::unique_ptr< Conference_type::StateType > Conference_type:: + detachState () + { + return this->state_.detach (); + } + + const Conference_type::StateType& Conference_type:: + getStateDefaultValue () + { + return state_default_value_; + } + + const Conference_type::VersionOptional& Conference_type:: + getVersion () const + { + return this->version_; + } + + Conference_type::VersionOptional& Conference_type:: + getVersion () + { + return this->version_; + } + + void Conference_type:: + setVersion (const VersionType& x) + { + this->version_.set (x); + } + + void Conference_type:: + setVersion (const VersionOptional& x) + { + this->version_ = x; + } + + const Conference_type::AnyAttributeSet& Conference_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Conference_type::AnyAttributeSet& Conference_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Conference_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Conference_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Conference_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // State_type + // + + State_type:: + State_type (Value v) + : ::xml_schema::String (_xsd_State_type_literals_[v]) + { + } + + State_type:: + State_type (const char* v) + : ::xml_schema::String (v) + { + } + + State_type:: + State_type (const ::std::string& v) + : ::xml_schema::String (v) + { + } + + State_type:: + State_type (const ::xml_schema::String& v) + : ::xml_schema::String (v) + { + } + + State_type:: + State_type (const State_type& v, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (v, f, c) + { + } + + State_type& State_type:: + operator= (Value v) + { + static_cast< ::xml_schema::String& > (*this) = + ::xml_schema::String (_xsd_State_type_literals_[v]); + + return *this; + } + + + // Conference_description_type + // + + const Conference_description_type::Display_textOptional& Conference_description_type:: + getDisplay_text () const + { + return this->display_text_; + } + + Conference_description_type::Display_textOptional& Conference_description_type:: + getDisplay_text () + { + return this->display_text_; + } + + void Conference_description_type:: + setDisplay_text (const Display_textType& x) + { + this->display_text_.set (x); + } + + void Conference_description_type:: + setDisplay_text (const Display_textOptional& x) + { + this->display_text_ = x; + } + + void Conference_description_type:: + setDisplay_text (::std::unique_ptr< Display_textType > x) + { + this->display_text_.set (std::move (x)); + } + + const Conference_description_type::SubjectOptional& Conference_description_type:: + getSubject () const + { + return this->subject_; + } + + Conference_description_type::SubjectOptional& Conference_description_type:: + getSubject () + { + return this->subject_; + } + + void Conference_description_type:: + setSubject (const SubjectType& x) + { + this->subject_.set (x); + } + + void Conference_description_type:: + setSubject (const SubjectOptional& x) + { + this->subject_ = x; + } + + void Conference_description_type:: + setSubject (::std::unique_ptr< SubjectType > x) + { + this->subject_.set (std::move (x)); + } + + const Conference_description_type::Free_textOptional& Conference_description_type:: + getFree_text () const + { + return this->free_text_; + } + + Conference_description_type::Free_textOptional& Conference_description_type:: + getFree_text () + { + return this->free_text_; + } + + void Conference_description_type:: + setFree_text (const Free_textType& x) + { + this->free_text_.set (x); + } + + void Conference_description_type:: + setFree_text (const Free_textOptional& x) + { + this->free_text_ = x; + } + + void Conference_description_type:: + setFree_text (::std::unique_ptr< Free_textType > x) + { + this->free_text_.set (std::move (x)); + } + + const Conference_description_type::KeywordsOptional& Conference_description_type:: + getKeywords () const + { + return this->keywords_; + } + + Conference_description_type::KeywordsOptional& Conference_description_type:: + getKeywords () + { + return this->keywords_; + } + + void Conference_description_type:: + setKeywords (const KeywordsType& x) + { + this->keywords_.set (x); + } + + void Conference_description_type:: + setKeywords (const KeywordsOptional& x) + { + this->keywords_ = x; + } + + void Conference_description_type:: + setKeywords (::std::unique_ptr< KeywordsType > x) + { + this->keywords_.set (std::move (x)); + } + + const Conference_description_type::Conf_urisOptional& Conference_description_type:: + getConf_uris () const + { + return this->conf_uris_; + } + + Conference_description_type::Conf_urisOptional& Conference_description_type:: + getConf_uris () + { + return this->conf_uris_; + } + + void Conference_description_type:: + setConf_uris (const Conf_urisType& x) + { + this->conf_uris_.set (x); + } + + void Conference_description_type:: + setConf_uris (const Conf_urisOptional& x) + { + this->conf_uris_ = x; + } + + void Conference_description_type:: + setConf_uris (::std::unique_ptr< Conf_urisType > x) + { + this->conf_uris_.set (std::move (x)); + } + + const Conference_description_type::Service_urisOptional& Conference_description_type:: + getService_uris () const + { + return this->service_uris_; + } + + Conference_description_type::Service_urisOptional& Conference_description_type:: + getService_uris () + { + return this->service_uris_; + } + + void Conference_description_type:: + setService_uris (const Service_urisType& x) + { + this->service_uris_.set (x); + } + + void Conference_description_type:: + setService_uris (const Service_urisOptional& x) + { + this->service_uris_ = x; + } + + void Conference_description_type:: + setService_uris (::std::unique_ptr< Service_urisType > x) + { + this->service_uris_.set (std::move (x)); + } + + const Conference_description_type::Maximum_user_countOptional& Conference_description_type:: + getMaximum_user_count () const + { + return this->maximum_user_count_; + } + + Conference_description_type::Maximum_user_countOptional& Conference_description_type:: + getMaximum_user_count () + { + return this->maximum_user_count_; + } + + void Conference_description_type:: + setMaximum_user_count (const Maximum_user_countType& x) + { + this->maximum_user_count_.set (x); + } + + void Conference_description_type:: + setMaximum_user_count (const Maximum_user_countOptional& x) + { + this->maximum_user_count_ = x; + } + + const Conference_description_type::Available_mediaOptional& Conference_description_type:: + getAvailable_media () const + { + return this->available_media_; + } + + Conference_description_type::Available_mediaOptional& Conference_description_type:: + getAvailable_media () + { + return this->available_media_; + } + + void Conference_description_type:: + setAvailable_media (const Available_mediaType& x) + { + this->available_media_.set (x); + } + + void Conference_description_type:: + setAvailable_media (const Available_mediaOptional& x) + { + this->available_media_ = x; + } + + void Conference_description_type:: + setAvailable_media (::std::unique_ptr< Available_mediaType > x) + { + this->available_media_.set (std::move (x)); + } + + const Conference_description_type::AnySequence& Conference_description_type:: + getAny () const + { + return this->any_; + } + + Conference_description_type::AnySequence& Conference_description_type:: + getAny () + { + return this->any_; + } + + void Conference_description_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Conference_description_type::AnyAttributeSet& Conference_description_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Conference_description_type::AnyAttributeSet& Conference_description_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Conference_description_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Conference_description_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Conference_description_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Host_type + // + + const Host_type::Display_textOptional& Host_type:: + getDisplay_text () const + { + return this->display_text_; + } + + Host_type::Display_textOptional& Host_type:: + getDisplay_text () + { + return this->display_text_; + } + + void Host_type:: + setDisplay_text (const Display_textType& x) + { + this->display_text_.set (x); + } + + void Host_type:: + setDisplay_text (const Display_textOptional& x) + { + this->display_text_ = x; + } + + void Host_type:: + setDisplay_text (::std::unique_ptr< Display_textType > x) + { + this->display_text_.set (std::move (x)); + } + + const Host_type::Web_pageOptional& Host_type:: + getWeb_page () const + { + return this->web_page_; + } + + Host_type::Web_pageOptional& Host_type:: + getWeb_page () + { + return this->web_page_; + } + + void Host_type:: + setWeb_page (const Web_pageType& x) + { + this->web_page_.set (x); + } + + void Host_type:: + setWeb_page (const Web_pageOptional& x) + { + this->web_page_ = x; + } + + void Host_type:: + setWeb_page (::std::unique_ptr< Web_pageType > x) + { + this->web_page_.set (std::move (x)); + } + + const Host_type::UrisOptional& Host_type:: + getUris () const + { + return this->uris_; + } + + Host_type::UrisOptional& Host_type:: + getUris () + { + return this->uris_; + } + + void Host_type:: + setUris (const UrisType& x) + { + this->uris_.set (x); + } + + void Host_type:: + setUris (const UrisOptional& x) + { + this->uris_ = x; + } + + void Host_type:: + setUris (::std::unique_ptr< UrisType > x) + { + this->uris_.set (std::move (x)); + } + + const Host_type::AnySequence& Host_type:: + getAny () const + { + return this->any_; + } + + Host_type::AnySequence& Host_type:: + getAny () + { + return this->any_; + } + + void Host_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Host_type::AnyAttributeSet& Host_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Host_type::AnyAttributeSet& Host_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Host_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Host_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Host_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Conference_state_type + // + + const Conference_state_type::User_countOptional& Conference_state_type:: + getUser_count () const + { + return this->user_count_; + } + + Conference_state_type::User_countOptional& Conference_state_type:: + getUser_count () + { + return this->user_count_; + } + + void Conference_state_type:: + setUser_count (const User_countType& x) + { + this->user_count_.set (x); + } + + void Conference_state_type:: + setUser_count (const User_countOptional& x) + { + this->user_count_ = x; + } + + const Conference_state_type::ActiveOptional& Conference_state_type:: + getActive () const + { + return this->active_; + } + + Conference_state_type::ActiveOptional& Conference_state_type:: + getActive () + { + return this->active_; + } + + void Conference_state_type:: + setActive (const ActiveType& x) + { + this->active_.set (x); + } + + void Conference_state_type:: + setActive (const ActiveOptional& x) + { + this->active_ = x; + } + + const Conference_state_type::LockedOptional& Conference_state_type:: + getLocked () const + { + return this->locked_; + } + + Conference_state_type::LockedOptional& Conference_state_type:: + getLocked () + { + return this->locked_; + } + + void Conference_state_type:: + setLocked (const LockedType& x) + { + this->locked_.set (x); + } + + void Conference_state_type:: + setLocked (const LockedOptional& x) + { + this->locked_ = x; + } + + const Conference_state_type::AnySequence& Conference_state_type:: + getAny () const + { + return this->any_; + } + + Conference_state_type::AnySequence& Conference_state_type:: + getAny () + { + return this->any_; + } + + void Conference_state_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Conference_state_type::AnyAttributeSet& Conference_state_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Conference_state_type::AnyAttributeSet& Conference_state_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Conference_state_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Conference_state_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Conference_state_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Conference_media_type + // + + const Conference_media_type::EntrySequence& Conference_media_type:: + getEntry () const + { + return this->entry_; + } + + Conference_media_type::EntrySequence& Conference_media_type:: + getEntry () + { + return this->entry_; + } + + void Conference_media_type:: + setEntry (const EntrySequence& s) + { + this->entry_ = s; + } + + const Conference_media_type::AnyAttributeSet& Conference_media_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Conference_media_type::AnyAttributeSet& Conference_media_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Conference_media_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Conference_media_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Conference_media_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Conference_medium_type + // + + const Conference_medium_type::Display_textOptional& Conference_medium_type:: + getDisplay_text () const + { + return this->display_text_; + } + + Conference_medium_type::Display_textOptional& Conference_medium_type:: + getDisplay_text () + { + return this->display_text_; + } + + void Conference_medium_type:: + setDisplay_text (const Display_textType& x) + { + this->display_text_.set (x); + } + + void Conference_medium_type:: + setDisplay_text (const Display_textOptional& x) + { + this->display_text_ = x; + } + + void Conference_medium_type:: + setDisplay_text (::std::unique_ptr< Display_textType > x) + { + this->display_text_.set (std::move (x)); + } + + const Conference_medium_type::TypeType& Conference_medium_type:: + getType () const + { + return this->type_.get (); + } + + Conference_medium_type::TypeType& Conference_medium_type:: + getType () + { + return this->type_.get (); + } + + void Conference_medium_type:: + setType (const TypeType& x) + { + this->type_.set (x); + } + + void Conference_medium_type:: + setType (::std::unique_ptr< TypeType > x) + { + this->type_.set (std::move (x)); + } + + ::std::unique_ptr< Conference_medium_type::TypeType > Conference_medium_type:: + detachType () + { + return this->type_.detach (); + } + + const Conference_medium_type::StatusOptional& Conference_medium_type:: + getStatus () const + { + return this->status_; + } + + Conference_medium_type::StatusOptional& Conference_medium_type:: + getStatus () + { + return this->status_; + } + + void Conference_medium_type:: + setStatus (const StatusType& x) + { + this->status_.set (x); + } + + void Conference_medium_type:: + setStatus (const StatusOptional& x) + { + this->status_ = x; + } + + void Conference_medium_type:: + setStatus (::std::unique_ptr< StatusType > x) + { + this->status_.set (std::move (x)); + } + + const Conference_medium_type::AnySequence& Conference_medium_type:: + getAny () const + { + return this->any_; + } + + Conference_medium_type::AnySequence& Conference_medium_type:: + getAny () + { + return this->any_; + } + + void Conference_medium_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Conference_medium_type::LabelType& Conference_medium_type:: + getLabel () const + { + return this->label_.get (); + } + + Conference_medium_type::LabelType& Conference_medium_type:: + getLabel () + { + return this->label_.get (); + } + + void Conference_medium_type:: + setLabel (const LabelType& x) + { + this->label_.set (x); + } + + void Conference_medium_type:: + setLabel (::std::unique_ptr< LabelType > x) + { + this->label_.set (std::move (x)); + } + + ::std::unique_ptr< Conference_medium_type::LabelType > Conference_medium_type:: + detachLabel () + { + return this->label_.detach (); + } + + const Conference_medium_type::AnyAttributeSet& Conference_medium_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Conference_medium_type::AnyAttributeSet& Conference_medium_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Conference_medium_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Conference_medium_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Conference_medium_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Uris_type + // + + const Uris_type::EntrySequence& Uris_type:: + getEntry () const + { + return this->entry_; + } + + Uris_type::EntrySequence& Uris_type:: + getEntry () + { + return this->entry_; + } + + void Uris_type:: + setEntry (const EntrySequence& s) + { + this->entry_ = s; + } + + const Uris_type::StateType& Uris_type:: + getState () const + { + return this->state_.get (); + } + + Uris_type::StateType& Uris_type:: + getState () + { + return this->state_.get (); + } + + void Uris_type:: + setState (const StateType& x) + { + this->state_.set (x); + } + + void Uris_type:: + setState (::std::unique_ptr< StateType > x) + { + this->state_.set (std::move (x)); + } + + ::std::unique_ptr< Uris_type::StateType > Uris_type:: + detachState () + { + return this->state_.detach (); + } + + const Uris_type::StateType& Uris_type:: + getStateDefaultValue () + { + return state_default_value_; + } + + const Uris_type::AnyAttributeSet& Uris_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Uris_type::AnyAttributeSet& Uris_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Uris_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Uris_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Uris_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Uri_type + // + + const Uri_type::UriType& Uri_type:: + getUri () const + { + return this->uri_.get (); + } + + Uri_type::UriType& Uri_type:: + getUri () + { + return this->uri_.get (); + } + + void Uri_type:: + setUri (const UriType& x) + { + this->uri_.set (x); + } + + void Uri_type:: + setUri (::std::unique_ptr< UriType > x) + { + this->uri_.set (std::move (x)); + } + + ::std::unique_ptr< Uri_type::UriType > Uri_type:: + detachUri () + { + return this->uri_.detach (); + } + + const Uri_type::Display_textOptional& Uri_type:: + getDisplay_text () const + { + return this->display_text_; + } + + Uri_type::Display_textOptional& Uri_type:: + getDisplay_text () + { + return this->display_text_; + } + + void Uri_type:: + setDisplay_text (const Display_textType& x) + { + this->display_text_.set (x); + } + + void Uri_type:: + setDisplay_text (const Display_textOptional& x) + { + this->display_text_ = x; + } + + void Uri_type:: + setDisplay_text (::std::unique_ptr< Display_textType > x) + { + this->display_text_.set (std::move (x)); + } + + const Uri_type::PurposeOptional& Uri_type:: + getPurpose () const + { + return this->purpose_; + } + + Uri_type::PurposeOptional& Uri_type:: + getPurpose () + { + return this->purpose_; + } + + void Uri_type:: + setPurpose (const PurposeType& x) + { + this->purpose_.set (x); + } + + void Uri_type:: + setPurpose (const PurposeOptional& x) + { + this->purpose_ = x; + } + + void Uri_type:: + setPurpose (::std::unique_ptr< PurposeType > x) + { + this->purpose_.set (std::move (x)); + } + + const Uri_type::ModifiedOptional& Uri_type:: + getModified () const + { + return this->modified_; + } + + Uri_type::ModifiedOptional& Uri_type:: + getModified () + { + return this->modified_; + } + + void Uri_type:: + setModified (const ModifiedType& x) + { + this->modified_.set (x); + } + + void Uri_type:: + setModified (const ModifiedOptional& x) + { + this->modified_ = x; + } + + void Uri_type:: + setModified (::std::unique_ptr< ModifiedType > x) + { + this->modified_.set (std::move (x)); + } + + const Uri_type::AnySequence& Uri_type:: + getAny () const + { + return this->any_; + } + + Uri_type::AnySequence& Uri_type:: + getAny () + { + return this->any_; + } + + void Uri_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Uri_type::AnyAttributeSet& Uri_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Uri_type::AnyAttributeSet& Uri_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Uri_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Uri_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Uri_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Keywords_type + // + + Keywords_type:: + Keywords_type () + : ::xsd::cxx::tree::list< ::xml_schema::String, char > (this) + { + } + + Keywords_type:: + Keywords_type (size_type n, const ::xml_schema::String& x) + : ::xsd::cxx::tree::list< ::xml_schema::String, char > (n, x, this) + { + } + + Keywords_type:: + Keywords_type (const Keywords_type& o, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::SimpleType (o, f, c), + ::xsd::cxx::tree::list< ::xml_schema::String, char > (o, f, this) + { + } + + // Users_type + // + + const Users_type::UserSequence& Users_type:: + getUser () const + { + return this->user_; + } + + Users_type::UserSequence& Users_type:: + getUser () + { + return this->user_; + } + + void Users_type:: + setUser (const UserSequence& s) + { + this->user_ = s; + } + + const Users_type::AnySequence& Users_type:: + getAny () const + { + return this->any_; + } + + Users_type::AnySequence& Users_type:: + getAny () + { + return this->any_; + } + + void Users_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Users_type::StateType& Users_type:: + getState () const + { + return this->state_.get (); + } + + Users_type::StateType& Users_type:: + getState () + { + return this->state_.get (); + } + + void Users_type:: + setState (const StateType& x) + { + this->state_.set (x); + } + + void Users_type:: + setState (::std::unique_ptr< StateType > x) + { + this->state_.set (std::move (x)); + } + + ::std::unique_ptr< Users_type::StateType > Users_type:: + detachState () + { + return this->state_.detach (); + } + + const Users_type::StateType& Users_type:: + getStateDefaultValue () + { + return state_default_value_; + } + + const Users_type::AnyAttributeSet& Users_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Users_type::AnyAttributeSet& Users_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Users_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Users_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Users_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // User_type + // + + const User_type::Display_textOptional& User_type:: + getDisplay_text () const + { + return this->display_text_; + } + + User_type::Display_textOptional& User_type:: + getDisplay_text () + { + return this->display_text_; + } + + void User_type:: + setDisplay_text (const Display_textType& x) + { + this->display_text_.set (x); + } + + void User_type:: + setDisplay_text (const Display_textOptional& x) + { + this->display_text_ = x; + } + + void User_type:: + setDisplay_text (::std::unique_ptr< Display_textType > x) + { + this->display_text_.set (std::move (x)); + } + + const User_type::Associated_aorsOptional& User_type:: + getAssociated_aors () const + { + return this->associated_aors_; + } + + User_type::Associated_aorsOptional& User_type:: + getAssociated_aors () + { + return this->associated_aors_; + } + + void User_type:: + setAssociated_aors (const Associated_aorsType& x) + { + this->associated_aors_.set (x); + } + + void User_type:: + setAssociated_aors (const Associated_aorsOptional& x) + { + this->associated_aors_ = x; + } + + void User_type:: + setAssociated_aors (::std::unique_ptr< Associated_aorsType > x) + { + this->associated_aors_.set (std::move (x)); + } + + const User_type::RolesOptional& User_type:: + getRoles () const + { + return this->roles_; + } + + User_type::RolesOptional& User_type:: + getRoles () + { + return this->roles_; + } + + void User_type:: + setRoles (const RolesType& x) + { + this->roles_.set (x); + } + + void User_type:: + setRoles (const RolesOptional& x) + { + this->roles_ = x; + } + + void User_type:: + setRoles (::std::unique_ptr< RolesType > x) + { + this->roles_.set (std::move (x)); + } + + const User_type::LanguagesOptional& User_type:: + getLanguages () const + { + return this->languages_; + } + + User_type::LanguagesOptional& User_type:: + getLanguages () + { + return this->languages_; + } + + void User_type:: + setLanguages (const LanguagesType& x) + { + this->languages_.set (x); + } + + void User_type:: + setLanguages (const LanguagesOptional& x) + { + this->languages_ = x; + } + + void User_type:: + setLanguages (::std::unique_ptr< LanguagesType > x) + { + this->languages_.set (std::move (x)); + } + + const User_type::Cascaded_focusOptional& User_type:: + getCascaded_focus () const + { + return this->cascaded_focus_; + } + + User_type::Cascaded_focusOptional& User_type:: + getCascaded_focus () + { + return this->cascaded_focus_; + } + + void User_type:: + setCascaded_focus (const Cascaded_focusType& x) + { + this->cascaded_focus_.set (x); + } + + void User_type:: + setCascaded_focus (const Cascaded_focusOptional& x) + { + this->cascaded_focus_ = x; + } + + void User_type:: + setCascaded_focus (::std::unique_ptr< Cascaded_focusType > x) + { + this->cascaded_focus_.set (std::move (x)); + } + + const User_type::EndpointSequence& User_type:: + getEndpoint () const + { + return this->endpoint_; + } + + User_type::EndpointSequence& User_type:: + getEndpoint () + { + return this->endpoint_; + } + + void User_type:: + setEndpoint (const EndpointSequence& s) + { + this->endpoint_ = s; + } + + const User_type::AnySequence& User_type:: + getAny () const + { + return this->any_; + } + + User_type::AnySequence& User_type:: + getAny () + { + return this->any_; + } + + void User_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const User_type::EntityOptional& User_type:: + getEntity () const + { + return this->entity_; + } + + User_type::EntityOptional& User_type:: + getEntity () + { + return this->entity_; + } + + void User_type:: + setEntity (const EntityType& x) + { + this->entity_.set (x); + } + + void User_type:: + setEntity (const EntityOptional& x) + { + this->entity_ = x; + } + + void User_type:: + setEntity (::std::unique_ptr< EntityType > x) + { + this->entity_.set (std::move (x)); + } + + const User_type::StateType& User_type:: + getState () const + { + return this->state_.get (); + } + + User_type::StateType& User_type:: + getState () + { + return this->state_.get (); + } + + void User_type:: + setState (const StateType& x) + { + this->state_.set (x); + } + + void User_type:: + setState (::std::unique_ptr< StateType > x) + { + this->state_.set (std::move (x)); + } + + ::std::unique_ptr< User_type::StateType > User_type:: + detachState () + { + return this->state_.detach (); + } + + const User_type::StateType& User_type:: + getStateDefaultValue () + { + return state_default_value_; + } + + const User_type::AnyAttributeSet& User_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + User_type::AnyAttributeSet& User_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void User_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& User_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& User_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // User_roles_type + // + + const User_roles_type::EntrySequence& User_roles_type:: + getEntry () const + { + return this->entry_; + } + + User_roles_type::EntrySequence& User_roles_type:: + getEntry () + { + return this->entry_; + } + + void User_roles_type:: + setEntry (const EntrySequence& s) + { + this->entry_ = s; + } + + const User_roles_type::AnyAttributeSet& User_roles_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + User_roles_type::AnyAttributeSet& User_roles_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void User_roles_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& User_roles_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& User_roles_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // User_languages_type + // + + User_languages_type:: + User_languages_type () + : ::xsd::cxx::tree::list< ::xml_schema::Language, char > (this) + { + } + + User_languages_type:: + User_languages_type (size_type n, const ::xml_schema::Language& x) + : ::xsd::cxx::tree::list< ::xml_schema::Language, char > (n, x, this) + { + } + + User_languages_type:: + User_languages_type (const User_languages_type& o, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::SimpleType (o, f, c), + ::xsd::cxx::tree::list< ::xml_schema::Language, char > (o, f, this) + { + } + + // Endpoint_type + // + + const Endpoint_type::Display_textOptional& Endpoint_type:: + getDisplay_text () const + { + return this->display_text_; + } + + Endpoint_type::Display_textOptional& Endpoint_type:: + getDisplay_text () + { + return this->display_text_; + } + + void Endpoint_type:: + setDisplay_text (const Display_textType& x) + { + this->display_text_.set (x); + } + + void Endpoint_type:: + setDisplay_text (const Display_textOptional& x) + { + this->display_text_ = x; + } + + void Endpoint_type:: + setDisplay_text (::std::unique_ptr< Display_textType > x) + { + this->display_text_.set (std::move (x)); + } + + const Endpoint_type::ReferredOptional& Endpoint_type:: + getReferred () const + { + return this->referred_; + } + + Endpoint_type::ReferredOptional& Endpoint_type:: + getReferred () + { + return this->referred_; + } + + void Endpoint_type:: + setReferred (const ReferredType& x) + { + this->referred_.set (x); + } + + void Endpoint_type:: + setReferred (const ReferredOptional& x) + { + this->referred_ = x; + } + + void Endpoint_type:: + setReferred (::std::unique_ptr< ReferredType > x) + { + this->referred_.set (std::move (x)); + } + + const Endpoint_type::StatusOptional& Endpoint_type:: + getStatus () const + { + return this->status_; + } + + Endpoint_type::StatusOptional& Endpoint_type:: + getStatus () + { + return this->status_; + } + + void Endpoint_type:: + setStatus (const StatusType& x) + { + this->status_.set (x); + } + + void Endpoint_type:: + setStatus (const StatusOptional& x) + { + this->status_ = x; + } + + void Endpoint_type:: + setStatus (::std::unique_ptr< StatusType > x) + { + this->status_.set (std::move (x)); + } + + const Endpoint_type::Joining_methodOptional& Endpoint_type:: + getJoining_method () const + { + return this->joining_method_; + } + + Endpoint_type::Joining_methodOptional& Endpoint_type:: + getJoining_method () + { + return this->joining_method_; + } + + void Endpoint_type:: + setJoining_method (const Joining_methodType& x) + { + this->joining_method_.set (x); + } + + void Endpoint_type:: + setJoining_method (const Joining_methodOptional& x) + { + this->joining_method_ = x; + } + + void Endpoint_type:: + setJoining_method (::std::unique_ptr< Joining_methodType > x) + { + this->joining_method_.set (std::move (x)); + } + + const Endpoint_type::Joining_infoOptional& Endpoint_type:: + getJoining_info () const + { + return this->joining_info_; + } + + Endpoint_type::Joining_infoOptional& Endpoint_type:: + getJoining_info () + { + return this->joining_info_; + } + + void Endpoint_type:: + setJoining_info (const Joining_infoType& x) + { + this->joining_info_.set (x); + } + + void Endpoint_type:: + setJoining_info (const Joining_infoOptional& x) + { + this->joining_info_ = x; + } + + void Endpoint_type:: + setJoining_info (::std::unique_ptr< Joining_infoType > x) + { + this->joining_info_.set (std::move (x)); + } + + const Endpoint_type::Disconnection_methodOptional& Endpoint_type:: + getDisconnection_method () const + { + return this->disconnection_method_; + } + + Endpoint_type::Disconnection_methodOptional& Endpoint_type:: + getDisconnection_method () + { + return this->disconnection_method_; + } + + void Endpoint_type:: + setDisconnection_method (const Disconnection_methodType& x) + { + this->disconnection_method_.set (x); + } + + void Endpoint_type:: + setDisconnection_method (const Disconnection_methodOptional& x) + { + this->disconnection_method_ = x; + } + + void Endpoint_type:: + setDisconnection_method (::std::unique_ptr< Disconnection_methodType > x) + { + this->disconnection_method_.set (std::move (x)); + } + + const Endpoint_type::Disconnection_infoOptional& Endpoint_type:: + getDisconnection_info () const + { + return this->disconnection_info_; + } + + Endpoint_type::Disconnection_infoOptional& Endpoint_type:: + getDisconnection_info () + { + return this->disconnection_info_; + } + + void Endpoint_type:: + setDisconnection_info (const Disconnection_infoType& x) + { + this->disconnection_info_.set (x); + } + + void Endpoint_type:: + setDisconnection_info (const Disconnection_infoOptional& x) + { + this->disconnection_info_ = x; + } + + void Endpoint_type:: + setDisconnection_info (::std::unique_ptr< Disconnection_infoType > x) + { + this->disconnection_info_.set (std::move (x)); + } + + const Endpoint_type::MediaSequence& Endpoint_type:: + getMedia () const + { + return this->media_; + } + + Endpoint_type::MediaSequence& Endpoint_type:: + getMedia () + { + return this->media_; + } + + void Endpoint_type:: + setMedia (const MediaSequence& s) + { + this->media_ = s; + } + + const Endpoint_type::Call_infoOptional& Endpoint_type:: + getCall_info () const + { + return this->call_info_; + } + + Endpoint_type::Call_infoOptional& Endpoint_type:: + getCall_info () + { + return this->call_info_; + } + + void Endpoint_type:: + setCall_info (const Call_infoType& x) + { + this->call_info_.set (x); + } + + void Endpoint_type:: + setCall_info (const Call_infoOptional& x) + { + this->call_info_ = x; + } + + void Endpoint_type:: + setCall_info (::std::unique_ptr< Call_infoType > x) + { + this->call_info_.set (std::move (x)); + } + + const Endpoint_type::AnySequence& Endpoint_type:: + getAny () const + { + return this->any_; + } + + Endpoint_type::AnySequence& Endpoint_type:: + getAny () + { + return this->any_; + } + + void Endpoint_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Endpoint_type::EntityOptional& Endpoint_type:: + getEntity () const + { + return this->entity_; + } + + Endpoint_type::EntityOptional& Endpoint_type:: + getEntity () + { + return this->entity_; + } + + void Endpoint_type:: + setEntity (const EntityType& x) + { + this->entity_.set (x); + } + + void Endpoint_type:: + setEntity (const EntityOptional& x) + { + this->entity_ = x; + } + + void Endpoint_type:: + setEntity (::std::unique_ptr< EntityType > x) + { + this->entity_.set (std::move (x)); + } + + const Endpoint_type::StateType& Endpoint_type:: + getState () const + { + return this->state_.get (); + } + + Endpoint_type::StateType& Endpoint_type:: + getState () + { + return this->state_.get (); + } + + void Endpoint_type:: + setState (const StateType& x) + { + this->state_.set (x); + } + + void Endpoint_type:: + setState (::std::unique_ptr< StateType > x) + { + this->state_.set (std::move (x)); + } + + ::std::unique_ptr< Endpoint_type::StateType > Endpoint_type:: + detachState () + { + return this->state_.detach (); + } + + const Endpoint_type::StateType& Endpoint_type:: + getStateDefaultValue () + { + return state_default_value_; + } + + const Endpoint_type::AnyAttributeSet& Endpoint_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Endpoint_type::AnyAttributeSet& Endpoint_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Endpoint_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Endpoint_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Endpoint_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Endpoint_status_type + // + + Endpoint_status_type:: + Endpoint_status_type (Value v) + : ::xml_schema::String (_xsd_Endpoint_status_type_literals_[v]) + { + } + + Endpoint_status_type:: + Endpoint_status_type (const char* v) + : ::xml_schema::String (v) + { + } + + Endpoint_status_type:: + Endpoint_status_type (const ::std::string& v) + : ::xml_schema::String (v) + { + } + + Endpoint_status_type:: + Endpoint_status_type (const ::xml_schema::String& v) + : ::xml_schema::String (v) + { + } + + Endpoint_status_type:: + Endpoint_status_type (const Endpoint_status_type& v, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (v, f, c) + { + } + + Endpoint_status_type& Endpoint_status_type:: + operator= (Value v) + { + static_cast< ::xml_schema::String& > (*this) = + ::xml_schema::String (_xsd_Endpoint_status_type_literals_[v]); + + return *this; + } + + + // Joining_type + // + + Joining_type:: + Joining_type (Value v) + : ::xml_schema::String (_xsd_Joining_type_literals_[v]) + { + } + + Joining_type:: + Joining_type (const char* v) + : ::xml_schema::String (v) + { + } + + Joining_type:: + Joining_type (const ::std::string& v) + : ::xml_schema::String (v) + { + } + + Joining_type:: + Joining_type (const ::xml_schema::String& v) + : ::xml_schema::String (v) + { + } + + Joining_type:: + Joining_type (const Joining_type& v, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (v, f, c) + { + } + + Joining_type& Joining_type:: + operator= (Value v) + { + static_cast< ::xml_schema::String& > (*this) = + ::xml_schema::String (_xsd_Joining_type_literals_[v]); + + return *this; + } + + + // Disconnection_type + // + + Disconnection_type:: + Disconnection_type (Value v) + : ::xml_schema::String (_xsd_Disconnection_type_literals_[v]) + { + } + + Disconnection_type:: + Disconnection_type (const char* v) + : ::xml_schema::String (v) + { + } + + Disconnection_type:: + Disconnection_type (const ::std::string& v) + : ::xml_schema::String (v) + { + } + + Disconnection_type:: + Disconnection_type (const ::xml_schema::String& v) + : ::xml_schema::String (v) + { + } + + Disconnection_type:: + Disconnection_type (const Disconnection_type& v, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (v, f, c) + { + } + + Disconnection_type& Disconnection_type:: + operator= (Value v) + { + static_cast< ::xml_schema::String& > (*this) = + ::xml_schema::String (_xsd_Disconnection_type_literals_[v]); + + return *this; + } + + + // Execution_type + // + + const Execution_type::WhenOptional& Execution_type:: + getWhen () const + { + return this->when_; + } + + Execution_type::WhenOptional& Execution_type:: + getWhen () + { + return this->when_; + } + + void Execution_type:: + setWhen (const WhenType& x) + { + this->when_.set (x); + } + + void Execution_type:: + setWhen (const WhenOptional& x) + { + this->when_ = x; + } + + void Execution_type:: + setWhen (::std::unique_ptr< WhenType > x) + { + this->when_.set (std::move (x)); + } + + const Execution_type::ReasonOptional& Execution_type:: + getReason () const + { + return this->reason_; + } + + Execution_type::ReasonOptional& Execution_type:: + getReason () + { + return this->reason_; + } + + void Execution_type:: + setReason (const ReasonType& x) + { + this->reason_.set (x); + } + + void Execution_type:: + setReason (const ReasonOptional& x) + { + this->reason_ = x; + } + + void Execution_type:: + setReason (::std::unique_ptr< ReasonType > x) + { + this->reason_.set (std::move (x)); + } + + const Execution_type::ByOptional& Execution_type:: + getBy () const + { + return this->by_; + } + + Execution_type::ByOptional& Execution_type:: + getBy () + { + return this->by_; + } + + void Execution_type:: + setBy (const ByType& x) + { + this->by_.set (x); + } + + void Execution_type:: + setBy (const ByOptional& x) + { + this->by_ = x; + } + + void Execution_type:: + setBy (::std::unique_ptr< ByType > x) + { + this->by_.set (std::move (x)); + } + + const Execution_type::AnyAttributeSet& Execution_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Execution_type::AnyAttributeSet& Execution_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Execution_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Execution_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Execution_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Call_type + // + + const Call_type::SipOptional& Call_type:: + getSip () const + { + return this->sip_; + } + + Call_type::SipOptional& Call_type:: + getSip () + { + return this->sip_; + } + + void Call_type:: + setSip (const SipType& x) + { + this->sip_.set (x); + } + + void Call_type:: + setSip (const SipOptional& x) + { + this->sip_ = x; + } + + void Call_type:: + setSip (::std::unique_ptr< SipType > x) + { + this->sip_.set (std::move (x)); + } + + const Call_type::AnySequence& Call_type:: + getAny () const + { + return this->any_; + } + + Call_type::AnySequence& Call_type:: + getAny () + { + return this->any_; + } + + void Call_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Call_type::AnyAttributeSet& Call_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Call_type::AnyAttributeSet& Call_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Call_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Call_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Call_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Sip_dialog_id_type + // + + const Sip_dialog_id_type::Display_textOptional& Sip_dialog_id_type:: + getDisplay_text () const + { + return this->display_text_; + } + + Sip_dialog_id_type::Display_textOptional& Sip_dialog_id_type:: + getDisplay_text () + { + return this->display_text_; + } + + void Sip_dialog_id_type:: + setDisplay_text (const Display_textType& x) + { + this->display_text_.set (x); + } + + void Sip_dialog_id_type:: + setDisplay_text (const Display_textOptional& x) + { + this->display_text_ = x; + } + + void Sip_dialog_id_type:: + setDisplay_text (::std::unique_ptr< Display_textType > x) + { + this->display_text_.set (std::move (x)); + } + + const Sip_dialog_id_type::Call_idType& Sip_dialog_id_type:: + getCall_id () const + { + return this->call_id_.get (); + } + + Sip_dialog_id_type::Call_idType& Sip_dialog_id_type:: + getCall_id () + { + return this->call_id_.get (); + } + + void Sip_dialog_id_type:: + setCall_id (const Call_idType& x) + { + this->call_id_.set (x); + } + + void Sip_dialog_id_type:: + setCall_id (::std::unique_ptr< Call_idType > x) + { + this->call_id_.set (std::move (x)); + } + + ::std::unique_ptr< Sip_dialog_id_type::Call_idType > Sip_dialog_id_type:: + detachCall_id () + { + return this->call_id_.detach (); + } + + const Sip_dialog_id_type::From_tagType& Sip_dialog_id_type:: + getFrom_tag () const + { + return this->from_tag_.get (); + } + + Sip_dialog_id_type::From_tagType& Sip_dialog_id_type:: + getFrom_tag () + { + return this->from_tag_.get (); + } + + void Sip_dialog_id_type:: + setFrom_tag (const From_tagType& x) + { + this->from_tag_.set (x); + } + + void Sip_dialog_id_type:: + setFrom_tag (::std::unique_ptr< From_tagType > x) + { + this->from_tag_.set (std::move (x)); + } + + ::std::unique_ptr< Sip_dialog_id_type::From_tagType > Sip_dialog_id_type:: + detachFrom_tag () + { + return this->from_tag_.detach (); + } + + const Sip_dialog_id_type::To_tagType& Sip_dialog_id_type:: + getTo_tag () const + { + return this->to_tag_.get (); + } + + Sip_dialog_id_type::To_tagType& Sip_dialog_id_type:: + getTo_tag () + { + return this->to_tag_.get (); + } + + void Sip_dialog_id_type:: + setTo_tag (const To_tagType& x) + { + this->to_tag_.set (x); + } + + void Sip_dialog_id_type:: + setTo_tag (::std::unique_ptr< To_tagType > x) + { + this->to_tag_.set (std::move (x)); + } + + ::std::unique_ptr< Sip_dialog_id_type::To_tagType > Sip_dialog_id_type:: + detachTo_tag () + { + return this->to_tag_.detach (); + } + + const Sip_dialog_id_type::AnySequence& Sip_dialog_id_type:: + getAny () const + { + return this->any_; + } + + Sip_dialog_id_type::AnySequence& Sip_dialog_id_type:: + getAny () + { + return this->any_; + } + + void Sip_dialog_id_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Sip_dialog_id_type::AnyAttributeSet& Sip_dialog_id_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Sip_dialog_id_type::AnyAttributeSet& Sip_dialog_id_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Sip_dialog_id_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Sip_dialog_id_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Sip_dialog_id_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Media_type + // + + const Media_type::Display_textOptional& Media_type:: + getDisplay_text () const + { + return this->display_text_; + } + + Media_type::Display_textOptional& Media_type:: + getDisplay_text () + { + return this->display_text_; + } + + void Media_type:: + setDisplay_text (const Display_textType& x) + { + this->display_text_.set (x); + } + + void Media_type:: + setDisplay_text (const Display_textOptional& x) + { + this->display_text_ = x; + } + + void Media_type:: + setDisplay_text (::std::unique_ptr< Display_textType > x) + { + this->display_text_.set (std::move (x)); + } + + const Media_type::TypeOptional& Media_type:: + getType () const + { + return this->type_; + } + + Media_type::TypeOptional& Media_type:: + getType () + { + return this->type_; + } + + void Media_type:: + setType (const TypeType& x) + { + this->type_.set (x); + } + + void Media_type:: + setType (const TypeOptional& x) + { + this->type_ = x; + } + + void Media_type:: + setType (::std::unique_ptr< TypeType > x) + { + this->type_.set (std::move (x)); + } + + const Media_type::LabelOptional& Media_type:: + getLabel () const + { + return this->label_; + } + + Media_type::LabelOptional& Media_type:: + getLabel () + { + return this->label_; + } + + void Media_type:: + setLabel (const LabelType& x) + { + this->label_.set (x); + } + + void Media_type:: + setLabel (const LabelOptional& x) + { + this->label_ = x; + } + + void Media_type:: + setLabel (::std::unique_ptr< LabelType > x) + { + this->label_.set (std::move (x)); + } + + const Media_type::Src_idOptional& Media_type:: + getSrc_id () const + { + return this->src_id_; + } + + Media_type::Src_idOptional& Media_type:: + getSrc_id () + { + return this->src_id_; + } + + void Media_type:: + setSrc_id (const Src_idType& x) + { + this->src_id_.set (x); + } + + void Media_type:: + setSrc_id (const Src_idOptional& x) + { + this->src_id_ = x; + } + + void Media_type:: + setSrc_id (::std::unique_ptr< Src_idType > x) + { + this->src_id_.set (std::move (x)); + } + + const Media_type::StatusOptional& Media_type:: + getStatus () const + { + return this->status_; + } + + Media_type::StatusOptional& Media_type:: + getStatus () + { + return this->status_; + } + + void Media_type:: + setStatus (const StatusType& x) + { + this->status_.set (x); + } + + void Media_type:: + setStatus (const StatusOptional& x) + { + this->status_ = x; + } + + void Media_type:: + setStatus (::std::unique_ptr< StatusType > x) + { + this->status_.set (std::move (x)); + } + + const Media_type::AnySequence& Media_type:: + getAny () const + { + return this->any_; + } + + Media_type::AnySequence& Media_type:: + getAny () + { + return this->any_; + } + + void Media_type:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Media_type::IdType& Media_type:: + getId () const + { + return this->id_.get (); + } + + Media_type::IdType& Media_type:: + getId () + { + return this->id_.get (); + } + + void Media_type:: + setId (const IdType& x) + { + this->id_.set (x); + } + + void Media_type:: + setId (::std::unique_ptr< IdType > x) + { + this->id_.set (std::move (x)); + } + + ::std::unique_ptr< Media_type::IdType > Media_type:: + detachId () + { + return this->id_.detach (); + } + + const Media_type::AnyAttributeSet& Media_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Media_type::AnyAttributeSet& Media_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Media_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Media_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Media_type:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Media_status_type + // + + Media_status_type:: + Media_status_type (Value v) + : ::xml_schema::String (_xsd_Media_status_type_literals_[v]) + { + } + + Media_status_type:: + Media_status_type (const char* v) + : ::xml_schema::String (v) + { + } + + Media_status_type:: + Media_status_type (const ::std::string& v) + : ::xml_schema::String (v) + { + } + + Media_status_type:: + Media_status_type (const ::xml_schema::String& v) + : ::xml_schema::String (v) + { + } + + Media_status_type:: + Media_status_type (const Media_status_type& v, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (v, f, c) + { + } + + Media_status_type& Media_status_type:: + operator= (Value v) + { + static_cast< ::xml_schema::String& > (*this) = + ::xml_schema::String (_xsd_Media_status_type_literals_[v]); + + return *this; + } + + + // Sidebars_by_val_type + // + + const Sidebars_by_val_type::EntrySequence& Sidebars_by_val_type:: + getEntry () const + { + return this->entry_; + } + + Sidebars_by_val_type::EntrySequence& Sidebars_by_val_type:: + getEntry () + { + return this->entry_; + } + + void Sidebars_by_val_type:: + setEntry (const EntrySequence& s) + { + this->entry_ = s; + } + + const Sidebars_by_val_type::StateType& Sidebars_by_val_type:: + getState () const + { + return this->state_.get (); + } + + Sidebars_by_val_type::StateType& Sidebars_by_val_type:: + getState () + { + return this->state_.get (); + } + + void Sidebars_by_val_type:: + setState (const StateType& x) + { + this->state_.set (x); + } + + void Sidebars_by_val_type:: + setState (::std::unique_ptr< StateType > x) + { + this->state_.set (std::move (x)); + } + + ::std::unique_ptr< Sidebars_by_val_type::StateType > Sidebars_by_val_type:: + detachState () + { + return this->state_.detach (); + } + + const Sidebars_by_val_type::StateType& Sidebars_by_val_type:: + getStateDefaultValue () + { + return state_default_value_; + } + + const Sidebars_by_val_type::AnyAttributeSet& Sidebars_by_val_type:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Sidebars_by_val_type::AnyAttributeSet& Sidebars_by_val_type:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Sidebars_by_val_type:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Sidebars_by_val_type:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Sidebars_by_val_type:: + getDomDocument () + { + return *this->dom_document_; + } +} + +#include + +#include + +namespace conference_info +{ + // Conference_type + // + + const Conference_type::StateType Conference_type::state_default_value_ ( + "full"); + + Conference_type:: + Conference_type (const EntityType& entity) + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + conference_description_ (this), + host_info_ (this), + conference_state_ (this), + users_ (this), + sidebars_by_ref_ (this), + sidebars_by_val_ (this), + any_ (this->getDomDocument ()), + entity_ (entity, this), + state_ (getStateDefaultValue (), this), + version_ (this), + any_attribute_ (this->getDomDocument ()) + { + } + + Conference_type:: + Conference_type (const Conference_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + conference_description_ (x.conference_description_, f, this), + host_info_ (x.host_info_, f, this), + conference_state_ (x.conference_state_, f, this), + users_ (x.users_, f, this), + sidebars_by_ref_ (x.sidebars_by_ref_, f, this), + sidebars_by_val_ (x.sidebars_by_val_, f, this), + any_ (x.any_, this->getDomDocument ()), + entity_ (x.entity_, f, this), + state_ (x.state_, f, this), + version_ (x.version_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Conference_type:: + Conference_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + conference_description_ (this), + host_info_ (this), + conference_state_ (this), + users_ (this), + sidebars_by_ref_ (this), + sidebars_by_val_ (this), + any_ (this->getDomDocument ()), + entity_ (this), + state_ (this), + version_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Conference_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // conference-description + // + if (n.name () == "conference-description" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Conference_descriptionType > r ( + Conference_descriptionTraits::create (i, f, this)); + + if (!this->conference_description_) + { + this->conference_description_.set (::std::move (r)); + continue; + } + } + + // host-info + // + if (n.name () == "host-info" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Host_infoType > r ( + Host_infoTraits::create (i, f, this)); + + if (!this->host_info_) + { + this->host_info_.set (::std::move (r)); + continue; + } + } + + // conference-state + // + if (n.name () == "conference-state" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Conference_stateType > r ( + Conference_stateTraits::create (i, f, this)); + + if (!this->conference_state_) + { + this->conference_state_.set (::std::move (r)); + continue; + } + } + + // users + // + if (n.name () == "users" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< UsersType > r ( + UsersTraits::create (i, f, this)); + + if (!this->users_) + { + this->users_.set (::std::move (r)); + continue; + } + } + + // sidebars-by-ref + // + if (n.name () == "sidebars-by-ref" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Sidebars_by_refType > r ( + Sidebars_by_refTraits::create (i, f, this)); + + if (!this->sidebars_by_ref_) + { + this->sidebars_by_ref_.set (::std::move (r)); + continue; + } + } + + // sidebars-by-val + // + if (n.name () == "sidebars-by-val" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Sidebars_by_valType > r ( + Sidebars_by_valTraits::create (i, f, this)); + + if (!this->sidebars_by_val_) + { + this->sidebars_by_val_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "entity" && n.namespace_ ().empty ()) + { + this->entity_.set (EntityTraits::create (i, f, this)); + continue; + } + + if (n.name () == "state" && n.namespace_ ().empty ()) + { + this->state_.set (StateTraits::create (i, f, this)); + continue; + } + + if (n.name () == "version" && n.namespace_ ().empty ()) + { + this->version_.set (VersionTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!entity_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "entity", + ""); + } + + if (!state_.present ()) + { + this->state_.set (getStateDefaultValue ()); + } + } + + Conference_type* Conference_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Conference_type (*this, f, c); + } + + Conference_type& Conference_type:: + operator= (const Conference_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->conference_description_ = x.conference_description_; + this->host_info_ = x.host_info_; + this->conference_state_ = x.conference_state_; + this->users_ = x.users_; + this->sidebars_by_ref_ = x.sidebars_by_ref_; + this->sidebars_by_val_ = x.sidebars_by_val_; + this->any_ = x.any_; + this->entity_ = x.entity_; + this->state_ = x.state_; + this->version_ = x.version_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Conference_type:: + ~Conference_type () + { + } + + // State_type + // + + State_type:: + State_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (e, f, c) + { + _xsd_State_type_convert (); + } + + State_type:: + State_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (a, f, c) + { + _xsd_State_type_convert (); + } + + State_type:: + State_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (s, e, f, c) + { + _xsd_State_type_convert (); + } + + State_type* State_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class State_type (*this, f, c); + } + + State_type::Value State_type:: + _xsd_State_type_convert () const + { + ::xsd::cxx::tree::enum_comparator< char > c (_xsd_State_type_literals_); + const Value* i (::std::lower_bound ( + _xsd_State_type_indexes_, + _xsd_State_type_indexes_ + 3, + *this, + c)); + + if (i == _xsd_State_type_indexes_ + 3 || _xsd_State_type_literals_[*i] != *this) + { + throw ::xsd::cxx::tree::unexpected_enumerator < char > (*this); + } + + return *i; + } + + const char* const State_type:: + _xsd_State_type_literals_[3] = + { + "full", + "partial", + "deleted" + }; + + const State_type::Value State_type:: + _xsd_State_type_indexes_[3] = + { + ::conference_info::State_type::deleted, + ::conference_info::State_type::full, + ::conference_info::State_type::partial + }; + + // Conference_description_type + // + + Conference_description_type:: + Conference_description_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + subject_ (this), + free_text_ (this), + keywords_ (this), + conf_uris_ (this), + service_uris_ (this), + maximum_user_count_ (this), + available_media_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + } + + Conference_description_type:: + Conference_description_type (const Conference_description_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (x.display_text_, f, this), + subject_ (x.subject_, f, this), + free_text_ (x.free_text_, f, this), + keywords_ (x.keywords_, f, this), + conf_uris_ (x.conf_uris_, f, this), + service_uris_ (x.service_uris_, f, this), + maximum_user_count_ (x.maximum_user_count_, f, this), + available_media_ (x.available_media_, f, this), + any_ (x.any_, this->getDomDocument ()), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Conference_description_type:: + Conference_description_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + subject_ (this), + free_text_ (this), + keywords_ (this), + conf_uris_ (this), + service_uris_ (this), + maximum_user_count_ (this), + available_media_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Conference_description_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-text + // + if (n.name () == "display-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Display_textType > r ( + Display_textTraits::create (i, f, this)); + + if (!this->display_text_) + { + this->display_text_.set (::std::move (r)); + continue; + } + } + + // subject + // + if (n.name () == "subject" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< SubjectType > r ( + SubjectTraits::create (i, f, this)); + + if (!this->subject_) + { + this->subject_.set (::std::move (r)); + continue; + } + } + + // free-text + // + if (n.name () == "free-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Free_textType > r ( + Free_textTraits::create (i, f, this)); + + if (!this->free_text_) + { + this->free_text_.set (::std::move (r)); + continue; + } + } + + // keywords + // + if (n.name () == "keywords" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< KeywordsType > r ( + KeywordsTraits::create (i, f, this)); + + if (!this->keywords_) + { + this->keywords_.set (::std::move (r)); + continue; + } + } + + // conf-uris + // + if (n.name () == "conf-uris" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Conf_urisType > r ( + Conf_urisTraits::create (i, f, this)); + + if (!this->conf_uris_) + { + this->conf_uris_.set (::std::move (r)); + continue; + } + } + + // service-uris + // + if (n.name () == "service-uris" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Service_urisType > r ( + Service_urisTraits::create (i, f, this)); + + if (!this->service_uris_) + { + this->service_uris_.set (::std::move (r)); + continue; + } + } + + // maximum-user-count + // + if (n.name () == "maximum-user-count" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + if (!this->maximum_user_count_) + { + this->maximum_user_count_.set (Maximum_user_countTraits::create (i, f, this)); + continue; + } + } + + // available-media + // + if (n.name () == "available-media" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Available_mediaType > r ( + Available_mediaTraits::create (i, f, this)); + + if (!this->available_media_) + { + this->available_media_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + Conference_description_type* Conference_description_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Conference_description_type (*this, f, c); + } + + Conference_description_type& Conference_description_type:: + operator= (const Conference_description_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_text_ = x.display_text_; + this->subject_ = x.subject_; + this->free_text_ = x.free_text_; + this->keywords_ = x.keywords_; + this->conf_uris_ = x.conf_uris_; + this->service_uris_ = x.service_uris_; + this->maximum_user_count_ = x.maximum_user_count_; + this->available_media_ = x.available_media_; + this->any_ = x.any_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Conference_description_type:: + ~Conference_description_type () + { + } + + // Host_type + // + + Host_type:: + Host_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + web_page_ (this), + uris_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + } + + Host_type:: + Host_type (const Host_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (x.display_text_, f, this), + web_page_ (x.web_page_, f, this), + uris_ (x.uris_, f, this), + any_ (x.any_, this->getDomDocument ()), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Host_type:: + Host_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + web_page_ (this), + uris_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Host_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-text + // + if (n.name () == "display-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Display_textType > r ( + Display_textTraits::create (i, f, this)); + + if (!this->display_text_) + { + this->display_text_.set (::std::move (r)); + continue; + } + } + + // web-page + // + if (n.name () == "web-page" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Web_pageType > r ( + Web_pageTraits::create (i, f, this)); + + if (!this->web_page_) + { + this->web_page_.set (::std::move (r)); + continue; + } + } + + // uris + // + if (n.name () == "uris" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< UrisType > r ( + UrisTraits::create (i, f, this)); + + if (!this->uris_) + { + this->uris_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + Host_type* Host_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Host_type (*this, f, c); + } + + Host_type& Host_type:: + operator= (const Host_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_text_ = x.display_text_; + this->web_page_ = x.web_page_; + this->uris_ = x.uris_; + this->any_ = x.any_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Host_type:: + ~Host_type () + { + } + + // Conference_state_type + // + + Conference_state_type:: + Conference_state_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + user_count_ (this), + active_ (this), + locked_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + } + + Conference_state_type:: + Conference_state_type (const Conference_state_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + user_count_ (x.user_count_, f, this), + active_ (x.active_, f, this), + locked_ (x.locked_, f, this), + any_ (x.any_, this->getDomDocument ()), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Conference_state_type:: + Conference_state_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + user_count_ (this), + active_ (this), + locked_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Conference_state_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // user-count + // + if (n.name () == "user-count" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + if (!this->user_count_) + { + this->user_count_.set (User_countTraits::create (i, f, this)); + continue; + } + } + + // active + // + if (n.name () == "active" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + if (!this->active_) + { + this->active_.set (ActiveTraits::create (i, f, this)); + continue; + } + } + + // locked + // + if (n.name () == "locked" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + if (!this->locked_) + { + this->locked_.set (LockedTraits::create (i, f, this)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + Conference_state_type* Conference_state_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Conference_state_type (*this, f, c); + } + + Conference_state_type& Conference_state_type:: + operator= (const Conference_state_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->user_count_ = x.user_count_; + this->active_ = x.active_; + this->locked_ = x.locked_; + this->any_ = x.any_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Conference_state_type:: + ~Conference_state_type () + { + } + + // Conference_media_type + // + + Conference_media_type:: + Conference_media_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (this), + any_attribute_ (this->getDomDocument ()) + { + } + + Conference_media_type:: + Conference_media_type (const Conference_media_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (x.entry_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Conference_media_type:: + Conference_media_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Conference_media_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // entry + // + if (n.name () == "entry" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< EntryType > r ( + EntryTraits::create (i, f, this)); + + this->entry_.push_back (::std::move (r)); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + Conference_media_type* Conference_media_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Conference_media_type (*this, f, c); + } + + Conference_media_type& Conference_media_type:: + operator= (const Conference_media_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->entry_ = x.entry_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Conference_media_type:: + ~Conference_media_type () + { + } + + // Conference_medium_type + // + + Conference_medium_type:: + Conference_medium_type (const TypeType& type, + const LabelType& label) + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + type_ (type, this), + status_ (this), + any_ (this->getDomDocument ()), + label_ (label, this), + any_attribute_ (this->getDomDocument ()) + { + } + + Conference_medium_type:: + Conference_medium_type (const Conference_medium_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (x.display_text_, f, this), + type_ (x.type_, f, this), + status_ (x.status_, f, this), + any_ (x.any_, this->getDomDocument ()), + label_ (x.label_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Conference_medium_type:: + Conference_medium_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + type_ (this), + status_ (this), + any_ (this->getDomDocument ()), + label_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Conference_medium_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-text + // + if (n.name () == "display-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Display_textType > r ( + Display_textTraits::create (i, f, this)); + + if (!this->display_text_) + { + this->display_text_.set (::std::move (r)); + continue; + } + } + + // type + // + if (n.name () == "type" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< TypeType > r ( + TypeTraits::create (i, f, this)); + + if (!type_.present ()) + { + this->type_.set (::std::move (r)); + continue; + } + } + + // status + // + if (n.name () == "status" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< StatusType > r ( + StatusTraits::create (i, f, this)); + + if (!this->status_) + { + this->status_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + if (!type_.present ()) + { + throw ::xsd::cxx::tree::expected_element< char > ( + "type", + "urn:ietf:params:xml:ns:conference-info"); + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "label" && n.namespace_ ().empty ()) + { + this->label_.set (LabelTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!label_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "label", + ""); + } + } + + Conference_medium_type* Conference_medium_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Conference_medium_type (*this, f, c); + } + + Conference_medium_type& Conference_medium_type:: + operator= (const Conference_medium_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_text_ = x.display_text_; + this->type_ = x.type_; + this->status_ = x.status_; + this->any_ = x.any_; + this->label_ = x.label_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Conference_medium_type:: + ~Conference_medium_type () + { + } + + // Uris_type + // + + const Uris_type::StateType Uris_type::state_default_value_ ( + "full"); + + Uris_type:: + Uris_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (this), + state_ (getStateDefaultValue (), this), + any_attribute_ (this->getDomDocument ()) + { + } + + Uris_type:: + Uris_type (const Uris_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (x.entry_, f, this), + state_ (x.state_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Uris_type:: + Uris_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (this), + state_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Uris_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // entry + // + if (n.name () == "entry" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< EntryType > r ( + EntryTraits::create (i, f, this)); + + this->entry_.push_back (::std::move (r)); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "state" && n.namespace_ ().empty ()) + { + this->state_.set (StateTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!state_.present ()) + { + this->state_.set (getStateDefaultValue ()); + } + } + + Uris_type* Uris_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Uris_type (*this, f, c); + } + + Uris_type& Uris_type:: + operator= (const Uris_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->entry_ = x.entry_; + this->state_ = x.state_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Uris_type:: + ~Uris_type () + { + } + + // Uri_type + // + + Uri_type:: + Uri_type (const UriType& uri) + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + uri_ (uri, this), + display_text_ (this), + purpose_ (this), + modified_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + } + + Uri_type:: + Uri_type (const Uri_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + uri_ (x.uri_, f, this), + display_text_ (x.display_text_, f, this), + purpose_ (x.purpose_, f, this), + modified_ (x.modified_, f, this), + any_ (x.any_, this->getDomDocument ()), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Uri_type:: + Uri_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + uri_ (this), + display_text_ (this), + purpose_ (this), + modified_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Uri_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // uri + // + if (n.name () == "uri" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< UriType > r ( + UriTraits::create (i, f, this)); + + if (!uri_.present ()) + { + this->uri_.set (::std::move (r)); + continue; + } + } + + // display-text + // + if (n.name () == "display-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Display_textType > r ( + Display_textTraits::create (i, f, this)); + + if (!this->display_text_) + { + this->display_text_.set (::std::move (r)); + continue; + } + } + + // purpose + // + if (n.name () == "purpose" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< PurposeType > r ( + PurposeTraits::create (i, f, this)); + + if (!this->purpose_) + { + this->purpose_.set (::std::move (r)); + continue; + } + } + + // modified + // + if (n.name () == "modified" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< ModifiedType > r ( + ModifiedTraits::create (i, f, this)); + + if (!this->modified_) + { + this->modified_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + if (!uri_.present ()) + { + throw ::xsd::cxx::tree::expected_element< char > ( + "uri", + "urn:ietf:params:xml:ns:conference-info"); + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + Uri_type* Uri_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Uri_type (*this, f, c); + } + + Uri_type& Uri_type:: + operator= (const Uri_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->uri_ = x.uri_; + this->display_text_ = x.display_text_; + this->purpose_ = x.purpose_; + this->modified_ = x.modified_; + this->any_ = x.any_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Uri_type:: + ~Uri_type () + { + } + + // Keywords_type + // + + Keywords_type:: + Keywords_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::SimpleType (e, f, c), + ::xsd::cxx::tree::list< ::xml_schema::String, char > (e, f, this) + { + } + + Keywords_type:: + Keywords_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::SimpleType (a, f, c), + ::xsd::cxx::tree::list< ::xml_schema::String, char > (a, f, this) + { + } + + Keywords_type:: + Keywords_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::SimpleType (s, e, f, c), + ::xsd::cxx::tree::list< ::xml_schema::String, char > (s, e, f, this) + { + } + + Keywords_type* Keywords_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Keywords_type (*this, f, c); + } + + Keywords_type:: + ~Keywords_type () + { + } + + // Users_type + // + + const Users_type::StateType Users_type::state_default_value_ ( + "full"); + + Users_type:: + Users_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + user_ (this), + any_ (this->getDomDocument ()), + state_ (getStateDefaultValue (), this), + any_attribute_ (this->getDomDocument ()) + { + } + + Users_type:: + Users_type (const Users_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + user_ (x.user_, f, this), + any_ (x.any_, this->getDomDocument ()), + state_ (x.state_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Users_type:: + Users_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + user_ (this), + any_ (this->getDomDocument ()), + state_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Users_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // user + // + if (n.name () == "user" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< UserType > r ( + UserTraits::create (i, f, this)); + + this->user_.push_back (::std::move (r)); + continue; + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "state" && n.namespace_ ().empty ()) + { + this->state_.set (StateTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!state_.present ()) + { + this->state_.set (getStateDefaultValue ()); + } + } + + Users_type* Users_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Users_type (*this, f, c); + } + + Users_type& Users_type:: + operator= (const Users_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->user_ = x.user_; + this->any_ = x.any_; + this->state_ = x.state_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Users_type:: + ~Users_type () + { + } + + // User_type + // + + const User_type::StateType User_type::state_default_value_ ( + "full"); + + User_type:: + User_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + associated_aors_ (this), + roles_ (this), + languages_ (this), + cascaded_focus_ (this), + endpoint_ (this), + any_ (this->getDomDocument ()), + entity_ (this), + state_ (getStateDefaultValue (), this), + any_attribute_ (this->getDomDocument ()) + { + } + + User_type:: + User_type (const User_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (x.display_text_, f, this), + associated_aors_ (x.associated_aors_, f, this), + roles_ (x.roles_, f, this), + languages_ (x.languages_, f, this), + cascaded_focus_ (x.cascaded_focus_, f, this), + endpoint_ (x.endpoint_, f, this), + any_ (x.any_, this->getDomDocument ()), + entity_ (x.entity_, f, this), + state_ (x.state_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + User_type:: + User_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + associated_aors_ (this), + roles_ (this), + languages_ (this), + cascaded_focus_ (this), + endpoint_ (this), + any_ (this->getDomDocument ()), + entity_ (this), + state_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void User_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-text + // + if (n.name () == "display-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Display_textType > r ( + Display_textTraits::create (i, f, this)); + + if (!this->display_text_) + { + this->display_text_.set (::std::move (r)); + continue; + } + } + + // associated-aors + // + if (n.name () == "associated-aors" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Associated_aorsType > r ( + Associated_aorsTraits::create (i, f, this)); + + if (!this->associated_aors_) + { + this->associated_aors_.set (::std::move (r)); + continue; + } + } + + // roles + // + if (n.name () == "roles" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< RolesType > r ( + RolesTraits::create (i, f, this)); + + if (!this->roles_) + { + this->roles_.set (::std::move (r)); + continue; + } + } + + // languages + // + if (n.name () == "languages" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< LanguagesType > r ( + LanguagesTraits::create (i, f, this)); + + if (!this->languages_) + { + this->languages_.set (::std::move (r)); + continue; + } + } + + // cascaded-focus + // + if (n.name () == "cascaded-focus" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Cascaded_focusType > r ( + Cascaded_focusTraits::create (i, f, this)); + + if (!this->cascaded_focus_) + { + this->cascaded_focus_.set (::std::move (r)); + continue; + } + } + + // endpoint + // + if (n.name () == "endpoint" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< EndpointType > r ( + EndpointTraits::create (i, f, this)); + + this->endpoint_.push_back (::std::move (r)); + continue; + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "entity" && n.namespace_ ().empty ()) + { + this->entity_.set (EntityTraits::create (i, f, this)); + continue; + } + + if (n.name () == "state" && n.namespace_ ().empty ()) + { + this->state_.set (StateTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!state_.present ()) + { + this->state_.set (getStateDefaultValue ()); + } + } + + User_type* User_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class User_type (*this, f, c); + } + + User_type& User_type:: + operator= (const User_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_text_ = x.display_text_; + this->associated_aors_ = x.associated_aors_; + this->roles_ = x.roles_; + this->languages_ = x.languages_; + this->cascaded_focus_ = x.cascaded_focus_; + this->endpoint_ = x.endpoint_; + this->any_ = x.any_; + this->entity_ = x.entity_; + this->state_ = x.state_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + User_type:: + ~User_type () + { + } + + // User_roles_type + // + + User_roles_type:: + User_roles_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (this), + any_attribute_ (this->getDomDocument ()) + { + } + + User_roles_type:: + User_roles_type (const User_roles_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (x.entry_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + User_roles_type:: + User_roles_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void User_roles_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // entry + // + if (n.name () == "entry" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< EntryType > r ( + EntryTraits::create (i, f, this)); + + this->entry_.push_back (::std::move (r)); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + User_roles_type* User_roles_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class User_roles_type (*this, f, c); + } + + User_roles_type& User_roles_type:: + operator= (const User_roles_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->entry_ = x.entry_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + User_roles_type:: + ~User_roles_type () + { + } + + // User_languages_type + // + + User_languages_type:: + User_languages_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::SimpleType (e, f, c), + ::xsd::cxx::tree::list< ::xml_schema::Language, char > (e, f, this) + { + } + + User_languages_type:: + User_languages_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::SimpleType (a, f, c), + ::xsd::cxx::tree::list< ::xml_schema::Language, char > (a, f, this) + { + } + + User_languages_type:: + User_languages_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::SimpleType (s, e, f, c), + ::xsd::cxx::tree::list< ::xml_schema::Language, char > (s, e, f, this) + { + } + + User_languages_type* User_languages_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class User_languages_type (*this, f, c); + } + + User_languages_type:: + ~User_languages_type () + { + } + + // Endpoint_type + // + + const Endpoint_type::StateType Endpoint_type::state_default_value_ ( + "full"); + + Endpoint_type:: + Endpoint_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + referred_ (this), + status_ (this), + joining_method_ (this), + joining_info_ (this), + disconnection_method_ (this), + disconnection_info_ (this), + media_ (this), + call_info_ (this), + any_ (this->getDomDocument ()), + entity_ (this), + state_ (getStateDefaultValue (), this), + any_attribute_ (this->getDomDocument ()) + { + } + + Endpoint_type:: + Endpoint_type (const Endpoint_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (x.display_text_, f, this), + referred_ (x.referred_, f, this), + status_ (x.status_, f, this), + joining_method_ (x.joining_method_, f, this), + joining_info_ (x.joining_info_, f, this), + disconnection_method_ (x.disconnection_method_, f, this), + disconnection_info_ (x.disconnection_info_, f, this), + media_ (x.media_, f, this), + call_info_ (x.call_info_, f, this), + any_ (x.any_, this->getDomDocument ()), + entity_ (x.entity_, f, this), + state_ (x.state_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Endpoint_type:: + Endpoint_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + referred_ (this), + status_ (this), + joining_method_ (this), + joining_info_ (this), + disconnection_method_ (this), + disconnection_info_ (this), + media_ (this), + call_info_ (this), + any_ (this->getDomDocument ()), + entity_ (this), + state_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Endpoint_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-text + // + if (n.name () == "display-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Display_textType > r ( + Display_textTraits::create (i, f, this)); + + if (!this->display_text_) + { + this->display_text_.set (::std::move (r)); + continue; + } + } + + // referred + // + if (n.name () == "referred" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< ReferredType > r ( + ReferredTraits::create (i, f, this)); + + if (!this->referred_) + { + this->referred_.set (::std::move (r)); + continue; + } + } + + // status + // + if (n.name () == "status" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< StatusType > r ( + StatusTraits::create (i, f, this)); + + if (!this->status_) + { + this->status_.set (::std::move (r)); + continue; + } + } + + // joining-method + // + if (n.name () == "joining-method" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Joining_methodType > r ( + Joining_methodTraits::create (i, f, this)); + + if (!this->joining_method_) + { + this->joining_method_.set (::std::move (r)); + continue; + } + } + + // joining-info + // + if (n.name () == "joining-info" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Joining_infoType > r ( + Joining_infoTraits::create (i, f, this)); + + if (!this->joining_info_) + { + this->joining_info_.set (::std::move (r)); + continue; + } + } + + // disconnection-method + // + if (n.name () == "disconnection-method" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Disconnection_methodType > r ( + Disconnection_methodTraits::create (i, f, this)); + + if (!this->disconnection_method_) + { + this->disconnection_method_.set (::std::move (r)); + continue; + } + } + + // disconnection-info + // + if (n.name () == "disconnection-info" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Disconnection_infoType > r ( + Disconnection_infoTraits::create (i, f, this)); + + if (!this->disconnection_info_) + { + this->disconnection_info_.set (::std::move (r)); + continue; + } + } + + // media + // + if (n.name () == "media" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< MediaType > r ( + MediaTraits::create (i, f, this)); + + this->media_.push_back (::std::move (r)); + continue; + } + + // call-info + // + if (n.name () == "call-info" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Call_infoType > r ( + Call_infoTraits::create (i, f, this)); + + if (!this->call_info_) + { + this->call_info_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "entity" && n.namespace_ ().empty ()) + { + this->entity_.set (EntityTraits::create (i, f, this)); + continue; + } + + if (n.name () == "state" && n.namespace_ ().empty ()) + { + this->state_.set (StateTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!state_.present ()) + { + this->state_.set (getStateDefaultValue ()); + } + } + + Endpoint_type* Endpoint_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Endpoint_type (*this, f, c); + } + + Endpoint_type& Endpoint_type:: + operator= (const Endpoint_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_text_ = x.display_text_; + this->referred_ = x.referred_; + this->status_ = x.status_; + this->joining_method_ = x.joining_method_; + this->joining_info_ = x.joining_info_; + this->disconnection_method_ = x.disconnection_method_; + this->disconnection_info_ = x.disconnection_info_; + this->media_ = x.media_; + this->call_info_ = x.call_info_; + this->any_ = x.any_; + this->entity_ = x.entity_; + this->state_ = x.state_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Endpoint_type:: + ~Endpoint_type () + { + } + + // Endpoint_status_type + // + + Endpoint_status_type:: + Endpoint_status_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (e, f, c) + { + _xsd_Endpoint_status_type_convert (); + } + + Endpoint_status_type:: + Endpoint_status_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (a, f, c) + { + _xsd_Endpoint_status_type_convert (); + } + + Endpoint_status_type:: + Endpoint_status_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (s, e, f, c) + { + _xsd_Endpoint_status_type_convert (); + } + + Endpoint_status_type* Endpoint_status_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Endpoint_status_type (*this, f, c); + } + + Endpoint_status_type::Value Endpoint_status_type:: + _xsd_Endpoint_status_type_convert () const + { + ::xsd::cxx::tree::enum_comparator< char > c (_xsd_Endpoint_status_type_literals_); + const Value* i (::std::lower_bound ( + _xsd_Endpoint_status_type_indexes_, + _xsd_Endpoint_status_type_indexes_ + 9, + *this, + c)); + + if (i == _xsd_Endpoint_status_type_indexes_ + 9 || _xsd_Endpoint_status_type_literals_[*i] != *this) + { + throw ::xsd::cxx::tree::unexpected_enumerator < char > (*this); + } + + return *i; + } + + const char* const Endpoint_status_type:: + _xsd_Endpoint_status_type_literals_[9] = + { + "pending", + "dialing-out", + "dialing-in", + "alerting", + "on-hold", + "connected", + "muted-via-focus", + "disconnecting", + "disconnected" + }; + + const Endpoint_status_type::Value Endpoint_status_type:: + _xsd_Endpoint_status_type_indexes_[9] = + { + ::conference_info::Endpoint_status_type::alerting, + ::conference_info::Endpoint_status_type::connected, + ::conference_info::Endpoint_status_type::dialing_in, + ::conference_info::Endpoint_status_type::dialing_out, + ::conference_info::Endpoint_status_type::disconnected, + ::conference_info::Endpoint_status_type::disconnecting, + ::conference_info::Endpoint_status_type::muted_via_focus, + ::conference_info::Endpoint_status_type::on_hold, + ::conference_info::Endpoint_status_type::pending + }; + + // Joining_type + // + + Joining_type:: + Joining_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (e, f, c) + { + _xsd_Joining_type_convert (); + } + + Joining_type:: + Joining_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (a, f, c) + { + _xsd_Joining_type_convert (); + } + + Joining_type:: + Joining_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (s, e, f, c) + { + _xsd_Joining_type_convert (); + } + + Joining_type* Joining_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Joining_type (*this, f, c); + } + + Joining_type::Value Joining_type:: + _xsd_Joining_type_convert () const + { + ::xsd::cxx::tree::enum_comparator< char > c (_xsd_Joining_type_literals_); + const Value* i (::std::lower_bound ( + _xsd_Joining_type_indexes_, + _xsd_Joining_type_indexes_ + 3, + *this, + c)); + + if (i == _xsd_Joining_type_indexes_ + 3 || _xsd_Joining_type_literals_[*i] != *this) + { + throw ::xsd::cxx::tree::unexpected_enumerator < char > (*this); + } + + return *i; + } + + const char* const Joining_type:: + _xsd_Joining_type_literals_[3] = + { + "dialed-in", + "dialed-out", + "focus-owner" + }; + + const Joining_type::Value Joining_type:: + _xsd_Joining_type_indexes_[3] = + { + ::conference_info::Joining_type::dialed_in, + ::conference_info::Joining_type::dialed_out, + ::conference_info::Joining_type::focus_owner + }; + + // Disconnection_type + // + + Disconnection_type:: + Disconnection_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (e, f, c) + { + _xsd_Disconnection_type_convert (); + } + + Disconnection_type:: + Disconnection_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (a, f, c) + { + _xsd_Disconnection_type_convert (); + } + + Disconnection_type:: + Disconnection_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (s, e, f, c) + { + _xsd_Disconnection_type_convert (); + } + + Disconnection_type* Disconnection_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Disconnection_type (*this, f, c); + } + + Disconnection_type::Value Disconnection_type:: + _xsd_Disconnection_type_convert () const + { + ::xsd::cxx::tree::enum_comparator< char > c (_xsd_Disconnection_type_literals_); + const Value* i (::std::lower_bound ( + _xsd_Disconnection_type_indexes_, + _xsd_Disconnection_type_indexes_ + 4, + *this, + c)); + + if (i == _xsd_Disconnection_type_indexes_ + 4 || _xsd_Disconnection_type_literals_[*i] != *this) + { + throw ::xsd::cxx::tree::unexpected_enumerator < char > (*this); + } + + return *i; + } + + const char* const Disconnection_type:: + _xsd_Disconnection_type_literals_[4] = + { + "departed", + "booted", + "failed", + "busy" + }; + + const Disconnection_type::Value Disconnection_type:: + _xsd_Disconnection_type_indexes_[4] = + { + ::conference_info::Disconnection_type::booted, + ::conference_info::Disconnection_type::busy, + ::conference_info::Disconnection_type::departed, + ::conference_info::Disconnection_type::failed + }; + + // Execution_type + // + + Execution_type:: + Execution_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + when_ (this), + reason_ (this), + by_ (this), + any_attribute_ (this->getDomDocument ()) + { + } + + Execution_type:: + Execution_type (const Execution_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + when_ (x.when_, f, this), + reason_ (x.reason_, f, this), + by_ (x.by_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Execution_type:: + Execution_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + when_ (this), + reason_ (this), + by_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Execution_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // when + // + if (n.name () == "when" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< WhenType > r ( + WhenTraits::create (i, f, this)); + + if (!this->when_) + { + this->when_.set (::std::move (r)); + continue; + } + } + + // reason + // + if (n.name () == "reason" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< ReasonType > r ( + ReasonTraits::create (i, f, this)); + + if (!this->reason_) + { + this->reason_.set (::std::move (r)); + continue; + } + } + + // by + // + if (n.name () == "by" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< ByType > r ( + ByTraits::create (i, f, this)); + + if (!this->by_) + { + this->by_.set (::std::move (r)); + continue; + } + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + Execution_type* Execution_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Execution_type (*this, f, c); + } + + Execution_type& Execution_type:: + operator= (const Execution_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->when_ = x.when_; + this->reason_ = x.reason_; + this->by_ = x.by_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Execution_type:: + ~Execution_type () + { + } + + // Call_type + // + + Call_type:: + Call_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + sip_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + } + + Call_type:: + Call_type (const Call_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + sip_ (x.sip_, f, this), + any_ (x.any_, this->getDomDocument ()), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Call_type:: + Call_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + sip_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Call_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // sip + // + if (n.name () == "sip" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< SipType > r ( + SipTraits::create (i, f, this)); + + if (!this->sip_) + { + this->sip_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + Call_type* Call_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Call_type (*this, f, c); + } + + Call_type& Call_type:: + operator= (const Call_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->sip_ = x.sip_; + this->any_ = x.any_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Call_type:: + ~Call_type () + { + } + + // Sip_dialog_id_type + // + + Sip_dialog_id_type:: + Sip_dialog_id_type (const Call_idType& call_id, + const From_tagType& from_tag, + const To_tagType& to_tag) + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + call_id_ (call_id, this), + from_tag_ (from_tag, this), + to_tag_ (to_tag, this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + } + + Sip_dialog_id_type:: + Sip_dialog_id_type (const Sip_dialog_id_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (x.display_text_, f, this), + call_id_ (x.call_id_, f, this), + from_tag_ (x.from_tag_, f, this), + to_tag_ (x.to_tag_, f, this), + any_ (x.any_, this->getDomDocument ()), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Sip_dialog_id_type:: + Sip_dialog_id_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + call_id_ (this), + from_tag_ (this), + to_tag_ (this), + any_ (this->getDomDocument ()), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Sip_dialog_id_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-text + // + if (n.name () == "display-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Display_textType > r ( + Display_textTraits::create (i, f, this)); + + if (!this->display_text_) + { + this->display_text_.set (::std::move (r)); + continue; + } + } + + // call-id + // + if (n.name () == "call-id" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Call_idType > r ( + Call_idTraits::create (i, f, this)); + + if (!call_id_.present ()) + { + this->call_id_.set (::std::move (r)); + continue; + } + } + + // from-tag + // + if (n.name () == "from-tag" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< From_tagType > r ( + From_tagTraits::create (i, f, this)); + + if (!from_tag_.present ()) + { + this->from_tag_.set (::std::move (r)); + continue; + } + } + + // to-tag + // + if (n.name () == "to-tag" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< To_tagType > r ( + To_tagTraits::create (i, f, this)); + + if (!to_tag_.present ()) + { + this->to_tag_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + if (!call_id_.present ()) + { + throw ::xsd::cxx::tree::expected_element< char > ( + "call-id", + "urn:ietf:params:xml:ns:conference-info"); + } + + if (!from_tag_.present ()) + { + throw ::xsd::cxx::tree::expected_element< char > ( + "from-tag", + "urn:ietf:params:xml:ns:conference-info"); + } + + if (!to_tag_.present ()) + { + throw ::xsd::cxx::tree::expected_element< char > ( + "to-tag", + "urn:ietf:params:xml:ns:conference-info"); + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + Sip_dialog_id_type* Sip_dialog_id_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Sip_dialog_id_type (*this, f, c); + } + + Sip_dialog_id_type& Sip_dialog_id_type:: + operator= (const Sip_dialog_id_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_text_ = x.display_text_; + this->call_id_ = x.call_id_; + this->from_tag_ = x.from_tag_; + this->to_tag_ = x.to_tag_; + this->any_ = x.any_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Sip_dialog_id_type:: + ~Sip_dialog_id_type () + { + } + + // Media_type + // + + Media_type:: + Media_type (const IdType& id) + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + type_ (this), + label_ (this), + src_id_ (this), + status_ (this), + any_ (this->getDomDocument ()), + id_ (id, this), + any_attribute_ (this->getDomDocument ()) + { + } + + Media_type:: + Media_type (const Media_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (x.display_text_, f, this), + type_ (x.type_, f, this), + label_ (x.label_, f, this), + src_id_ (x.src_id_, f, this), + status_ (x.status_, f, this), + any_ (x.any_, this->getDomDocument ()), + id_ (x.id_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Media_type:: + Media_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_text_ (this), + type_ (this), + label_ (this), + src_id_ (this), + status_ (this), + any_ (this->getDomDocument ()), + id_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Media_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-text + // + if (n.name () == "display-text" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Display_textType > r ( + Display_textTraits::create (i, f, this)); + + if (!this->display_text_) + { + this->display_text_.set (::std::move (r)); + continue; + } + } + + // type + // + if (n.name () == "type" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< TypeType > r ( + TypeTraits::create (i, f, this)); + + if (!this->type_) + { + this->type_.set (::std::move (r)); + continue; + } + } + + // label + // + if (n.name () == "label" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< LabelType > r ( + LabelTraits::create (i, f, this)); + + if (!this->label_) + { + this->label_.set (::std::move (r)); + continue; + } + } + + // src-id + // + if (n.name () == "src-id" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< Src_idType > r ( + Src_idTraits::create (i, f, this)); + + if (!this->src_id_) + { + this->src_id_.set (::std::move (r)); + continue; + } + } + + // status + // + if (n.name () == "status" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< StatusType > r ( + StatusTraits::create (i, f, this)); + + if (!this->status_) + { + this->status_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:conference-info")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "id" && n.namespace_ ().empty ()) + { + this->id_.set (IdTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!id_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "id", + ""); + } + } + + Media_type* Media_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Media_type (*this, f, c); + } + + Media_type& Media_type:: + operator= (const Media_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_text_ = x.display_text_; + this->type_ = x.type_; + this->label_ = x.label_; + this->src_id_ = x.src_id_; + this->status_ = x.status_; + this->any_ = x.any_; + this->id_ = x.id_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Media_type:: + ~Media_type () + { + } + + // Media_status_type + // + + Media_status_type:: + Media_status_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (e, f, c) + { + _xsd_Media_status_type_convert (); + } + + Media_status_type:: + Media_status_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (a, f, c) + { + _xsd_Media_status_type_convert (); + } + + Media_status_type:: + Media_status_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (s, e, f, c) + { + _xsd_Media_status_type_convert (); + } + + Media_status_type* Media_status_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Media_status_type (*this, f, c); + } + + Media_status_type::Value Media_status_type:: + _xsd_Media_status_type_convert () const + { + ::xsd::cxx::tree::enum_comparator< char > c (_xsd_Media_status_type_literals_); + const Value* i (::std::lower_bound ( + _xsd_Media_status_type_indexes_, + _xsd_Media_status_type_indexes_ + 4, + *this, + c)); + + if (i == _xsd_Media_status_type_indexes_ + 4 || _xsd_Media_status_type_literals_[*i] != *this) + { + throw ::xsd::cxx::tree::unexpected_enumerator < char > (*this); + } + + return *i; + } + + const char* const Media_status_type:: + _xsd_Media_status_type_literals_[4] = + { + "recvonly", + "sendonly", + "sendrecv", + "inactive" + }; + + const Media_status_type::Value Media_status_type:: + _xsd_Media_status_type_indexes_[4] = + { + ::conference_info::Media_status_type::inactive, + ::conference_info::Media_status_type::recvonly, + ::conference_info::Media_status_type::sendonly, + ::conference_info::Media_status_type::sendrecv + }; + + // Sidebars_by_val_type + // + + const Sidebars_by_val_type::StateType Sidebars_by_val_type::state_default_value_ ( + "full"); + + Sidebars_by_val_type:: + Sidebars_by_val_type () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (this), + state_ (getStateDefaultValue (), this), + any_attribute_ (this->getDomDocument ()) + { + } + + Sidebars_by_val_type:: + Sidebars_by_val_type (const Sidebars_by_val_type& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (x.entry_, f, this), + state_ (x.state_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Sidebars_by_val_type:: + Sidebars_by_val_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + entry_ (this), + state_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Sidebars_by_val_type:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // entry + // + if (n.name () == "entry" && n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< EntryType > r ( + EntryTraits::create (i, f, this)); + + this->entry_.push_back (::std::move (r)); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "state" && n.namespace_ ().empty ()) + { + this->state_.set (StateTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:conference-info" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!state_.present ()) + { + this->state_.set (getStateDefaultValue ()); + } + } + + Sidebars_by_val_type* Sidebars_by_val_type:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Sidebars_by_val_type (*this, f, c); + } + + Sidebars_by_val_type& Sidebars_by_val_type:: + operator= (const Sidebars_by_val_type& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->entry_ = x.entry_; + this->state_ = x.state_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Sidebars_by_val_type:: + ~Sidebars_by_val_type () + { + } +} + +#include + +namespace conference_info +{ + ::std::ostream& + operator<< (::std::ostream& o, const Conference_type& i) + { + if (i.getConference_description ()) + { + o << ::std::endl << "conference-description: " << *i.getConference_description (); + } + + if (i.getHost_info ()) + { + o << ::std::endl << "host-info: " << *i.getHost_info (); + } + + if (i.getConference_state ()) + { + o << ::std::endl << "conference-state: " << *i.getConference_state (); + } + + if (i.getUsers ()) + { + o << ::std::endl << "users: " << *i.getUsers (); + } + + if (i.getSidebars_by_ref ()) + { + o << ::std::endl << "sidebars-by-ref: " << *i.getSidebars_by_ref (); + } + + if (i.getSidebars_by_val ()) + { + o << ::std::endl << "sidebars-by-val: " << *i.getSidebars_by_val (); + } + + o << ::std::endl << "entity: " << i.getEntity (); + o << ::std::endl << "state: " << i.getState (); + if (i.getVersion ()) + { + o << ::std::endl << "version: " << *i.getVersion (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, State_type::Value i) + { + return o << State_type::_xsd_State_type_literals_[i]; + } + + ::std::ostream& + operator<< (::std::ostream& o, const State_type& i) + { + return o << static_cast< const ::xml_schema::String& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, const Conference_description_type& i) + { + if (i.getDisplay_text ()) + { + o << ::std::endl << "display-text: " << *i.getDisplay_text (); + } + + if (i.getSubject ()) + { + o << ::std::endl << "subject: " << *i.getSubject (); + } + + if (i.getFree_text ()) + { + o << ::std::endl << "free-text: " << *i.getFree_text (); + } + + if (i.getKeywords ()) + { + o << ::std::endl << "keywords: " << *i.getKeywords (); + } + + if (i.getConf_uris ()) + { + o << ::std::endl << "conf-uris: " << *i.getConf_uris (); + } + + if (i.getService_uris ()) + { + o << ::std::endl << "service-uris: " << *i.getService_uris (); + } + + if (i.getMaximum_user_count ()) + { + o << ::std::endl << "maximum-user-count: " << *i.getMaximum_user_count (); + } + + if (i.getAvailable_media ()) + { + o << ::std::endl << "available-media: " << *i.getAvailable_media (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Host_type& i) + { + if (i.getDisplay_text ()) + { + o << ::std::endl << "display-text: " << *i.getDisplay_text (); + } + + if (i.getWeb_page ()) + { + o << ::std::endl << "web-page: " << *i.getWeb_page (); + } + + if (i.getUris ()) + { + o << ::std::endl << "uris: " << *i.getUris (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Conference_state_type& i) + { + if (i.getUser_count ()) + { + o << ::std::endl << "user-count: " << *i.getUser_count (); + } + + if (i.getActive ()) + { + o << ::std::endl << "active: " << *i.getActive (); + } + + if (i.getLocked ()) + { + o << ::std::endl << "locked: " << *i.getLocked (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Conference_media_type& i) + { + for (Conference_media_type::EntryConstIterator + b (i.getEntry ().begin ()), e (i.getEntry ().end ()); + b != e; ++b) + { + o << ::std::endl << "entry: " << *b; + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Conference_medium_type& i) + { + if (i.getDisplay_text ()) + { + o << ::std::endl << "display-text: " << *i.getDisplay_text (); + } + + o << ::std::endl << "type: " << i.getType (); + if (i.getStatus ()) + { + o << ::std::endl << "status: " << *i.getStatus (); + } + + o << ::std::endl << "label: " << i.getLabel (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Uris_type& i) + { + for (Uris_type::EntryConstIterator + b (i.getEntry ().begin ()), e (i.getEntry ().end ()); + b != e; ++b) + { + o << ::std::endl << "entry: " << *b; + } + + o << ::std::endl << "state: " << i.getState (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Uri_type& i) + { + o << ::std::endl << "uri: " << i.getUri (); + if (i.getDisplay_text ()) + { + o << ::std::endl << "display-text: " << *i.getDisplay_text (); + } + + if (i.getPurpose ()) + { + o << ::std::endl << "purpose: " << *i.getPurpose (); + } + + if (i.getModified ()) + { + o << ::std::endl << "modified: " << *i.getModified (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Keywords_type& i) + { + return o << static_cast< const ::xsd::cxx::tree::list< ::xml_schema::String, char >& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, const Users_type& i) + { + for (Users_type::UserConstIterator + b (i.getUser ().begin ()), e (i.getUser ().end ()); + b != e; ++b) + { + o << ::std::endl << "user: " << *b; + } + + o << ::std::endl << "state: " << i.getState (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const User_type& i) + { + if (i.getDisplay_text ()) + { + o << ::std::endl << "display-text: " << *i.getDisplay_text (); + } + + if (i.getAssociated_aors ()) + { + o << ::std::endl << "associated-aors: " << *i.getAssociated_aors (); + } + + if (i.getRoles ()) + { + o << ::std::endl << "roles: " << *i.getRoles (); + } + + if (i.getLanguages ()) + { + o << ::std::endl << "languages: " << *i.getLanguages (); + } + + if (i.getCascaded_focus ()) + { + o << ::std::endl << "cascaded-focus: " << *i.getCascaded_focus (); + } + + for (User_type::EndpointConstIterator + b (i.getEndpoint ().begin ()), e (i.getEndpoint ().end ()); + b != e; ++b) + { + o << ::std::endl << "endpoint: " << *b; + } + + if (i.getEntity ()) + { + o << ::std::endl << "entity: " << *i.getEntity (); + } + + o << ::std::endl << "state: " << i.getState (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const User_roles_type& i) + { + for (User_roles_type::EntryConstIterator + b (i.getEntry ().begin ()), e (i.getEntry ().end ()); + b != e; ++b) + { + o << ::std::endl << "entry: " << *b; + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const User_languages_type& i) + { + return o << static_cast< const ::xsd::cxx::tree::list< ::xml_schema::Language, char >& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, const Endpoint_type& i) + { + if (i.getDisplay_text ()) + { + o << ::std::endl << "display-text: " << *i.getDisplay_text (); + } + + if (i.getReferred ()) + { + o << ::std::endl << "referred: " << *i.getReferred (); + } + + if (i.getStatus ()) + { + o << ::std::endl << "status: " << *i.getStatus (); + } + + if (i.getJoining_method ()) + { + o << ::std::endl << "joining-method: " << *i.getJoining_method (); + } + + if (i.getJoining_info ()) + { + o << ::std::endl << "joining-info: " << *i.getJoining_info (); + } + + if (i.getDisconnection_method ()) + { + o << ::std::endl << "disconnection-method: " << *i.getDisconnection_method (); + } + + if (i.getDisconnection_info ()) + { + o << ::std::endl << "disconnection-info: " << *i.getDisconnection_info (); + } + + for (Endpoint_type::MediaConstIterator + b (i.getMedia ().begin ()), e (i.getMedia ().end ()); + b != e; ++b) + { + o << ::std::endl << "media: " << *b; + } + + if (i.getCall_info ()) + { + o << ::std::endl << "call-info: " << *i.getCall_info (); + } + + if (i.getEntity ()) + { + o << ::std::endl << "entity: " << *i.getEntity (); + } + + o << ::std::endl << "state: " << i.getState (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, Endpoint_status_type::Value i) + { + return o << Endpoint_status_type::_xsd_Endpoint_status_type_literals_[i]; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Endpoint_status_type& i) + { + return o << static_cast< const ::xml_schema::String& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, Joining_type::Value i) + { + return o << Joining_type::_xsd_Joining_type_literals_[i]; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Joining_type& i) + { + return o << static_cast< const ::xml_schema::String& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, Disconnection_type::Value i) + { + return o << Disconnection_type::_xsd_Disconnection_type_literals_[i]; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Disconnection_type& i) + { + return o << static_cast< const ::xml_schema::String& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, const Execution_type& i) + { + if (i.getWhen ()) + { + o << ::std::endl << "when: " << *i.getWhen (); + } + + if (i.getReason ()) + { + o << ::std::endl << "reason: " << *i.getReason (); + } + + if (i.getBy ()) + { + o << ::std::endl << "by: " << *i.getBy (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Call_type& i) + { + if (i.getSip ()) + { + o << ::std::endl << "sip: " << *i.getSip (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Sip_dialog_id_type& i) + { + if (i.getDisplay_text ()) + { + o << ::std::endl << "display-text: " << *i.getDisplay_text (); + } + + o << ::std::endl << "call-id: " << i.getCall_id (); + o << ::std::endl << "from-tag: " << i.getFrom_tag (); + o << ::std::endl << "to-tag: " << i.getTo_tag (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Media_type& i) + { + if (i.getDisplay_text ()) + { + o << ::std::endl << "display-text: " << *i.getDisplay_text (); + } + + if (i.getType ()) + { + o << ::std::endl << "type: " << *i.getType (); + } + + if (i.getLabel ()) + { + o << ::std::endl << "label: " << *i.getLabel (); + } + + if (i.getSrc_id ()) + { + o << ::std::endl << "src-id: " << *i.getSrc_id (); + } + + if (i.getStatus ()) + { + o << ::std::endl << "status: " << *i.getStatus (); + } + + o << ::std::endl << "id: " << i.getId (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, Media_status_type::Value i) + { + return o << Media_status_type::_xsd_Media_status_type_literals_[i]; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Media_status_type& i) + { + return o << static_cast< const ::xml_schema::String& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, const Sidebars_by_val_type& i) + { + for (Sidebars_by_val_type::EntryConstIterator + b (i.getEntry ().begin ()), e (i.getEntry ().end ()); + b != e; ++b) + { + o << ::std::endl << "entry: " << *b; + } + + o << ::std::endl << "state: " << i.getState (); + return o; + } +} + +#include +#include +#include + +namespace conference_info +{ + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (const ::std::string& u, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::tree::error_handler< char > h; + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + u, h, p, f)); + + h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > (); + + return ::std::unique_ptr< ::conference_info::Conference_type > ( + ::conference_info::parseConference_info ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (const ::std::string& u, + ::xml_schema::ErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + u, h, p, f)); + + if (!d.get ()) + throw ::xsd::cxx::tree::parsing< char > (); + + return ::std::unique_ptr< ::conference_info::Conference_type > ( + ::conference_info::parseConference_info ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (const ::std::string& u, + ::xercesc::DOMErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + u, h, p, f)); + + if (!d.get ()) + throw ::xsd::cxx::tree::parsing< char > (); + + return ::std::unique_ptr< ::conference_info::Conference_type > ( + ::conference_info::parseConference_info ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::xml::sax::std_input_source isrc (is); + return ::conference_info::parseConference_info (isrc, f, p); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + ::xml_schema::ErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::xml::sax::std_input_source isrc (is); + return ::conference_info::parseConference_info (isrc, h, f, p); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + ::xercesc::DOMErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::sax::std_input_source isrc (is); + return ::conference_info::parseConference_info (isrc, h, f, p); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + const ::std::string& sid, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::xml::sax::std_input_source isrc (is, sid); + return ::conference_info::parseConference_info (isrc, f, p); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + const ::std::string& sid, + ::xml_schema::ErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::xml::sax::std_input_source isrc (is, sid); + return ::conference_info::parseConference_info (isrc, h, f, p); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + const ::std::string& sid, + ::xercesc::DOMErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::sax::std_input_source isrc (is, sid); + return ::conference_info::parseConference_info (isrc, h, f, p); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::xercesc::InputSource& i, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::tree::error_handler< char > h; + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + i, h, p, f)); + + h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > (); + + return ::std::unique_ptr< ::conference_info::Conference_type > ( + ::conference_info::parseConference_info ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::xercesc::InputSource& i, + ::xml_schema::ErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + i, h, p, f)); + + if (!d.get ()) + throw ::xsd::cxx::tree::parsing< char > (); + + return ::std::unique_ptr< ::conference_info::Conference_type > ( + ::conference_info::parseConference_info ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::xercesc::InputSource& i, + ::xercesc::DOMErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + i, h, p, f)); + + if (!d.get ()) + throw ::xsd::cxx::tree::parsing< char > (); + + return ::std::unique_ptr< ::conference_info::Conference_type > ( + ::conference_info::parseConference_info ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (const ::xercesc::DOMDocument& doc, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + if (f & ::xml_schema::Flags::keep_dom) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (true))); + + return ::std::unique_ptr< ::conference_info::Conference_type > ( + ::conference_info::parseConference_info ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + const ::xercesc::DOMElement& e (*doc.getDocumentElement ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (e)); + + if (n.name () == "conference-info" && + n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< ::conference_info::Conference_type > r ( + ::xsd::cxx::tree::traits< ::conference_info::Conference_type, char >::create ( + e, f, 0)); + return r; + } + + throw ::xsd::cxx::tree::unexpected_element < char > ( + n.name (), + n.namespace_ (), + "conference-info", + "urn:ietf:params:xml:ns:conference-info"); + } + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d, + ::xml_schema::Flags f, + const ::xml_schema::Properties&) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > c ( + ((f & ::xml_schema::Flags::keep_dom) && + !(f & ::xml_schema::Flags::own_dom)) + ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (true)) + : 0); + + ::xercesc::DOMDocument& doc (c.get () ? *c : *d); + const ::xercesc::DOMElement& e (*doc.getDocumentElement ()); + + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (e)); + + if (f & ::xml_schema::Flags::keep_dom) + doc.setUserData (::xml_schema::dom::treeNodeKey, + (c.get () ? &c : &d), + 0); + + if (n.name () == "conference-info" && + n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + ::std::unique_ptr< ::conference_info::Conference_type > r ( + ::xsd::cxx::tree::traits< ::conference_info::Conference_type, char >::create ( + e, f, 0)); + return r; + } + + throw ::xsd::cxx::tree::unexpected_element < char > ( + n.name (), + n.namespace_ (), + "conference-info", + "urn:ietf:params:xml:ns:conference-info"); + } +} + +#include +#include +#include + +namespace conference_info +{ + void + serializeConference_info (::std::ostream& o, + const ::conference_info::Conference_type& s, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0); + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::conference_info::serializeConference_info (s, m, f)); + + ::xsd::cxx::tree::error_handler< char > h; + + ::xsd::cxx::xml::dom::ostream_format_target t (o); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > (); + } + } + + void + serializeConference_info (::std::ostream& o, + const ::conference_info::Conference_type& s, + ::xml_schema::ErrorHandler& h, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0); + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::conference_info::serializeConference_info (s, m, f)); + ::xsd::cxx::xml::dom::ostream_format_target t (o); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + throw ::xsd::cxx::tree::serialization< char > (); + } + } + + void + serializeConference_info (::std::ostream& o, + const ::conference_info::Conference_type& s, + ::xercesc::DOMErrorHandler& h, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::conference_info::serializeConference_info (s, m, f)); + ::xsd::cxx::xml::dom::ostream_format_target t (o); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + throw ::xsd::cxx::tree::serialization< char > (); + } + } + + void + serializeConference_info (::xercesc::XMLFormatTarget& t, + const ::conference_info::Conference_type& s, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::conference_info::serializeConference_info (s, m, f)); + + ::xsd::cxx::tree::error_handler< char > h; + + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > (); + } + } + + void + serializeConference_info (::xercesc::XMLFormatTarget& t, + const ::conference_info::Conference_type& s, + ::xml_schema::ErrorHandler& h, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::conference_info::serializeConference_info (s, m, f)); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + throw ::xsd::cxx::tree::serialization< char > (); + } + } + + void + serializeConference_info (::xercesc::XMLFormatTarget& t, + const ::conference_info::Conference_type& s, + ::xercesc::DOMErrorHandler& h, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::conference_info::serializeConference_info (s, m, f)); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + throw ::xsd::cxx::tree::serialization< char > (); + } + } + + void + serializeConference_info (::xercesc::DOMDocument& d, + const ::conference_info::Conference_type& s, + ::xml_schema::Flags) + { + ::xercesc::DOMElement& e (*d.getDocumentElement ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (e)); + + if (n.name () == "conference-info" && + n.namespace_ () == "urn:ietf:params:xml:ns:conference-info") + { + e << s; + } + else + { + throw ::xsd::cxx::tree::unexpected_element < char > ( + n.name (), + n.namespace_ (), + "conference-info", + "urn:ietf:params:xml:ns:conference-info"); + } + } + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > + serializeConference_info (const ::conference_info::Conference_type& s, + const ::xml_schema::NamespaceInfomap& m, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::serialize< char > ( + "conference-info", + "urn:ietf:params:xml:ns:conference-info", + m, f)); + + ::conference_info::serializeConference_info (*d, s, f); + return d; + } + + void + operator<< (::xercesc::DOMElement& e, const Conference_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Conference_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // conference-description + // + if (i.getConference_description ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "conference-description", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getConference_description (); + } + + // host-info + // + if (i.getHost_info ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "host-info", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getHost_info (); + } + + // conference-state + // + if (i.getConference_state ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "conference-state", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getConference_state (); + } + + // users + // + if (i.getUsers ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "users", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getUsers (); + } + + // sidebars-by-ref + // + if (i.getSidebars_by_ref ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "sidebars-by-ref", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getSidebars_by_ref (); + } + + // sidebars-by-val + // + if (i.getSidebars_by_val ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "sidebars-by-val", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getSidebars_by_val (); + } + + // any + // + for (Conference_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // entity + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "entity", + e)); + + a << i.getEntity (); + } + + // state + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "state", + e)); + + a << i.getState (); + } + + // version + // + if (i.getVersion ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "version", + e)); + + a << *i.getVersion (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const State_type& i) + { + e << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const State_type& i) + { + a << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const State_type& i) + { + l << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Conference_description_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Conference_description_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-text + // + if (i.getDisplay_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisplay_text (); + } + + // subject + // + if (i.getSubject ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "subject", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getSubject (); + } + + // free-text + // + if (i.getFree_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "free-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getFree_text (); + } + + // keywords + // + if (i.getKeywords ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "keywords", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getKeywords (); + } + + // conf-uris + // + if (i.getConf_uris ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "conf-uris", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getConf_uris (); + } + + // service-uris + // + if (i.getService_uris ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "service-uris", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getService_uris (); + } + + // maximum-user-count + // + if (i.getMaximum_user_count ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "maximum-user-count", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getMaximum_user_count (); + } + + // available-media + // + if (i.getAvailable_media ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "available-media", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getAvailable_media (); + } + + // any + // + for (Conference_description_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Host_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Host_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-text + // + if (i.getDisplay_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisplay_text (); + } + + // web-page + // + if (i.getWeb_page ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "web-page", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getWeb_page (); + } + + // uris + // + if (i.getUris ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "uris", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getUris (); + } + + // any + // + for (Host_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Conference_state_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Conference_state_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // user-count + // + if (i.getUser_count ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "user-count", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getUser_count (); + } + + // active + // + if (i.getActive ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "active", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getActive (); + } + + // locked + // + if (i.getLocked ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "locked", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getLocked (); + } + + // any + // + for (Conference_state_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Conference_media_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Conference_media_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // entry + // + for (Conference_media_type::EntryConstIterator + b (i.getEntry ().begin ()), n (i.getEntry ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "entry", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *b; + } + } + + void + operator<< (::xercesc::DOMElement& e, const Conference_medium_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Conference_medium_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-text + // + if (i.getDisplay_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisplay_text (); + } + + // type + // + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "type", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << i.getType (); + } + + // status + // + if (i.getStatus ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "status", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getStatus (); + } + + // any + // + for (Conference_medium_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // label + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "label", + e)); + + a << i.getLabel (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Uris_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Uris_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // entry + // + for (Uris_type::EntryConstIterator + b (i.getEntry ().begin ()), n (i.getEntry ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "entry", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *b; + } + + // state + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "state", + e)); + + a << i.getState (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Uri_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Uri_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // uri + // + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "uri", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << i.getUri (); + } + + // display-text + // + if (i.getDisplay_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisplay_text (); + } + + // purpose + // + if (i.getPurpose ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "purpose", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getPurpose (); + } + + // modified + // + if (i.getModified ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "modified", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getModified (); + } + + // any + // + for (Uri_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Keywords_type& i) + { + e << static_cast< const ::xsd::cxx::tree::list< ::xml_schema::String, char >& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const Keywords_type& i) + { + a << static_cast< const ::xsd::cxx::tree::list< ::xml_schema::String, char >& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const Keywords_type& i) + { + l << static_cast< const ::xsd::cxx::tree::list< ::xml_schema::String, char >& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Users_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Users_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // user + // + for (Users_type::UserConstIterator + b (i.getUser ().begin ()), n (i.getUser ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "user", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *b; + } + + // any + // + for (Users_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // state + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "state", + e)); + + a << i.getState (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const User_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (User_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-text + // + if (i.getDisplay_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisplay_text (); + } + + // associated-aors + // + if (i.getAssociated_aors ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "associated-aors", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getAssociated_aors (); + } + + // roles + // + if (i.getRoles ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "roles", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getRoles (); + } + + // languages + // + if (i.getLanguages ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "languages", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getLanguages (); + } + + // cascaded-focus + // + if (i.getCascaded_focus ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "cascaded-focus", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getCascaded_focus (); + } + + // endpoint + // + for (User_type::EndpointConstIterator + b (i.getEndpoint ().begin ()), n (i.getEndpoint ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "endpoint", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *b; + } + + // any + // + for (User_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // entity + // + if (i.getEntity ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "entity", + e)); + + a << *i.getEntity (); + } + + // state + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "state", + e)); + + a << i.getState (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const User_roles_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (User_roles_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // entry + // + for (User_roles_type::EntryConstIterator + b (i.getEntry ().begin ()), n (i.getEntry ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "entry", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *b; + } + } + + void + operator<< (::xercesc::DOMElement& e, const User_languages_type& i) + { + e << static_cast< const ::xsd::cxx::tree::list< ::xml_schema::Language, char >& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const User_languages_type& i) + { + a << static_cast< const ::xsd::cxx::tree::list< ::xml_schema::Language, char >& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const User_languages_type& i) + { + l << static_cast< const ::xsd::cxx::tree::list< ::xml_schema::Language, char >& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Endpoint_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Endpoint_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-text + // + if (i.getDisplay_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisplay_text (); + } + + // referred + // + if (i.getReferred ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "referred", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getReferred (); + } + + // status + // + if (i.getStatus ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "status", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getStatus (); + } + + // joining-method + // + if (i.getJoining_method ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "joining-method", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getJoining_method (); + } + + // joining-info + // + if (i.getJoining_info ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "joining-info", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getJoining_info (); + } + + // disconnection-method + // + if (i.getDisconnection_method ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "disconnection-method", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisconnection_method (); + } + + // disconnection-info + // + if (i.getDisconnection_info ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "disconnection-info", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisconnection_info (); + } + + // media + // + for (Endpoint_type::MediaConstIterator + b (i.getMedia ().begin ()), n (i.getMedia ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "media", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *b; + } + + // call-info + // + if (i.getCall_info ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "call-info", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getCall_info (); + } + + // any + // + for (Endpoint_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // entity + // + if (i.getEntity ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "entity", + e)); + + a << *i.getEntity (); + } + + // state + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "state", + e)); + + a << i.getState (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Endpoint_status_type& i) + { + e << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const Endpoint_status_type& i) + { + a << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const Endpoint_status_type& i) + { + l << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Joining_type& i) + { + e << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const Joining_type& i) + { + a << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const Joining_type& i) + { + l << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Disconnection_type& i) + { + e << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const Disconnection_type& i) + { + a << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const Disconnection_type& i) + { + l << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Execution_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Execution_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // when + // + if (i.getWhen ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "when", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getWhen (); + } + + // reason + // + if (i.getReason ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "reason", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getReason (); + } + + // by + // + if (i.getBy ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "by", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getBy (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Call_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Call_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // sip + // + if (i.getSip ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "sip", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getSip (); + } + + // any + // + for (Call_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Sip_dialog_id_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Sip_dialog_id_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-text + // + if (i.getDisplay_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisplay_text (); + } + + // call-id + // + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "call-id", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << i.getCall_id (); + } + + // from-tag + // + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "from-tag", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << i.getFrom_tag (); + } + + // to-tag + // + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "to-tag", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << i.getTo_tag (); + } + + // any + // + for (Sip_dialog_id_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Media_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Media_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-text + // + if (i.getDisplay_text ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-text", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getDisplay_text (); + } + + // type + // + if (i.getType ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "type", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getType (); + } + + // label + // + if (i.getLabel ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "label", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getLabel (); + } + + // src-id + // + if (i.getSrc_id ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "src-id", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getSrc_id (); + } + + // status + // + if (i.getStatus ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "status", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *i.getStatus (); + } + + // any + // + for (Media_type::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // id + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "id", + e)); + + a << i.getId (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Media_status_type& i) + { + e << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const Media_status_type& i) + { + a << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const Media_status_type& i) + { + l << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Sidebars_by_val_type& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Sidebars_by_val_type::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // entry + // + for (Sidebars_by_val_type::EntryConstIterator + b (i.getEntry ().begin ()), n (i.getEntry ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "entry", + "urn:ietf:params:xml:ns:conference-info", + e)); + + s << *b; + } + + // state + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "state", + e)); + + a << i.getState (); + } + } +} + +#include + +// Begin epilogue. +// +// +// End epilogue. + diff --git a/src/conference/conference-info.hxx b/src/conference/conference-info.hxx new file mode 100644 index 000000000..45404038b --- /dev/null +++ b/src/conference/conference-info.hxx @@ -0,0 +1,3862 @@ +// Copyright (c) 2005-2014 Code Synthesis Tools CC +// +// This program was generated by CodeSynthesis XSD, an XML Schema to +// C++ data binding compiler. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// In addition, as a special exception, Code Synthesis Tools CC gives +// permission to link this program with the Xerces-C++ library (or with +// modified versions of Xerces-C++ that use the same license as Xerces-C++), +// and distribute linked combinations including the two. You must obey +// the GNU General Public License version 2 in all respects for all of +// the code used other than Xerces-C++. If you modify this copy of the +// program, you may extend this exception to your version of the program, +// but you are not obligated to do so. If you do not wish to do so, delete +// this exception statement from your version. +// +// Furthermore, Code Synthesis Tools CC makes a special exception for +// the Free/Libre and Open Source Software (FLOSS) which is described +// in the accompanying FLOSSE file. +// + +#ifndef CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_SRC_XML_CONFERENCE_INFO_HXX +#define CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_SRC_XML_CONFERENCE_INFO_HXX + +#ifndef XSD_CXX11 +#define XSD_CXX11 +#endif + +#ifndef XSD_USE_CHAR +#define XSD_USE_CHAR +#endif + +#ifndef XSD_CXX_TREE_USE_CHAR +#define XSD_CXX_TREE_USE_CHAR +#endif + +// Begin prologue. +// +// +// End prologue. + +#include + +#if (XSD_INT_VERSION != 4000000L) +#error XSD runtime version mismatch +#endif + +#include + +#include + +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace xml_schema +{ + // anyType and anySimpleType. + // + typedef ::xsd::cxx::tree::type Type; + typedef ::xsd::cxx::tree::simple_type< char, Type > SimpleType; + typedef ::xsd::cxx::tree::type Container; + + // 8-bit + // + typedef signed char Byte; + typedef unsigned char UnsignedByte; + + // 16-bit + // + typedef short Short; + typedef unsigned short UnsignedShort; + + // 32-bit + // + typedef int Int; + typedef unsigned int UnsignedInt; + + // 64-bit + // + typedef long long Long; + typedef unsigned long long UnsignedLong; + + // Supposed to be arbitrary-length integral types. + // + typedef long long Integer; + typedef long long NonPositiveInteger; + typedef unsigned long long NonNegativeInteger; + typedef unsigned long long PositiveInteger; + typedef long long NegativeInteger; + + // Boolean. + // + typedef bool Boolean; + + // Floating-point types. + // + typedef float Float; + typedef double Double; + typedef double Decimal; + + // String types. + // + typedef ::xsd::cxx::tree::string< char, SimpleType > String; + typedef ::xsd::cxx::tree::normalized_string< char, String > NormalizedString; + typedef ::xsd::cxx::tree::token< char, NormalizedString > Token; + typedef ::xsd::cxx::tree::name< char, Token > Name; + typedef ::xsd::cxx::tree::nmtoken< char, Token > Nmtoken; + typedef ::xsd::cxx::tree::nmtokens< char, SimpleType, Nmtoken > Nmtokens; + typedef ::xsd::cxx::tree::ncname< char, Name > Ncname; + typedef ::xsd::cxx::tree::language< char, Token > Language; + + // ID/IDREF. + // + typedef ::xsd::cxx::tree::id< char, Ncname > Id; + typedef ::xsd::cxx::tree::idref< char, Ncname, Type > Idref; + typedef ::xsd::cxx::tree::idrefs< char, SimpleType, Idref > Idrefs; + + // URI. + // + typedef ::xsd::cxx::tree::uri< char, SimpleType > Uri; + + // Qualified name. + // + typedef ::xsd::cxx::tree::qname< char, SimpleType, Uri, Ncname > Qname; + + // Binary. + // + typedef ::xsd::cxx::tree::buffer< char > Buffer; + typedef ::xsd::cxx::tree::base64_binary< char, SimpleType > Base64Binary; + typedef ::xsd::cxx::tree::hex_binary< char, SimpleType > HexBinary; + + // Date/time. + // + typedef ::xsd::cxx::tree::time_zone TimeZone; + typedef ::xsd::cxx::tree::date< char, SimpleType > Date; + typedef ::xsd::cxx::tree::date_time< char, SimpleType > DateTime; + typedef ::xsd::cxx::tree::duration< char, SimpleType > Duration; + typedef ::xsd::cxx::tree::gday< char, SimpleType > Gday; + typedef ::xsd::cxx::tree::gmonth< char, SimpleType > Gmonth; + typedef ::xsd::cxx::tree::gmonth_day< char, SimpleType > GmonthDay; + typedef ::xsd::cxx::tree::gyear< char, SimpleType > Gyear; + typedef ::xsd::cxx::tree::gyear_month< char, SimpleType > GyearMonth; + typedef ::xsd::cxx::tree::time< char, SimpleType > Time; + + // Entity. + // + typedef ::xsd::cxx::tree::entity< char, Ncname > Entity; + typedef ::xsd::cxx::tree::entities< char, SimpleType, Entity > Entities; + + typedef ::xsd::cxx::tree::content_order ContentOrder; + // Namespace information and list stream. Used in + // serialization functions. + // + typedef ::xsd::cxx::xml::dom::namespace_info< char > NamespaceInfo; + typedef ::xsd::cxx::xml::dom::namespace_infomap< char > NamespaceInfomap; + typedef ::xsd::cxx::tree::list_stream< char > ListStream; + typedef ::xsd::cxx::tree::as_double< Double > AsDouble; + typedef ::xsd::cxx::tree::as_decimal< Decimal > AsDecimal; + typedef ::xsd::cxx::tree::facet Facet; + + // Flags and properties. + // + typedef ::xsd::cxx::tree::flags Flags; + typedef ::xsd::cxx::tree::properties< char > Properties; + + // Parsing/serialization diagnostics. + // + typedef ::xsd::cxx::tree::severity Severity; + typedef ::xsd::cxx::tree::error< char > Error; + typedef ::xsd::cxx::tree::diagnostics< char > Diagnostics; + + // Exceptions. + // + typedef ::xsd::cxx::tree::exception< char > Exception; + typedef ::xsd::cxx::tree::bounds< char > Bounds; + typedef ::xsd::cxx::tree::duplicate_id< char > DuplicateId; + typedef ::xsd::cxx::tree::parsing< char > Parsing; + typedef ::xsd::cxx::tree::expected_element< char > ExpectedElement; + typedef ::xsd::cxx::tree::unexpected_element< char > UnexpectedElement; + typedef ::xsd::cxx::tree::expected_attribute< char > ExpectedAttribute; + typedef ::xsd::cxx::tree::unexpected_enumerator< char > UnexpectedEnumerator; + typedef ::xsd::cxx::tree::expected_text_content< char > ExpectedTextContent; + typedef ::xsd::cxx::tree::no_prefix_mapping< char > NoPrefixMapping; + typedef ::xsd::cxx::tree::serialization< char > Serialization; + + // Error handler callback interface. + // + typedef ::xsd::cxx::xml::error_handler< char > ErrorHandler; + + // DOM interaction. + // + namespace dom + { + // Automatic pointer for DOMDocument. + // + using ::xsd::cxx::xml::dom::unique_ptr; + +#ifndef XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA +#define XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA + // DOM user data key for back pointers to tree nodes. + // + const XMLCh* const treeNodeKey = ::xsd::cxx::tree::user_data_keys::node; +#endif + } +} + +// Forward declarations. +// +namespace conference_info +{ + class Conference_type; + class State_type; + class Conference_description_type; + class Host_type; + class Conference_state_type; + class Conference_media_type; + class Conference_medium_type; + class Uris_type; + class Uri_type; + class Keywords_type; + class Users_type; + class User_type; + class User_roles_type; + class User_languages_type; + class Endpoint_type; + class Endpoint_status_type; + class Joining_type; + class Disconnection_type; + class Execution_type; + class Call_type; + class Sip_dialog_id_type; + class Media_type; + class Media_status_type; + class Sidebars_by_val_type; +} + + +#include // ::std::unique_ptr +#include // std::numeric_limits +#include // std::binary_search +#include // std::move + +#include + +#include +#include +#include +#include + +#include + +#include + +#include "xml.hxx" + +namespace conference_info +{ + class Conference_type: public ::xml_schema::Type + { + public: + // conference-description + // + typedef ::conference_info::Conference_description_type Conference_descriptionType; + typedef ::xsd::cxx::tree::optional< Conference_descriptionType > Conference_descriptionOptional; + typedef ::xsd::cxx::tree::traits< Conference_descriptionType, char > Conference_descriptionTraits; + + const Conference_descriptionOptional& + getConference_description () const; + + Conference_descriptionOptional& + getConference_description (); + + void + setConference_description (const Conference_descriptionType& x); + + void + setConference_description (const Conference_descriptionOptional& x); + + void + setConference_description (::std::unique_ptr< Conference_descriptionType > p); + + // host-info + // + typedef ::conference_info::Host_type Host_infoType; + typedef ::xsd::cxx::tree::optional< Host_infoType > Host_infoOptional; + typedef ::xsd::cxx::tree::traits< Host_infoType, char > Host_infoTraits; + + const Host_infoOptional& + getHost_info () const; + + Host_infoOptional& + getHost_info (); + + void + setHost_info (const Host_infoType& x); + + void + setHost_info (const Host_infoOptional& x); + + void + setHost_info (::std::unique_ptr< Host_infoType > p); + + // conference-state + // + typedef ::conference_info::Conference_state_type Conference_stateType; + typedef ::xsd::cxx::tree::optional< Conference_stateType > Conference_stateOptional; + typedef ::xsd::cxx::tree::traits< Conference_stateType, char > Conference_stateTraits; + + const Conference_stateOptional& + getConference_state () const; + + Conference_stateOptional& + getConference_state (); + + void + setConference_state (const Conference_stateType& x); + + void + setConference_state (const Conference_stateOptional& x); + + void + setConference_state (::std::unique_ptr< Conference_stateType > p); + + // users + // + typedef ::conference_info::Users_type UsersType; + typedef ::xsd::cxx::tree::optional< UsersType > UsersOptional; + typedef ::xsd::cxx::tree::traits< UsersType, char > UsersTraits; + + const UsersOptional& + getUsers () const; + + UsersOptional& + getUsers (); + + void + setUsers (const UsersType& x); + + void + setUsers (const UsersOptional& x); + + void + setUsers (::std::unique_ptr< UsersType > p); + + // sidebars-by-ref + // + typedef ::conference_info::Uris_type Sidebars_by_refType; + typedef ::xsd::cxx::tree::optional< Sidebars_by_refType > Sidebars_by_refOptional; + typedef ::xsd::cxx::tree::traits< Sidebars_by_refType, char > Sidebars_by_refTraits; + + const Sidebars_by_refOptional& + getSidebars_by_ref () const; + + Sidebars_by_refOptional& + getSidebars_by_ref (); + + void + setSidebars_by_ref (const Sidebars_by_refType& x); + + void + setSidebars_by_ref (const Sidebars_by_refOptional& x); + + void + setSidebars_by_ref (::std::unique_ptr< Sidebars_by_refType > p); + + // sidebars-by-val + // + typedef ::conference_info::Sidebars_by_val_type Sidebars_by_valType; + typedef ::xsd::cxx::tree::optional< Sidebars_by_valType > Sidebars_by_valOptional; + typedef ::xsd::cxx::tree::traits< Sidebars_by_valType, char > Sidebars_by_valTraits; + + const Sidebars_by_valOptional& + getSidebars_by_val () const; + + Sidebars_by_valOptional& + getSidebars_by_val (); + + void + setSidebars_by_val (const Sidebars_by_valType& x); + + void + setSidebars_by_val (const Sidebars_by_valOptional& x); + + void + setSidebars_by_val (::std::unique_ptr< Sidebars_by_valType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // entity + // + typedef ::xml_schema::Uri EntityType; + typedef ::xsd::cxx::tree::traits< EntityType, char > EntityTraits; + + const EntityType& + getEntity () const; + + EntityType& + getEntity (); + + void + setEntity (const EntityType& x); + + void + setEntity (::std::unique_ptr< EntityType > p); + + ::std::unique_ptr< EntityType > + detachEntity (); + + // state + // + typedef ::conference_info::State_type StateType; + typedef ::xsd::cxx::tree::traits< StateType, char > StateTraits; + + const StateType& + getState () const; + + StateType& + getState (); + + void + setState (const StateType& x); + + void + setState (::std::unique_ptr< StateType > p); + + ::std::unique_ptr< StateType > + detachState (); + + static const StateType& + getStateDefaultValue (); + + // version + // + typedef ::xml_schema::UnsignedInt VersionType; + typedef ::xsd::cxx::tree::optional< VersionType > VersionOptional; + typedef ::xsd::cxx::tree::traits< VersionType, char > VersionTraits; + + const VersionOptional& + getVersion () const; + + VersionOptional& + getVersion (); + + void + setVersion (const VersionType& x); + + void + setVersion (const VersionOptional& x); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Conference_type (const EntityType&); + + Conference_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Conference_type (const Conference_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Conference_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Conference_type& + operator= (const Conference_type& x); + + virtual + ~Conference_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Conference_descriptionOptional conference_description_; + Host_infoOptional host_info_; + Conference_stateOptional conference_state_; + UsersOptional users_; + Sidebars_by_refOptional sidebars_by_ref_; + Sidebars_by_valOptional sidebars_by_val_; + AnySequence any_; + ::xsd::cxx::tree::one< EntityType > entity_; + ::xsd::cxx::tree::one< StateType > state_; + static const StateType state_default_value_; + VersionOptional version_; + AnyAttributeSet any_attribute_; + }; + + class State_type: public ::xml_schema::String + { + public: + enum Value + { + full, + partial, + deleted + }; + + State_type (Value v); + + State_type (const char* v); + + State_type (const ::std::string& v); + + State_type (const ::xml_schema::String& v); + + State_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + State_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + State_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + State_type (const State_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual State_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + State_type& + operator= (Value v); + + virtual + operator Value () const + { + return _xsd_State_type_convert (); + } + + protected: + Value + _xsd_State_type_convert () const; + + public: + static const char* const _xsd_State_type_literals_[3]; + static const Value _xsd_State_type_indexes_[3]; + }; + + class Conference_description_type: public ::xml_schema::Type + { + public: + // display-text + // + typedef ::xml_schema::String Display_textType; + typedef ::xsd::cxx::tree::optional< Display_textType > Display_textOptional; + typedef ::xsd::cxx::tree::traits< Display_textType, char > Display_textTraits; + + const Display_textOptional& + getDisplay_text () const; + + Display_textOptional& + getDisplay_text (); + + void + setDisplay_text (const Display_textType& x); + + void + setDisplay_text (const Display_textOptional& x); + + void + setDisplay_text (::std::unique_ptr< Display_textType > p); + + // subject + // + typedef ::xml_schema::String SubjectType; + typedef ::xsd::cxx::tree::optional< SubjectType > SubjectOptional; + typedef ::xsd::cxx::tree::traits< SubjectType, char > SubjectTraits; + + const SubjectOptional& + getSubject () const; + + SubjectOptional& + getSubject (); + + void + setSubject (const SubjectType& x); + + void + setSubject (const SubjectOptional& x); + + void + setSubject (::std::unique_ptr< SubjectType > p); + + // free-text + // + typedef ::xml_schema::String Free_textType; + typedef ::xsd::cxx::tree::optional< Free_textType > Free_textOptional; + typedef ::xsd::cxx::tree::traits< Free_textType, char > Free_textTraits; + + const Free_textOptional& + getFree_text () const; + + Free_textOptional& + getFree_text (); + + void + setFree_text (const Free_textType& x); + + void + setFree_text (const Free_textOptional& x); + + void + setFree_text (::std::unique_ptr< Free_textType > p); + + // keywords + // + typedef ::conference_info::Keywords_type KeywordsType; + typedef ::xsd::cxx::tree::optional< KeywordsType > KeywordsOptional; + typedef ::xsd::cxx::tree::traits< KeywordsType, char > KeywordsTraits; + + const KeywordsOptional& + getKeywords () const; + + KeywordsOptional& + getKeywords (); + + void + setKeywords (const KeywordsType& x); + + void + setKeywords (const KeywordsOptional& x); + + void + setKeywords (::std::unique_ptr< KeywordsType > p); + + // conf-uris + // + typedef ::conference_info::Uris_type Conf_urisType; + typedef ::xsd::cxx::tree::optional< Conf_urisType > Conf_urisOptional; + typedef ::xsd::cxx::tree::traits< Conf_urisType, char > Conf_urisTraits; + + const Conf_urisOptional& + getConf_uris () const; + + Conf_urisOptional& + getConf_uris (); + + void + setConf_uris (const Conf_urisType& x); + + void + setConf_uris (const Conf_urisOptional& x); + + void + setConf_uris (::std::unique_ptr< Conf_urisType > p); + + // service-uris + // + typedef ::conference_info::Uris_type Service_urisType; + typedef ::xsd::cxx::tree::optional< Service_urisType > Service_urisOptional; + typedef ::xsd::cxx::tree::traits< Service_urisType, char > Service_urisTraits; + + const Service_urisOptional& + getService_uris () const; + + Service_urisOptional& + getService_uris (); + + void + setService_uris (const Service_urisType& x); + + void + setService_uris (const Service_urisOptional& x); + + void + setService_uris (::std::unique_ptr< Service_urisType > p); + + // maximum-user-count + // + typedef ::xml_schema::UnsignedInt Maximum_user_countType; + typedef ::xsd::cxx::tree::optional< Maximum_user_countType > Maximum_user_countOptional; + typedef ::xsd::cxx::tree::traits< Maximum_user_countType, char > Maximum_user_countTraits; + + const Maximum_user_countOptional& + getMaximum_user_count () const; + + Maximum_user_countOptional& + getMaximum_user_count (); + + void + setMaximum_user_count (const Maximum_user_countType& x); + + void + setMaximum_user_count (const Maximum_user_countOptional& x); + + // available-media + // + typedef ::conference_info::Conference_media_type Available_mediaType; + typedef ::xsd::cxx::tree::optional< Available_mediaType > Available_mediaOptional; + typedef ::xsd::cxx::tree::traits< Available_mediaType, char > Available_mediaTraits; + + const Available_mediaOptional& + getAvailable_media () const; + + Available_mediaOptional& + getAvailable_media (); + + void + setAvailable_media (const Available_mediaType& x); + + void + setAvailable_media (const Available_mediaOptional& x); + + void + setAvailable_media (::std::unique_ptr< Available_mediaType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Conference_description_type (); + + Conference_description_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Conference_description_type (const Conference_description_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Conference_description_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Conference_description_type& + operator= (const Conference_description_type& x); + + virtual + ~Conference_description_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_textOptional display_text_; + SubjectOptional subject_; + Free_textOptional free_text_; + KeywordsOptional keywords_; + Conf_urisOptional conf_uris_; + Service_urisOptional service_uris_; + Maximum_user_countOptional maximum_user_count_; + Available_mediaOptional available_media_; + AnySequence any_; + AnyAttributeSet any_attribute_; + }; + + class Host_type: public ::xml_schema::Type + { + public: + // display-text + // + typedef ::xml_schema::String Display_textType; + typedef ::xsd::cxx::tree::optional< Display_textType > Display_textOptional; + typedef ::xsd::cxx::tree::traits< Display_textType, char > Display_textTraits; + + const Display_textOptional& + getDisplay_text () const; + + Display_textOptional& + getDisplay_text (); + + void + setDisplay_text (const Display_textType& x); + + void + setDisplay_text (const Display_textOptional& x); + + void + setDisplay_text (::std::unique_ptr< Display_textType > p); + + // web-page + // + typedef ::xml_schema::Uri Web_pageType; + typedef ::xsd::cxx::tree::optional< Web_pageType > Web_pageOptional; + typedef ::xsd::cxx::tree::traits< Web_pageType, char > Web_pageTraits; + + const Web_pageOptional& + getWeb_page () const; + + Web_pageOptional& + getWeb_page (); + + void + setWeb_page (const Web_pageType& x); + + void + setWeb_page (const Web_pageOptional& x); + + void + setWeb_page (::std::unique_ptr< Web_pageType > p); + + // uris + // + typedef ::conference_info::Uris_type UrisType; + typedef ::xsd::cxx::tree::optional< UrisType > UrisOptional; + typedef ::xsd::cxx::tree::traits< UrisType, char > UrisTraits; + + const UrisOptional& + getUris () const; + + UrisOptional& + getUris (); + + void + setUris (const UrisType& x); + + void + setUris (const UrisOptional& x); + + void + setUris (::std::unique_ptr< UrisType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Host_type (); + + Host_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Host_type (const Host_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Host_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Host_type& + operator= (const Host_type& x); + + virtual + ~Host_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_textOptional display_text_; + Web_pageOptional web_page_; + UrisOptional uris_; + AnySequence any_; + AnyAttributeSet any_attribute_; + }; + + class Conference_state_type: public ::xml_schema::Type + { + public: + // user-count + // + typedef ::xml_schema::UnsignedInt User_countType; + typedef ::xsd::cxx::tree::optional< User_countType > User_countOptional; + typedef ::xsd::cxx::tree::traits< User_countType, char > User_countTraits; + + const User_countOptional& + getUser_count () const; + + User_countOptional& + getUser_count (); + + void + setUser_count (const User_countType& x); + + void + setUser_count (const User_countOptional& x); + + // active + // + typedef ::xml_schema::Boolean ActiveType; + typedef ::xsd::cxx::tree::optional< ActiveType > ActiveOptional; + typedef ::xsd::cxx::tree::traits< ActiveType, char > ActiveTraits; + + const ActiveOptional& + getActive () const; + + ActiveOptional& + getActive (); + + void + setActive (const ActiveType& x); + + void + setActive (const ActiveOptional& x); + + // locked + // + typedef ::xml_schema::Boolean LockedType; + typedef ::xsd::cxx::tree::optional< LockedType > LockedOptional; + typedef ::xsd::cxx::tree::traits< LockedType, char > LockedTraits; + + const LockedOptional& + getLocked () const; + + LockedOptional& + getLocked (); + + void + setLocked (const LockedType& x); + + void + setLocked (const LockedOptional& x); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Conference_state_type (); + + Conference_state_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Conference_state_type (const Conference_state_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Conference_state_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Conference_state_type& + operator= (const Conference_state_type& x); + + virtual + ~Conference_state_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + User_countOptional user_count_; + ActiveOptional active_; + LockedOptional locked_; + AnySequence any_; + AnyAttributeSet any_attribute_; + }; + + class Conference_media_type: public ::xml_schema::Type + { + public: + // entry + // + typedef ::conference_info::Conference_medium_type EntryType; + typedef ::xsd::cxx::tree::sequence< EntryType > EntrySequence; + typedef EntrySequence::iterator EntryIterator; + typedef EntrySequence::const_iterator EntryConstIterator; + typedef ::xsd::cxx::tree::traits< EntryType, char > EntryTraits; + + const EntrySequence& + getEntry () const; + + EntrySequence& + getEntry (); + + void + setEntry (const EntrySequence& s); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Conference_media_type (); + + Conference_media_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Conference_media_type (const Conference_media_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Conference_media_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Conference_media_type& + operator= (const Conference_media_type& x); + + virtual + ~Conference_media_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + EntrySequence entry_; + AnyAttributeSet any_attribute_; + }; + + class Conference_medium_type: public ::xml_schema::Type + { + public: + // display-text + // + typedef ::xml_schema::String Display_textType; + typedef ::xsd::cxx::tree::optional< Display_textType > Display_textOptional; + typedef ::xsd::cxx::tree::traits< Display_textType, char > Display_textTraits; + + const Display_textOptional& + getDisplay_text () const; + + Display_textOptional& + getDisplay_text (); + + void + setDisplay_text (const Display_textType& x); + + void + setDisplay_text (const Display_textOptional& x); + + void + setDisplay_text (::std::unique_ptr< Display_textType > p); + + // type + // + typedef ::xml_schema::String TypeType; + typedef ::xsd::cxx::tree::traits< TypeType, char > TypeTraits; + + const TypeType& + getType () const; + + TypeType& + getType (); + + void + setType (const TypeType& x); + + void + setType (::std::unique_ptr< TypeType > p); + + ::std::unique_ptr< TypeType > + detachType (); + + // status + // + typedef ::conference_info::Media_status_type StatusType; + typedef ::xsd::cxx::tree::optional< StatusType > StatusOptional; + typedef ::xsd::cxx::tree::traits< StatusType, char > StatusTraits; + + const StatusOptional& + getStatus () const; + + StatusOptional& + getStatus (); + + void + setStatus (const StatusType& x); + + void + setStatus (const StatusOptional& x); + + void + setStatus (::std::unique_ptr< StatusType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // label + // + typedef ::xml_schema::String LabelType; + typedef ::xsd::cxx::tree::traits< LabelType, char > LabelTraits; + + const LabelType& + getLabel () const; + + LabelType& + getLabel (); + + void + setLabel (const LabelType& x); + + void + setLabel (::std::unique_ptr< LabelType > p); + + ::std::unique_ptr< LabelType > + detachLabel (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Conference_medium_type (const TypeType&, + const LabelType&); + + Conference_medium_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Conference_medium_type (const Conference_medium_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Conference_medium_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Conference_medium_type& + operator= (const Conference_medium_type& x); + + virtual + ~Conference_medium_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_textOptional display_text_; + ::xsd::cxx::tree::one< TypeType > type_; + StatusOptional status_; + AnySequence any_; + ::xsd::cxx::tree::one< LabelType > label_; + AnyAttributeSet any_attribute_; + }; + + class Uris_type: public ::xml_schema::Type + { + public: + // entry + // + typedef ::conference_info::Uri_type EntryType; + typedef ::xsd::cxx::tree::sequence< EntryType > EntrySequence; + typedef EntrySequence::iterator EntryIterator; + typedef EntrySequence::const_iterator EntryConstIterator; + typedef ::xsd::cxx::tree::traits< EntryType, char > EntryTraits; + + const EntrySequence& + getEntry () const; + + EntrySequence& + getEntry (); + + void + setEntry (const EntrySequence& s); + + // state + // + typedef ::conference_info::State_type StateType; + typedef ::xsd::cxx::tree::traits< StateType, char > StateTraits; + + const StateType& + getState () const; + + StateType& + getState (); + + void + setState (const StateType& x); + + void + setState (::std::unique_ptr< StateType > p); + + ::std::unique_ptr< StateType > + detachState (); + + static const StateType& + getStateDefaultValue (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Uris_type (); + + Uris_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Uris_type (const Uris_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Uris_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Uris_type& + operator= (const Uris_type& x); + + virtual + ~Uris_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + EntrySequence entry_; + ::xsd::cxx::tree::one< StateType > state_; + static const StateType state_default_value_; + AnyAttributeSet any_attribute_; + }; + + class Uri_type: public ::xml_schema::Type + { + public: + // uri + // + typedef ::xml_schema::Uri UriType; + typedef ::xsd::cxx::tree::traits< UriType, char > UriTraits; + + const UriType& + getUri () const; + + UriType& + getUri (); + + void + setUri (const UriType& x); + + void + setUri (::std::unique_ptr< UriType > p); + + ::std::unique_ptr< UriType > + detachUri (); + + // display-text + // + typedef ::xml_schema::String Display_textType; + typedef ::xsd::cxx::tree::optional< Display_textType > Display_textOptional; + typedef ::xsd::cxx::tree::traits< Display_textType, char > Display_textTraits; + + const Display_textOptional& + getDisplay_text () const; + + Display_textOptional& + getDisplay_text (); + + void + setDisplay_text (const Display_textType& x); + + void + setDisplay_text (const Display_textOptional& x); + + void + setDisplay_text (::std::unique_ptr< Display_textType > p); + + // purpose + // + typedef ::xml_schema::String PurposeType; + typedef ::xsd::cxx::tree::optional< PurposeType > PurposeOptional; + typedef ::xsd::cxx::tree::traits< PurposeType, char > PurposeTraits; + + const PurposeOptional& + getPurpose () const; + + PurposeOptional& + getPurpose (); + + void + setPurpose (const PurposeType& x); + + void + setPurpose (const PurposeOptional& x); + + void + setPurpose (::std::unique_ptr< PurposeType > p); + + // modified + // + typedef ::conference_info::Execution_type ModifiedType; + typedef ::xsd::cxx::tree::optional< ModifiedType > ModifiedOptional; + typedef ::xsd::cxx::tree::traits< ModifiedType, char > ModifiedTraits; + + const ModifiedOptional& + getModified () const; + + ModifiedOptional& + getModified (); + + void + setModified (const ModifiedType& x); + + void + setModified (const ModifiedOptional& x); + + void + setModified (::std::unique_ptr< ModifiedType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Uri_type (const UriType&); + + Uri_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Uri_type (const Uri_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Uri_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Uri_type& + operator= (const Uri_type& x); + + virtual + ~Uri_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + ::xsd::cxx::tree::one< UriType > uri_; + Display_textOptional display_text_; + PurposeOptional purpose_; + ModifiedOptional modified_; + AnySequence any_; + AnyAttributeSet any_attribute_; + }; + + class Keywords_type: public ::xml_schema::SimpleType, + public ::xsd::cxx::tree::list< ::xml_schema::String, char > + { + public: + Keywords_type (); + + Keywords_type (size_type n, const ::xml_schema::String& x); + + template < typename I > + Keywords_type (const I& begin, const I& end) + : ::xsd::cxx::tree::list< ::xml_schema::String, char > (begin, end, this) + { + } + + Keywords_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Keywords_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Keywords_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Keywords_type (const Keywords_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Keywords_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + virtual + ~Keywords_type (); + }; + + class Users_type: public ::xml_schema::Type + { + public: + // user + // + typedef ::conference_info::User_type UserType; + typedef ::xsd::cxx::tree::sequence< UserType > UserSequence; + typedef UserSequence::iterator UserIterator; + typedef UserSequence::const_iterator UserConstIterator; + typedef ::xsd::cxx::tree::traits< UserType, char > UserTraits; + + const UserSequence& + getUser () const; + + UserSequence& + getUser (); + + void + setUser (const UserSequence& s); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // state + // + typedef ::conference_info::State_type StateType; + typedef ::xsd::cxx::tree::traits< StateType, char > StateTraits; + + const StateType& + getState () const; + + StateType& + getState (); + + void + setState (const StateType& x); + + void + setState (::std::unique_ptr< StateType > p); + + ::std::unique_ptr< StateType > + detachState (); + + static const StateType& + getStateDefaultValue (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Users_type (); + + Users_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Users_type (const Users_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Users_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Users_type& + operator= (const Users_type& x); + + virtual + ~Users_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + UserSequence user_; + AnySequence any_; + ::xsd::cxx::tree::one< StateType > state_; + static const StateType state_default_value_; + AnyAttributeSet any_attribute_; + }; + + class User_type: public ::xml_schema::Type + { + public: + // display-text + // + typedef ::xml_schema::String Display_textType; + typedef ::xsd::cxx::tree::optional< Display_textType > Display_textOptional; + typedef ::xsd::cxx::tree::traits< Display_textType, char > Display_textTraits; + + const Display_textOptional& + getDisplay_text () const; + + Display_textOptional& + getDisplay_text (); + + void + setDisplay_text (const Display_textType& x); + + void + setDisplay_text (const Display_textOptional& x); + + void + setDisplay_text (::std::unique_ptr< Display_textType > p); + + // associated-aors + // + typedef ::conference_info::Uris_type Associated_aorsType; + typedef ::xsd::cxx::tree::optional< Associated_aorsType > Associated_aorsOptional; + typedef ::xsd::cxx::tree::traits< Associated_aorsType, char > Associated_aorsTraits; + + const Associated_aorsOptional& + getAssociated_aors () const; + + Associated_aorsOptional& + getAssociated_aors (); + + void + setAssociated_aors (const Associated_aorsType& x); + + void + setAssociated_aors (const Associated_aorsOptional& x); + + void + setAssociated_aors (::std::unique_ptr< Associated_aorsType > p); + + // roles + // + typedef ::conference_info::User_roles_type RolesType; + typedef ::xsd::cxx::tree::optional< RolesType > RolesOptional; + typedef ::xsd::cxx::tree::traits< RolesType, char > RolesTraits; + + const RolesOptional& + getRoles () const; + + RolesOptional& + getRoles (); + + void + setRoles (const RolesType& x); + + void + setRoles (const RolesOptional& x); + + void + setRoles (::std::unique_ptr< RolesType > p); + + // languages + // + typedef ::conference_info::User_languages_type LanguagesType; + typedef ::xsd::cxx::tree::optional< LanguagesType > LanguagesOptional; + typedef ::xsd::cxx::tree::traits< LanguagesType, char > LanguagesTraits; + + const LanguagesOptional& + getLanguages () const; + + LanguagesOptional& + getLanguages (); + + void + setLanguages (const LanguagesType& x); + + void + setLanguages (const LanguagesOptional& x); + + void + setLanguages (::std::unique_ptr< LanguagesType > p); + + // cascaded-focus + // + typedef ::xml_schema::Uri Cascaded_focusType; + typedef ::xsd::cxx::tree::optional< Cascaded_focusType > Cascaded_focusOptional; + typedef ::xsd::cxx::tree::traits< Cascaded_focusType, char > Cascaded_focusTraits; + + const Cascaded_focusOptional& + getCascaded_focus () const; + + Cascaded_focusOptional& + getCascaded_focus (); + + void + setCascaded_focus (const Cascaded_focusType& x); + + void + setCascaded_focus (const Cascaded_focusOptional& x); + + void + setCascaded_focus (::std::unique_ptr< Cascaded_focusType > p); + + // endpoint + // + typedef ::conference_info::Endpoint_type EndpointType; + typedef ::xsd::cxx::tree::sequence< EndpointType > EndpointSequence; + typedef EndpointSequence::iterator EndpointIterator; + typedef EndpointSequence::const_iterator EndpointConstIterator; + typedef ::xsd::cxx::tree::traits< EndpointType, char > EndpointTraits; + + const EndpointSequence& + getEndpoint () const; + + EndpointSequence& + getEndpoint (); + + void + setEndpoint (const EndpointSequence& s); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // entity + // + typedef ::xml_schema::Uri EntityType; + typedef ::xsd::cxx::tree::optional< EntityType > EntityOptional; + typedef ::xsd::cxx::tree::traits< EntityType, char > EntityTraits; + + const EntityOptional& + getEntity () const; + + EntityOptional& + getEntity (); + + void + setEntity (const EntityType& x); + + void + setEntity (const EntityOptional& x); + + void + setEntity (::std::unique_ptr< EntityType > p); + + // state + // + typedef ::conference_info::State_type StateType; + typedef ::xsd::cxx::tree::traits< StateType, char > StateTraits; + + const StateType& + getState () const; + + StateType& + getState (); + + void + setState (const StateType& x); + + void + setState (::std::unique_ptr< StateType > p); + + ::std::unique_ptr< StateType > + detachState (); + + static const StateType& + getStateDefaultValue (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + User_type (); + + User_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + User_type (const User_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual User_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + User_type& + operator= (const User_type& x); + + virtual + ~User_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_textOptional display_text_; + Associated_aorsOptional associated_aors_; + RolesOptional roles_; + LanguagesOptional languages_; + Cascaded_focusOptional cascaded_focus_; + EndpointSequence endpoint_; + AnySequence any_; + EntityOptional entity_; + ::xsd::cxx::tree::one< StateType > state_; + static const StateType state_default_value_; + AnyAttributeSet any_attribute_; + }; + + class User_roles_type: public ::xml_schema::Type + { + public: + // entry + // + typedef ::xml_schema::String EntryType; + typedef ::xsd::cxx::tree::sequence< EntryType > EntrySequence; + typedef EntrySequence::iterator EntryIterator; + typedef EntrySequence::const_iterator EntryConstIterator; + typedef ::xsd::cxx::tree::traits< EntryType, char > EntryTraits; + + const EntrySequence& + getEntry () const; + + EntrySequence& + getEntry (); + + void + setEntry (const EntrySequence& s); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + User_roles_type (); + + User_roles_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + User_roles_type (const User_roles_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual User_roles_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + User_roles_type& + operator= (const User_roles_type& x); + + virtual + ~User_roles_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + EntrySequence entry_; + AnyAttributeSet any_attribute_; + }; + + class User_languages_type: public ::xml_schema::SimpleType, + public ::xsd::cxx::tree::list< ::xml_schema::Language, char > + { + public: + User_languages_type (); + + User_languages_type (size_type n, const ::xml_schema::Language& x); + + template < typename I > + User_languages_type (const I& begin, const I& end) + : ::xsd::cxx::tree::list< ::xml_schema::Language, char > (begin, end, this) + { + } + + User_languages_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + User_languages_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + User_languages_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + User_languages_type (const User_languages_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual User_languages_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + virtual + ~User_languages_type (); + }; + + class Endpoint_type: public ::xml_schema::Type + { + public: + // display-text + // + typedef ::xml_schema::String Display_textType; + typedef ::xsd::cxx::tree::optional< Display_textType > Display_textOptional; + typedef ::xsd::cxx::tree::traits< Display_textType, char > Display_textTraits; + + const Display_textOptional& + getDisplay_text () const; + + Display_textOptional& + getDisplay_text (); + + void + setDisplay_text (const Display_textType& x); + + void + setDisplay_text (const Display_textOptional& x); + + void + setDisplay_text (::std::unique_ptr< Display_textType > p); + + // referred + // + typedef ::conference_info::Execution_type ReferredType; + typedef ::xsd::cxx::tree::optional< ReferredType > ReferredOptional; + typedef ::xsd::cxx::tree::traits< ReferredType, char > ReferredTraits; + + const ReferredOptional& + getReferred () const; + + ReferredOptional& + getReferred (); + + void + setReferred (const ReferredType& x); + + void + setReferred (const ReferredOptional& x); + + void + setReferred (::std::unique_ptr< ReferredType > p); + + // status + // + typedef ::conference_info::Endpoint_status_type StatusType; + typedef ::xsd::cxx::tree::optional< StatusType > StatusOptional; + typedef ::xsd::cxx::tree::traits< StatusType, char > StatusTraits; + + const StatusOptional& + getStatus () const; + + StatusOptional& + getStatus (); + + void + setStatus (const StatusType& x); + + void + setStatus (const StatusOptional& x); + + void + setStatus (::std::unique_ptr< StatusType > p); + + // joining-method + // + typedef ::conference_info::Joining_type Joining_methodType; + typedef ::xsd::cxx::tree::optional< Joining_methodType > Joining_methodOptional; + typedef ::xsd::cxx::tree::traits< Joining_methodType, char > Joining_methodTraits; + + const Joining_methodOptional& + getJoining_method () const; + + Joining_methodOptional& + getJoining_method (); + + void + setJoining_method (const Joining_methodType& x); + + void + setJoining_method (const Joining_methodOptional& x); + + void + setJoining_method (::std::unique_ptr< Joining_methodType > p); + + // joining-info + // + typedef ::conference_info::Execution_type Joining_infoType; + typedef ::xsd::cxx::tree::optional< Joining_infoType > Joining_infoOptional; + typedef ::xsd::cxx::tree::traits< Joining_infoType, char > Joining_infoTraits; + + const Joining_infoOptional& + getJoining_info () const; + + Joining_infoOptional& + getJoining_info (); + + void + setJoining_info (const Joining_infoType& x); + + void + setJoining_info (const Joining_infoOptional& x); + + void + setJoining_info (::std::unique_ptr< Joining_infoType > p); + + // disconnection-method + // + typedef ::conference_info::Disconnection_type Disconnection_methodType; + typedef ::xsd::cxx::tree::optional< Disconnection_methodType > Disconnection_methodOptional; + typedef ::xsd::cxx::tree::traits< Disconnection_methodType, char > Disconnection_methodTraits; + + const Disconnection_methodOptional& + getDisconnection_method () const; + + Disconnection_methodOptional& + getDisconnection_method (); + + void + setDisconnection_method (const Disconnection_methodType& x); + + void + setDisconnection_method (const Disconnection_methodOptional& x); + + void + setDisconnection_method (::std::unique_ptr< Disconnection_methodType > p); + + // disconnection-info + // + typedef ::conference_info::Execution_type Disconnection_infoType; + typedef ::xsd::cxx::tree::optional< Disconnection_infoType > Disconnection_infoOptional; + typedef ::xsd::cxx::tree::traits< Disconnection_infoType, char > Disconnection_infoTraits; + + const Disconnection_infoOptional& + getDisconnection_info () const; + + Disconnection_infoOptional& + getDisconnection_info (); + + void + setDisconnection_info (const Disconnection_infoType& x); + + void + setDisconnection_info (const Disconnection_infoOptional& x); + + void + setDisconnection_info (::std::unique_ptr< Disconnection_infoType > p); + + // media + // + typedef ::conference_info::Media_type MediaType; + typedef ::xsd::cxx::tree::sequence< MediaType > MediaSequence; + typedef MediaSequence::iterator MediaIterator; + typedef MediaSequence::const_iterator MediaConstIterator; + typedef ::xsd::cxx::tree::traits< MediaType, char > MediaTraits; + + const MediaSequence& + getMedia () const; + + MediaSequence& + getMedia (); + + void + setMedia (const MediaSequence& s); + + // call-info + // + typedef ::conference_info::Call_type Call_infoType; + typedef ::xsd::cxx::tree::optional< Call_infoType > Call_infoOptional; + typedef ::xsd::cxx::tree::traits< Call_infoType, char > Call_infoTraits; + + const Call_infoOptional& + getCall_info () const; + + Call_infoOptional& + getCall_info (); + + void + setCall_info (const Call_infoType& x); + + void + setCall_info (const Call_infoOptional& x); + + void + setCall_info (::std::unique_ptr< Call_infoType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // entity + // + typedef ::xml_schema::String EntityType; + typedef ::xsd::cxx::tree::optional< EntityType > EntityOptional; + typedef ::xsd::cxx::tree::traits< EntityType, char > EntityTraits; + + const EntityOptional& + getEntity () const; + + EntityOptional& + getEntity (); + + void + setEntity (const EntityType& x); + + void + setEntity (const EntityOptional& x); + + void + setEntity (::std::unique_ptr< EntityType > p); + + // state + // + typedef ::conference_info::State_type StateType; + typedef ::xsd::cxx::tree::traits< StateType, char > StateTraits; + + const StateType& + getState () const; + + StateType& + getState (); + + void + setState (const StateType& x); + + void + setState (::std::unique_ptr< StateType > p); + + ::std::unique_ptr< StateType > + detachState (); + + static const StateType& + getStateDefaultValue (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Endpoint_type (); + + Endpoint_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Endpoint_type (const Endpoint_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Endpoint_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Endpoint_type& + operator= (const Endpoint_type& x); + + virtual + ~Endpoint_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_textOptional display_text_; + ReferredOptional referred_; + StatusOptional status_; + Joining_methodOptional joining_method_; + Joining_infoOptional joining_info_; + Disconnection_methodOptional disconnection_method_; + Disconnection_infoOptional disconnection_info_; + MediaSequence media_; + Call_infoOptional call_info_; + AnySequence any_; + EntityOptional entity_; + ::xsd::cxx::tree::one< StateType > state_; + static const StateType state_default_value_; + AnyAttributeSet any_attribute_; + }; + + class Endpoint_status_type: public ::xml_schema::String + { + public: + enum Value + { + pending, + dialing_out, + dialing_in, + alerting, + on_hold, + connected, + muted_via_focus, + disconnecting, + disconnected + }; + + Endpoint_status_type (Value v); + + Endpoint_status_type (const char* v); + + Endpoint_status_type (const ::std::string& v); + + Endpoint_status_type (const ::xml_schema::String& v); + + Endpoint_status_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Endpoint_status_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Endpoint_status_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Endpoint_status_type (const Endpoint_status_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Endpoint_status_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Endpoint_status_type& + operator= (Value v); + + virtual + operator Value () const + { + return _xsd_Endpoint_status_type_convert (); + } + + protected: + Value + _xsd_Endpoint_status_type_convert () const; + + public: + static const char* const _xsd_Endpoint_status_type_literals_[9]; + static const Value _xsd_Endpoint_status_type_indexes_[9]; + }; + + class Joining_type: public ::xml_schema::String + { + public: + enum Value + { + dialed_in, + dialed_out, + focus_owner + }; + + Joining_type (Value v); + + Joining_type (const char* v); + + Joining_type (const ::std::string& v); + + Joining_type (const ::xml_schema::String& v); + + Joining_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Joining_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Joining_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Joining_type (const Joining_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Joining_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Joining_type& + operator= (Value v); + + virtual + operator Value () const + { + return _xsd_Joining_type_convert (); + } + + protected: + Value + _xsd_Joining_type_convert () const; + + public: + static const char* const _xsd_Joining_type_literals_[3]; + static const Value _xsd_Joining_type_indexes_[3]; + }; + + class Disconnection_type: public ::xml_schema::String + { + public: + enum Value + { + departed, + booted, + failed, + busy + }; + + Disconnection_type (Value v); + + Disconnection_type (const char* v); + + Disconnection_type (const ::std::string& v); + + Disconnection_type (const ::xml_schema::String& v); + + Disconnection_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Disconnection_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Disconnection_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Disconnection_type (const Disconnection_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Disconnection_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Disconnection_type& + operator= (Value v); + + virtual + operator Value () const + { + return _xsd_Disconnection_type_convert (); + } + + protected: + Value + _xsd_Disconnection_type_convert () const; + + public: + static const char* const _xsd_Disconnection_type_literals_[4]; + static const Value _xsd_Disconnection_type_indexes_[4]; + }; + + class Execution_type: public ::xml_schema::Type + { + public: + // when + // + typedef ::xml_schema::DateTime WhenType; + typedef ::xsd::cxx::tree::optional< WhenType > WhenOptional; + typedef ::xsd::cxx::tree::traits< WhenType, char > WhenTraits; + + const WhenOptional& + getWhen () const; + + WhenOptional& + getWhen (); + + void + setWhen (const WhenType& x); + + void + setWhen (const WhenOptional& x); + + void + setWhen (::std::unique_ptr< WhenType > p); + + // reason + // + typedef ::xml_schema::String ReasonType; + typedef ::xsd::cxx::tree::optional< ReasonType > ReasonOptional; + typedef ::xsd::cxx::tree::traits< ReasonType, char > ReasonTraits; + + const ReasonOptional& + getReason () const; + + ReasonOptional& + getReason (); + + void + setReason (const ReasonType& x); + + void + setReason (const ReasonOptional& x); + + void + setReason (::std::unique_ptr< ReasonType > p); + + // by + // + typedef ::xml_schema::Uri ByType; + typedef ::xsd::cxx::tree::optional< ByType > ByOptional; + typedef ::xsd::cxx::tree::traits< ByType, char > ByTraits; + + const ByOptional& + getBy () const; + + ByOptional& + getBy (); + + void + setBy (const ByType& x); + + void + setBy (const ByOptional& x); + + void + setBy (::std::unique_ptr< ByType > p); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Execution_type (); + + Execution_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Execution_type (const Execution_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Execution_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Execution_type& + operator= (const Execution_type& x); + + virtual + ~Execution_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + WhenOptional when_; + ReasonOptional reason_; + ByOptional by_; + AnyAttributeSet any_attribute_; + }; + + class Call_type: public ::xml_schema::Type + { + public: + // sip + // + typedef ::conference_info::Sip_dialog_id_type SipType; + typedef ::xsd::cxx::tree::optional< SipType > SipOptional; + typedef ::xsd::cxx::tree::traits< SipType, char > SipTraits; + + const SipOptional& + getSip () const; + + SipOptional& + getSip (); + + void + setSip (const SipType& x); + + void + setSip (const SipOptional& x); + + void + setSip (::std::unique_ptr< SipType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Call_type (); + + Call_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Call_type (const Call_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Call_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Call_type& + operator= (const Call_type& x); + + virtual + ~Call_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + SipOptional sip_; + AnySequence any_; + AnyAttributeSet any_attribute_; + }; + + class Sip_dialog_id_type: public ::xml_schema::Type + { + public: + // display-text + // + typedef ::xml_schema::String Display_textType; + typedef ::xsd::cxx::tree::optional< Display_textType > Display_textOptional; + typedef ::xsd::cxx::tree::traits< Display_textType, char > Display_textTraits; + + const Display_textOptional& + getDisplay_text () const; + + Display_textOptional& + getDisplay_text (); + + void + setDisplay_text (const Display_textType& x); + + void + setDisplay_text (const Display_textOptional& x); + + void + setDisplay_text (::std::unique_ptr< Display_textType > p); + + // call-id + // + typedef ::xml_schema::String Call_idType; + typedef ::xsd::cxx::tree::traits< Call_idType, char > Call_idTraits; + + const Call_idType& + getCall_id () const; + + Call_idType& + getCall_id (); + + void + setCall_id (const Call_idType& x); + + void + setCall_id (::std::unique_ptr< Call_idType > p); + + ::std::unique_ptr< Call_idType > + detachCall_id (); + + // from-tag + // + typedef ::xml_schema::String From_tagType; + typedef ::xsd::cxx::tree::traits< From_tagType, char > From_tagTraits; + + const From_tagType& + getFrom_tag () const; + + From_tagType& + getFrom_tag (); + + void + setFrom_tag (const From_tagType& x); + + void + setFrom_tag (::std::unique_ptr< From_tagType > p); + + ::std::unique_ptr< From_tagType > + detachFrom_tag (); + + // to-tag + // + typedef ::xml_schema::String To_tagType; + typedef ::xsd::cxx::tree::traits< To_tagType, char > To_tagTraits; + + const To_tagType& + getTo_tag () const; + + To_tagType& + getTo_tag (); + + void + setTo_tag (const To_tagType& x); + + void + setTo_tag (::std::unique_ptr< To_tagType > p); + + ::std::unique_ptr< To_tagType > + detachTo_tag (); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Sip_dialog_id_type (const Call_idType&, + const From_tagType&, + const To_tagType&); + + Sip_dialog_id_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Sip_dialog_id_type (const Sip_dialog_id_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Sip_dialog_id_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Sip_dialog_id_type& + operator= (const Sip_dialog_id_type& x); + + virtual + ~Sip_dialog_id_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_textOptional display_text_; + ::xsd::cxx::tree::one< Call_idType > call_id_; + ::xsd::cxx::tree::one< From_tagType > from_tag_; + ::xsd::cxx::tree::one< To_tagType > to_tag_; + AnySequence any_; + AnyAttributeSet any_attribute_; + }; + + class Media_type: public ::xml_schema::Type + { + public: + // display-text + // + typedef ::xml_schema::String Display_textType; + typedef ::xsd::cxx::tree::optional< Display_textType > Display_textOptional; + typedef ::xsd::cxx::tree::traits< Display_textType, char > Display_textTraits; + + const Display_textOptional& + getDisplay_text () const; + + Display_textOptional& + getDisplay_text (); + + void + setDisplay_text (const Display_textType& x); + + void + setDisplay_text (const Display_textOptional& x); + + void + setDisplay_text (::std::unique_ptr< Display_textType > p); + + // type + // + typedef ::xml_schema::String TypeType; + typedef ::xsd::cxx::tree::optional< TypeType > TypeOptional; + typedef ::xsd::cxx::tree::traits< TypeType, char > TypeTraits; + + const TypeOptional& + getType () const; + + TypeOptional& + getType (); + + void + setType (const TypeType& x); + + void + setType (const TypeOptional& x); + + void + setType (::std::unique_ptr< TypeType > p); + + // label + // + typedef ::xml_schema::String LabelType; + typedef ::xsd::cxx::tree::optional< LabelType > LabelOptional; + typedef ::xsd::cxx::tree::traits< LabelType, char > LabelTraits; + + const LabelOptional& + getLabel () const; + + LabelOptional& + getLabel (); + + void + setLabel (const LabelType& x); + + void + setLabel (const LabelOptional& x); + + void + setLabel (::std::unique_ptr< LabelType > p); + + // src-id + // + typedef ::xml_schema::String Src_idType; + typedef ::xsd::cxx::tree::optional< Src_idType > Src_idOptional; + typedef ::xsd::cxx::tree::traits< Src_idType, char > Src_idTraits; + + const Src_idOptional& + getSrc_id () const; + + Src_idOptional& + getSrc_id (); + + void + setSrc_id (const Src_idType& x); + + void + setSrc_id (const Src_idOptional& x); + + void + setSrc_id (::std::unique_ptr< Src_idType > p); + + // status + // + typedef ::conference_info::Media_status_type StatusType; + typedef ::xsd::cxx::tree::optional< StatusType > StatusOptional; + typedef ::xsd::cxx::tree::traits< StatusType, char > StatusTraits; + + const StatusOptional& + getStatus () const; + + StatusOptional& + getStatus (); + + void + setStatus (const StatusType& x); + + void + setStatus (const StatusOptional& x); + + void + setStatus (::std::unique_ptr< StatusType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // id + // + typedef ::xml_schema::String IdType; + typedef ::xsd::cxx::tree::traits< IdType, char > IdTraits; + + const IdType& + getId () const; + + IdType& + getId (); + + void + setId (const IdType& x); + + void + setId (::std::unique_ptr< IdType > p); + + ::std::unique_ptr< IdType > + detachId (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Media_type (const IdType&); + + Media_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Media_type (const Media_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Media_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Media_type& + operator= (const Media_type& x); + + virtual + ~Media_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_textOptional display_text_; + TypeOptional type_; + LabelOptional label_; + Src_idOptional src_id_; + StatusOptional status_; + AnySequence any_; + ::xsd::cxx::tree::one< IdType > id_; + AnyAttributeSet any_attribute_; + }; + + class Media_status_type: public ::xml_schema::String + { + public: + enum Value + { + recvonly, + sendonly, + sendrecv, + inactive + }; + + Media_status_type (Value v); + + Media_status_type (const char* v); + + Media_status_type (const ::std::string& v); + + Media_status_type (const ::xml_schema::String& v); + + Media_status_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Media_status_type (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Media_status_type (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Media_status_type (const Media_status_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Media_status_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Media_status_type& + operator= (Value v); + + virtual + operator Value () const + { + return _xsd_Media_status_type_convert (); + } + + protected: + Value + _xsd_Media_status_type_convert () const; + + public: + static const char* const _xsd_Media_status_type_literals_[4]; + static const Value _xsd_Media_status_type_indexes_[4]; + }; + + class Sidebars_by_val_type: public ::xml_schema::Type + { + public: + // entry + // + typedef ::conference_info::Conference_type EntryType; + typedef ::xsd::cxx::tree::sequence< EntryType > EntrySequence; + typedef EntrySequence::iterator EntryIterator; + typedef EntrySequence::const_iterator EntryConstIterator; + typedef ::xsd::cxx::tree::traits< EntryType, char > EntryTraits; + + const EntrySequence& + getEntry () const; + + EntrySequence& + getEntry (); + + void + setEntry (const EntrySequence& s); + + // state + // + typedef ::conference_info::State_type StateType; + typedef ::xsd::cxx::tree::traits< StateType, char > StateTraits; + + const StateType& + getState () const; + + StateType& + getState (); + + void + setState (const StateType& x); + + void + setState (::std::unique_ptr< StateType > p); + + ::std::unique_ptr< StateType > + detachState (); + + static const StateType& + getStateDefaultValue (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Sidebars_by_val_type (); + + Sidebars_by_val_type (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Sidebars_by_val_type (const Sidebars_by_val_type& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Sidebars_by_val_type* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Sidebars_by_val_type& + operator= (const Sidebars_by_val_type& x); + + virtual + ~Sidebars_by_val_type (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + EntrySequence entry_; + ::xsd::cxx::tree::one< StateType > state_; + static const StateType state_default_value_; + AnyAttributeSet any_attribute_; + }; +} + +#include + +namespace conference_info +{ + ::std::ostream& + operator<< (::std::ostream&, const Conference_type&); + + ::std::ostream& + operator<< (::std::ostream&, State_type::Value); + + ::std::ostream& + operator<< (::std::ostream&, const State_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Conference_description_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Host_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Conference_state_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Conference_media_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Conference_medium_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Uris_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Uri_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Keywords_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Users_type&); + + ::std::ostream& + operator<< (::std::ostream&, const User_type&); + + ::std::ostream& + operator<< (::std::ostream&, const User_roles_type&); + + ::std::ostream& + operator<< (::std::ostream&, const User_languages_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Endpoint_type&); + + ::std::ostream& + operator<< (::std::ostream&, Endpoint_status_type::Value); + + ::std::ostream& + operator<< (::std::ostream&, const Endpoint_status_type&); + + ::std::ostream& + operator<< (::std::ostream&, Joining_type::Value); + + ::std::ostream& + operator<< (::std::ostream&, const Joining_type&); + + ::std::ostream& + operator<< (::std::ostream&, Disconnection_type::Value); + + ::std::ostream& + operator<< (::std::ostream&, const Disconnection_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Execution_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Call_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Sip_dialog_id_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Media_type&); + + ::std::ostream& + operator<< (::std::ostream&, Media_status_type::Value); + + ::std::ostream& + operator<< (::std::ostream&, const Media_status_type&); + + ::std::ostream& + operator<< (::std::ostream&, const Sidebars_by_val_type&); +} + +#include + +#include +#include +#include + +namespace conference_info +{ + // Parse a URI or a local file. + // + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (const ::std::string& uri, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (const ::std::string& uri, + ::xml_schema::ErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (const ::std::string& uri, + ::xercesc::DOMErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + // Parse std::istream. + // + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + ::xml_schema::ErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + ::xercesc::DOMErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + const ::std::string& id, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + const ::std::string& id, + ::xml_schema::ErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::std::istream& is, + const ::std::string& id, + ::xercesc::DOMErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + // Parse xercesc::InputSource. + // + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::xercesc::InputSource& is, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::xercesc::InputSource& is, + ::xml_schema::ErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::xercesc::InputSource& is, + ::xercesc::DOMErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + // Parse xercesc::DOMDocument. + // + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (const ::xercesc::DOMDocument& d, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::conference_info::Conference_type > + parseConference_info (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); +} + +#include + +#include +#include +#include + +#include + +namespace conference_info +{ + // Serialize to std::ostream. + // + + void + serializeConference_info (::std::ostream& os, + const ::conference_info::Conference_type& x, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + void + serializeConference_info (::std::ostream& os, + const ::conference_info::Conference_type& x, + ::xml_schema::ErrorHandler& eh, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + void + serializeConference_info (::std::ostream& os, + const ::conference_info::Conference_type& x, + ::xercesc::DOMErrorHandler& eh, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + // Serialize to xercesc::XMLFormatTarget. + // + + void + serializeConference_info (::xercesc::XMLFormatTarget& ft, + const ::conference_info::Conference_type& x, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + void + serializeConference_info (::xercesc::XMLFormatTarget& ft, + const ::conference_info::Conference_type& x, + ::xml_schema::ErrorHandler& eh, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + void + serializeConference_info (::xercesc::XMLFormatTarget& ft, + const ::conference_info::Conference_type& x, + ::xercesc::DOMErrorHandler& eh, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + // Serialize to an existing xercesc::DOMDocument. + // + + void + serializeConference_info (::xercesc::DOMDocument& d, + const ::conference_info::Conference_type& x, + ::xml_schema::Flags f = 0); + + // Serialize to a new xercesc::DOMDocument. + // + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > + serializeConference_info (const ::conference_info::Conference_type& x, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + ::xml_schema::Flags f = 0); + + void + operator<< (::xercesc::DOMElement&, const Conference_type&); + + void + operator<< (::xercesc::DOMElement&, const State_type&); + + void + operator<< (::xercesc::DOMAttr&, const State_type&); + + void + operator<< (::xml_schema::ListStream&, + const State_type&); + + void + operator<< (::xercesc::DOMElement&, const Conference_description_type&); + + void + operator<< (::xercesc::DOMElement&, const Host_type&); + + void + operator<< (::xercesc::DOMElement&, const Conference_state_type&); + + void + operator<< (::xercesc::DOMElement&, const Conference_media_type&); + + void + operator<< (::xercesc::DOMElement&, const Conference_medium_type&); + + void + operator<< (::xercesc::DOMElement&, const Uris_type&); + + void + operator<< (::xercesc::DOMElement&, const Uri_type&); + + void + operator<< (::xercesc::DOMElement&, const Keywords_type&); + + void + operator<< (::xercesc::DOMAttr&, const Keywords_type&); + + void + operator<< (::xml_schema::ListStream&, + const Keywords_type&); + + void + operator<< (::xercesc::DOMElement&, const Users_type&); + + void + operator<< (::xercesc::DOMElement&, const User_type&); + + void + operator<< (::xercesc::DOMElement&, const User_roles_type&); + + void + operator<< (::xercesc::DOMElement&, const User_languages_type&); + + void + operator<< (::xercesc::DOMAttr&, const User_languages_type&); + + void + operator<< (::xml_schema::ListStream&, + const User_languages_type&); + + void + operator<< (::xercesc::DOMElement&, const Endpoint_type&); + + void + operator<< (::xercesc::DOMElement&, const Endpoint_status_type&); + + void + operator<< (::xercesc::DOMAttr&, const Endpoint_status_type&); + + void + operator<< (::xml_schema::ListStream&, + const Endpoint_status_type&); + + void + operator<< (::xercesc::DOMElement&, const Joining_type&); + + void + operator<< (::xercesc::DOMAttr&, const Joining_type&); + + void + operator<< (::xml_schema::ListStream&, + const Joining_type&); + + void + operator<< (::xercesc::DOMElement&, const Disconnection_type&); + + void + operator<< (::xercesc::DOMAttr&, const Disconnection_type&); + + void + operator<< (::xml_schema::ListStream&, + const Disconnection_type&); + + void + operator<< (::xercesc::DOMElement&, const Execution_type&); + + void + operator<< (::xercesc::DOMElement&, const Call_type&); + + void + operator<< (::xercesc::DOMElement&, const Sip_dialog_id_type&); + + void + operator<< (::xercesc::DOMElement&, const Media_type&); + + void + operator<< (::xercesc::DOMElement&, const Media_status_type&); + + void + operator<< (::xercesc::DOMAttr&, const Media_status_type&); + + void + operator<< (::xml_schema::ListStream&, + const Media_status_type&); + + void + operator<< (::xercesc::DOMElement&, const Sidebars_by_val_type&); +} + +#include + +// Begin epilogue. +// +// +// End epilogue. + +#endif // CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_SRC_XML_CONFERENCE_INFO_HXX diff --git a/src/conference/conference-info.xsd b/src/conference/conference-info.xsd new file mode 100644 index 000000000..8f7b332ac --- /dev/null +++ b/src/conference/conference-info.xsd @@ -0,0 +1,387 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/conference/conference-listener.h b/src/conference/conference-listener.h new file mode 100644 index 000000000..e5c596fd3 --- /dev/null +++ b/src/conference/conference-listener.h @@ -0,0 +1,41 @@ +/* + * conference-listener.h + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _CONFERENCE_LISTENER_H_ +#define _CONFERENCE_LISTENER_H_ + +#include "linphone/core.h" + +namespace LinphonePrivate { + namespace Conference { + // ------------------------------------------------------------------------- + // ConferenceListener. + // ------------------------------------------------------------------------- + class ConferenceListener { + public: + //virtual ~ConferenceListener() = 0; + virtual void conferenceCreated(LinphoneAddress *confAddress) = 0; + virtual void conferenceTerminated(LinphoneAddress *confAddress) = 0; + virtual void participantAdded(LinphoneAddress *addr) = 0; + virtual void participantRemoved(LinphoneAddress *addr) = 0; + virtual void participantSetAdmin(LinphoneAddress *addr, bool isAdmin) = 0; + }; + } +} + +#endif // ifndef _CONFERENCE_LISTENER_H_ \ No newline at end of file diff --git a/src/conference/xml.hxx b/src/conference/xml.hxx new file mode 100644 index 000000000..52de06acf --- /dev/null +++ b/src/conference/xml.hxx @@ -0,0 +1,503 @@ +// Copyright (c) 2005-2014 Code Synthesis Tools CC +// +// This program was generated by CodeSynthesis XSD, an XML Schema to +// C++ data binding compiler. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// In addition, as a special exception, Code Synthesis Tools CC gives +// permission to link this program with the Xerces-C++ library (or with +// modified versions of Xerces-C++ that use the same license as Xerces-C++), +// and distribute linked combinations including the two. You must obey +// the GNU General Public License version 2 in all respects for all of +// the code used other than Xerces-C++. If you modify this copy of the +// program, you may extend this exception to your version of the program, +// but you are not obligated to do so. If you do not wish to do so, delete +// this exception statement from your version. +// +// Furthermore, Code Synthesis Tools CC makes a special exception for +// the Free/Libre and Open Source Software (FLOSS) which is described +// in the accompanying FLOSSE file. +// + +#ifndef CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_PRIVATE_SRC_XML_XML_HXX +#define CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_PRIVATE_SRC_XML_XML_HXX + +#ifndef XSD_CXX11 +#define XSD_CXX11 +#endif + +#ifndef XSD_USE_CHAR +#define XSD_USE_CHAR +#endif + +#ifndef XSD_CXX_TREE_USE_CHAR +#define XSD_CXX_TREE_USE_CHAR +#endif + +// Begin prologue. +// +// +// End prologue. + +#include + +#if (XSD_INT_VERSION != 4000000L) +#error XSD runtime version mismatch +#endif + +#include + +#include + +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace xml_schema +{ + // anyType and anySimpleType. + // + typedef ::xsd::cxx::tree::type Type; + typedef ::xsd::cxx::tree::simple_type< char, Type > SimpleType; + typedef ::xsd::cxx::tree::type Container; + + // 8-bit + // + typedef signed char Byte; + typedef unsigned char UnsignedByte; + + // 16-bit + // + typedef short Short; + typedef unsigned short UnsignedShort; + + // 32-bit + // + typedef int Int; + typedef unsigned int UnsignedInt; + + // 64-bit + // + typedef long long Long; + typedef unsigned long long UnsignedLong; + + // Supposed to be arbitrary-length integral types. + // + typedef long long Integer; + typedef long long NonPositiveInteger; + typedef unsigned long long NonNegativeInteger; + typedef unsigned long long PositiveInteger; + typedef long long NegativeInteger; + + // Boolean. + // + typedef bool Boolean; + + // Floating-point types. + // + typedef float Float; + typedef double Double; + typedef double Decimal; + + // String types. + // + typedef ::xsd::cxx::tree::string< char, SimpleType > String; + typedef ::xsd::cxx::tree::normalized_string< char, String > NormalizedString; + typedef ::xsd::cxx::tree::token< char, NormalizedString > Token; + typedef ::xsd::cxx::tree::name< char, Token > Name; + typedef ::xsd::cxx::tree::nmtoken< char, Token > Nmtoken; + typedef ::xsd::cxx::tree::nmtokens< char, SimpleType, Nmtoken > Nmtokens; + typedef ::xsd::cxx::tree::ncname< char, Name > Ncname; + typedef ::xsd::cxx::tree::language< char, Token > Language; + + // ID/IDREF. + // + typedef ::xsd::cxx::tree::id< char, Ncname > Id; + typedef ::xsd::cxx::tree::idref< char, Ncname, Type > Idref; + typedef ::xsd::cxx::tree::idrefs< char, SimpleType, Idref > Idrefs; + + // URI. + // + typedef ::xsd::cxx::tree::uri< char, SimpleType > Uri; + + // Qualified name. + // + typedef ::xsd::cxx::tree::qname< char, SimpleType, Uri, Ncname > Qname; + + // Binary. + // + typedef ::xsd::cxx::tree::buffer< char > Buffer; + typedef ::xsd::cxx::tree::base64_binary< char, SimpleType > Base64Binary; + typedef ::xsd::cxx::tree::hex_binary< char, SimpleType > HexBinary; + + // Date/time. + // + typedef ::xsd::cxx::tree::time_zone TimeZone; + typedef ::xsd::cxx::tree::date< char, SimpleType > Date; + typedef ::xsd::cxx::tree::date_time< char, SimpleType > DateTime; + typedef ::xsd::cxx::tree::duration< char, SimpleType > Duration; + typedef ::xsd::cxx::tree::gday< char, SimpleType > Gday; + typedef ::xsd::cxx::tree::gmonth< char, SimpleType > Gmonth; + typedef ::xsd::cxx::tree::gmonth_day< char, SimpleType > GmonthDay; + typedef ::xsd::cxx::tree::gyear< char, SimpleType > Gyear; + typedef ::xsd::cxx::tree::gyear_month< char, SimpleType > GyearMonth; + typedef ::xsd::cxx::tree::time< char, SimpleType > Time; + + // Entity. + // + typedef ::xsd::cxx::tree::entity< char, Ncname > Entity; + typedef ::xsd::cxx::tree::entities< char, SimpleType, Entity > Entities; + + typedef ::xsd::cxx::tree::content_order ContentOrder; + // Namespace information and list stream. Used in + // serialization functions. + // + typedef ::xsd::cxx::xml::dom::namespace_info< char > NamespaceInfo; + typedef ::xsd::cxx::xml::dom::namespace_infomap< char > NamespaceInfomap; + typedef ::xsd::cxx::tree::list_stream< char > ListStream; + typedef ::xsd::cxx::tree::as_double< Double > AsDouble; + typedef ::xsd::cxx::tree::as_decimal< Decimal > AsDecimal; + typedef ::xsd::cxx::tree::facet Facet; + + // Flags and properties. + // + typedef ::xsd::cxx::tree::flags Flags; + typedef ::xsd::cxx::tree::properties< char > Properties; + + // Parsing/serialization diagnostics. + // + typedef ::xsd::cxx::tree::severity Severity; + typedef ::xsd::cxx::tree::error< char > Error; + typedef ::xsd::cxx::tree::diagnostics< char > Diagnostics; + + // Exceptions. + // + typedef ::xsd::cxx::tree::exception< char > Exception; + typedef ::xsd::cxx::tree::bounds< char > Bounds; + typedef ::xsd::cxx::tree::duplicate_id< char > DuplicateId; + typedef ::xsd::cxx::tree::parsing< char > Parsing; + typedef ::xsd::cxx::tree::expected_element< char > ExpectedElement; + typedef ::xsd::cxx::tree::unexpected_element< char > UnexpectedElement; + typedef ::xsd::cxx::tree::expected_attribute< char > ExpectedAttribute; + typedef ::xsd::cxx::tree::unexpected_enumerator< char > UnexpectedEnumerator; + typedef ::xsd::cxx::tree::expected_text_content< char > ExpectedTextContent; + typedef ::xsd::cxx::tree::no_prefix_mapping< char > NoPrefixMapping; + typedef ::xsd::cxx::tree::serialization< char > Serialization; + + // Error handler callback interface. + // + typedef ::xsd::cxx::xml::error_handler< char > ErrorHandler; + + // DOM interaction. + // + namespace dom + { + // Automatic pointer for DOMDocument. + // + using ::xsd::cxx::xml::dom::unique_ptr; + +#ifndef XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA +#define XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA + // DOM user data key for back pointers to tree nodes. + // + const XMLCh* const treeNodeKey = ::xsd::cxx::tree::user_data_keys::node; +#endif + } +} + +// Forward declarations. +// +namespace namespace_ +{ + class Lang; + class Space; + class Lang_member; +} + + +#include // ::std::unique_ptr +#include // std::numeric_limits +#include // std::binary_search +#include // std::move + +#include + +#include +#include +#include +#include + +#include + +#include + +namespace namespace_ +{ + class Lang: public ::xml_schema::String + { + public: + + Lang (const char* v); + + Lang (const ::std::string& v); + + Lang (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Lang (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Lang (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Lang (const Lang& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Lang* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + }; + + class Space: public ::xml_schema::Ncname + { + public: + enum Value + { + default_, + preserve + }; + + Space (Value v); + + Space (const char* v); + + Space (const ::std::string& v); + + Space (const ::xml_schema::Ncname& v); + + Space (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Space (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Space (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Space (const Space& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Space* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Space& + operator= (Value v); + + virtual + operator Value () const + { + return _xsd_Space_convert (); + } + + protected: + Value + _xsd_Space_convert () const; + + public: + static const char* const _xsd_Space_literals_[2]; + static const Value _xsd_Space_indexes_[2]; + }; + + class Lang_member: public ::xml_schema::String + { + public: + enum Value + { + empty + }; + + Lang_member (Value v); + + Lang_member (const char* v); + + Lang_member (const ::std::string& v); + + Lang_member (const ::xml_schema::String& v); + + Lang_member (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Lang_member (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Lang_member (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Lang_member (const Lang_member& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Lang_member* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Lang_member& + operator= (Value v); + + virtual + operator Value () const + { + return _xsd_Lang_member_convert (); + } + + protected: + Value + _xsd_Lang_member_convert () const; + + public: + static const char* const _xsd_Lang_member_literals_[1]; + static const Value _xsd_Lang_member_indexes_[1]; + }; +} + +#include + +namespace namespace_ +{ + ::std::ostream& + operator<< (::std::ostream&, const Lang&); + + ::std::ostream& + operator<< (::std::ostream&, Space::Value); + + ::std::ostream& + operator<< (::std::ostream&, const Space&); + + ::std::ostream& + operator<< (::std::ostream&, Lang_member::Value); + + ::std::ostream& + operator<< (::std::ostream&, const Lang_member&); +} + +#include + +#include +#include +#include + +namespace namespace_ +{ +} + +#include + +#include +#include +#include + +#include + +namespace namespace_ +{ + void + operator<< (::xercesc::DOMElement&, const Lang&); + + void + operator<< (::xercesc::DOMAttr&, const Lang&); + + void + operator<< (::xml_schema::ListStream&, + const Lang&); + + void + operator<< (::xercesc::DOMElement&, const Space&); + + void + operator<< (::xercesc::DOMAttr&, const Space&); + + void + operator<< (::xml_schema::ListStream&, + const Space&); + + void + operator<< (::xercesc::DOMElement&, const Lang_member&); + + void + operator<< (::xercesc::DOMAttr&, const Lang_member&); + + void + operator<< (::xml_schema::ListStream&, + const Lang_member&); +} + +#include + +// Begin epilogue. +// +// +// End epilogue. + +#endif // CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_PRIVATE_SRC_XML_XML_HXX diff --git a/tester/CMakeLists.txt b/tester/CMakeLists.txt index 45e83bb6c..7ef874e88 100644 --- a/tester/CMakeLists.txt +++ b/tester/CMakeLists.txt @@ -192,6 +192,10 @@ set(SOURCE_FILES_C video_tester.c ) +set(SOURCE_FILES_CXX + confeventpackage_tester.cpp +) + set(SOURCE_FILES_OBJC ) if(APPLE) if (IOS) @@ -200,6 +204,7 @@ if(APPLE) endif() bc_apply_compile_flags(SOURCE_FILES_C STRICT_OPTIONS_CPP STRICT_OPTIONS_C) +bc_apply_compile_flags(SOURCE_FILES_C_CXX STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX) bc_apply_compile_flags(SOURCE_FILES_OBJC STRICT_OPTIONS_CPP STRICT_OPTIONS_OBJC) if(MSVC) @@ -222,7 +227,7 @@ endif() # on mobile platforms, we compile the tester as a library so that we can link with it directly from native applications if(ANDROID OR IOS) - add_library(linphonetester SHARED ${SOURCE_FILES_C}) + add_library(linphonetester SHARED ${SOURCE_FILES_C} ${SOURCE_FILES_CXX}) target_include_directories(linphonetester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS}) target_link_libraries(linphonetester ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER}) if(IOS) @@ -243,7 +248,7 @@ if(ANDROID OR IOS) PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - add_library(linphone_tester_static STATIC ${SOURCE_FILES_C}) + add_library(linphone_tester_static STATIC ${SOURCE_FILES_C} ${SOURCE_FILES_CXX}) target_include_directories(linphone_tester_static PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS}) target_link_libraries(linphone_tester_static ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER}) @@ -277,9 +282,9 @@ endif() if (NOT ANDROID AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") if(IOS) set_source_files_properties(${IOS_RESOURCES_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - add_executable(liblinphone_tester MACOSX_BUNDLE ${IOS_RESOURCES_FILES} ${SOURCE_FILES_C} ${SOURCE_FILES_OBJC}) + add_executable(liblinphone_tester MACOSX_BUNDLE ${IOS_RESOURCES_FILES} ${SOURCE_FILES_C} ${SOURCE_FILES_CXX} ${SOURCE_FILES_OBJC}) else() - add_executable(liblinphone_tester ${SOURCE_FILES_C} ${SOURCE_FILES_OBJC}) + add_executable(liblinphone_tester ${SOURCE_FILES_C} ${SOURCE_FILES_CXX} ${SOURCE_FILES_OBJC}) endif() set_target_properties(liblinphone_tester PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}") set_target_properties(liblinphone_tester PROPERTIES LINKER_LANGUAGE CXX) @@ -312,4 +317,4 @@ if (NOT ANDROID AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") install(FILES ${IMAGE_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/images") install(FILES ${VCARD_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/vcards") endif() -endif() +endif() \ No newline at end of file diff --git a/tester/confeventpackage_tester.cpp b/tester/confeventpackage_tester.cpp new file mode 100644 index 000000000..e66bbb602 --- /dev/null +++ b/tester/confeventpackage_tester.cpp @@ -0,0 +1,717 @@ +/* + liblinphone_tester - liblinphone test suite + Copyright (C) 2013 Belledonne Communications SARL + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#include +#include + +#include "linphone/core.h" +#include "private.h" +#include "liblinphone_tester.h" +#include "conference/conference-listener.h" +#include "conference/conference-event-package.h" + +using namespace LinphonePrivate; +using namespace std; + +static const char *first_notify = \ +" "\ +" "\ +" "\ +" "\ +" Agenda: This month's goals"\ +" "\ +" "\ +" http://sharepoint/salesgroup/"\ +" web-page"\ +" "\ +" "\ +" "\ +" "\ +" "\ +" 33"\ +" "\ +" "\ +" "\ +" "\ +" Bob Hoskins"\ +" "\ +" "\ +" Bob's Laptop"\ +" disconnected"\ +" departed"\ +" "\ +" 2005-03-04T20:00:00Z"\ +" bad voice quality"\ +" sip:mike@example.com"\ +" "\ +" "\ +" "\ +" main audio"\ +" audio"\ +" "\ +" 432424"\ +" sendrecv"\ +" "\ +" "\ +" "\ +" "\ +" "\ +" Alice"\ +" "\ +" admin"\ +" participant"\ +" "\ +" "\ +" "\ +" connected"\ +" dialed-out"\ +" "\ +" 2005-03-04T20:00:00Z"\ +" sip:mike@example.com"\ +" "\ +" "\ +" "\ +" main audio"\ +" audio"\ +" "\ +" 534232"\ +" sendrecv"\ +" "\ +" "\ +" "\ +" "\ +" "; + +static const char *participant_added_notify = \ +" "\ +" "\ +" "\ +" "\ +" Agenda: This month's goals"\ +" "\ +" "\ +" http://sharepoint/salesgroup/"\ +" web-page"\ +" "\ +" "\ +" "\ +" "\ +" "\ +" 33"\ +" "\ +" "\ +" "\ +" "\ +" Bob Hoskins"\ +" "\ +" "\ +" Frank's Laptop"\ +" disconnected"\ +" departed"\ +" "\ +" 2005-03-04T20:00:00Z"\ +" bad voice quality"\ +" sip:mike@example.com"\ +" "\ +" "\ +" "\ +" main audio"\ +" audio"\ +" "\ +" 432424"\ +" sendrecv"\ +" "\ +" "\ +" "\ +" "\ +" "; + +static const char *participant_not_added_notify = \ +" "\ +" "\ +" "\ +" "\ +" Agenda: This month's goals"\ +" "\ +" "\ +" http://sharepoint/salesgroup/"\ +" web-page"\ +" "\ +" "\ +" "\ +" "\ +" "\ +" 33"\ +" "\ +" "\ +" "\ +" "\ +" Bob Hoskins"\ +" "\ +" "\ +" Frank's Laptop"\ +" disconnected"\ +" departed"\ +" "\ +" 2005-03-04T20:00:00Z"\ +" bad voice quality"\ +" sip:mike@example.com"\ +" "\ +" "\ +" "\ +" main audio"\ +" audio"\ +" "\ +" 432424"\ +" sendrecv"\ +" "\ +" "\ +" "\ +" "\ +" "; + +static const char *participant_deleted_notify = \ +" "\ +" "\ +" "\ +" "\ +" Agenda: This month's goals"\ +" "\ +" "\ +" http://sharepoint/salesgroup/"\ +" web-page"\ +" "\ +" "\ +" "\ +" "\ +" "\ +" 33"\ +" "\ +" "\ +" "\ +" "\ +" Bob Hoskins"\ +" "\ +" "\ +" Bob's Laptop"\ +" disconnected"\ +" departed"\ +" "\ +" 2005-03-04T20:00:00Z"\ +" bad voice quality"\ +" sip:mike@example.com"\ +" "\ +" "\ +" "\ +" main audio"\ +" audio"\ +" "\ +" 432424"\ +" sendrecv"\ +" "\ +" "\ +" "\ +" "\ +" "; + +static const char *participant_admined_notify = \ +" "\ +" "\ +" "\ +" "\ +" Agenda: This month's goals"\ +" "\ +" "\ +" http://sharepoint/salesgroup/"\ +" web-page"\ +" "\ +" "\ +" "\ +" "\ +" "\ +" 33"\ +" "\ +" "\ +" "\ +" "\ +" Bob Hoskins"\ +" "\ +" participant"\ +" admin"\ +" "\ +" "\ +" "\ +" Bob's Laptop"\ +" disconnected"\ +" departed"\ +" "\ +" 2005-03-04T20:00:00Z"\ +" bad voice quality"\ +" sip:mike@example.com"\ +" "\ +" "\ +" "\ +" main audio"\ +" audio"\ +" "\ +" 432424"\ +" sendrecv"\ +" "\ +" "\ +" "\ +" "\ +" "; + +static const char *participant_unadmined_notify = \ +" "\ +" "\ +" "\ +" "\ +" Agenda: This month's goals"\ +" "\ +" "\ +" http://sharepoint/salesgroup/"\ +" web-page"\ +" "\ +" "\ +" "\ +" "\ +" "\ +" 33"\ +" "\ +" "\ +" "\ +" "\ +" Alice Hoskins"\ +" "\ +" participant"\ +" "\ +" "\ +" "\ +" Alice's Laptop"\ +" disconnected"\ +" departed"\ +" "\ +" 2005-03-04T20:00:00Z"\ +" bad voice quality"\ +" sip:mike@example.com"\ +" "\ +" "\ +" "\ +" main audio"\ +" audio"\ +" "\ +" 432424"\ +" sendrecv"\ +" "\ +" "\ +" "\ +" "\ +" "; + + +static const char *bobUri = "sip:bob@example.com"; +static const char *aliceUri = "sip:alice@example.com"; +static const char *frankUri = "sip:frank@example.com"; +static const char *confUri = "sips:conf233@example.com"; + +void linphone_conf_event_notify(LinphoneEvent *lev) { + LinphoneContent* content = linphone_core_create_content(lev->lc); + const char* uri = linphone_address_as_string_uri_only((LinphoneAddress*)sal_op_get_to_address(lev->op)); + char notify[strlen(first_notify) + strlen(uri)]; + snprintf(notify, sizeof(notify), first_notify, uri); + linphone_content_set_buffer(content,notify,strlen(notify)); + linphone_event_notify(lev, content); + linphone_content_unref(content); +} + +class ConferenceEventTester : public Conference::ConferenceListener { +public: + Conference::ConferenceEventPackage *cep; + map *participants; + + ConferenceEventTester(LinphoneCore *lc, LinphoneAddress *confAddr); + ~ConferenceEventTester(); + void conferenceCreated(LinphoneAddress *confAddress); + void conferenceTerminated(LinphoneAddress *confAddress); + void participantAdded(LinphoneAddress *addr); + void participantRemoved(LinphoneAddress *addr); + void participantSetAdmin(LinphoneAddress *addr, bool isAdmin); +}; +ConferenceEventTester::~ConferenceEventTester() { + this->cep->~ConferenceEventPackage(); +} +ConferenceEventTester::ConferenceEventTester(LinphoneCore *lc, LinphoneAddress *confAddr) { + this->cep = new Conference::ConferenceEventPackage(lc, this, confAddr); + this->participants = new map; +} +void ConferenceEventTester::conferenceCreated(LinphoneAddress *confAddress) {} +void ConferenceEventTester::conferenceTerminated(LinphoneAddress *confAddress){} +void ConferenceEventTester::participantAdded(LinphoneAddress *addr) { + this->participants->insert(pair(linphone_address_as_string(addr),0)); +} +void ConferenceEventTester::participantRemoved(LinphoneAddress *addr){ + this->participants->erase(linphone_address_as_string(addr)); +} +void ConferenceEventTester::participantSetAdmin(LinphoneAddress *addr, bool isAdmin){ +const char *addrAsString = linphone_address_as_string(addr); + if(this->participants->find(addrAsString) != this->participants->end()) { + this->participants->erase(addrAsString); + this->participants->insert(pair(addrAsString, isAdmin ? 1 : 0)); + } +} + +void first_notify_parsing(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); + ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + char notify[strlen(first_notify) + strlen(confUri)]; + + snprintf(notify, sizeof(notify), first_notify, confUri); + tester->cep->notifyReceived(notify); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_address_unref(confAddress); + tester->ConferenceEventTester::~ConferenceEventTester(); + linphone_core_manager_destroy(marie); +} + +void first_notify_parsing_wrong_conf(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, "sips:conf322@example.com"); + ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + char notify[strlen(first_notify) + strlen(confUri)]; + + snprintf(notify, sizeof(notify), first_notify, confUri); + tester->cep->notifyReceived(notify); + + BC_ASSERT_EQUAL(tester->participants->size(), 0, int, "%d"); + BC_ASSERT_FALSE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_FALSE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_address_unref(confAddress); + tester->ConferenceEventTester::~ConferenceEventTester(); + linphone_core_manager_destroy(marie); +} + +void participant_added_parsing(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); + ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + LinphoneAddress *frankAddr = linphone_core_interpret_url(marie->lc, frankUri); + char notify[strlen(first_notify) + strlen(confUri)]; + char notify_added[strlen(participant_added_notify) + strlen(confUri)]; + + snprintf(notify, sizeof(notify), first_notify, confUri); + tester->cep->notifyReceived(notify); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + + snprintf(notify_added, sizeof(notify_added), participant_added_notify, confUri); + tester->cep->notifyReceived(notify_added); + + BC_ASSERT_EQUAL(tester->participants->size(), 3, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(frankAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(frankAddr))->second == 0); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_address_unref(frankAddr); + linphone_address_unref(confAddress); + tester->ConferenceEventTester::~ConferenceEventTester(); + linphone_core_manager_destroy(marie); +} + +void participant_not_added_parsing(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); + ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + LinphoneAddress *frankAddr = linphone_core_interpret_url(marie->lc, frankUri); + char notify[strlen(first_notify) + strlen(confUri)]; + char notify_not_added[strlen(participant_not_added_notify) + strlen(confUri)]; + + snprintf(notify, sizeof(notify), first_notify, confUri); + tester->cep->notifyReceived(notify); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + + snprintf(notify_not_added, sizeof(notify_not_added), participant_not_added_notify, confUri); + tester->cep->notifyReceived(notify_not_added); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_FALSE(tester->participants->find(linphone_address_as_string(frankAddr)) != tester->participants->end()); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_address_unref(frankAddr); + linphone_address_unref(confAddress); + tester->ConferenceEventTester::~ConferenceEventTester(); + linphone_core_manager_destroy(marie); +} + +void participant_deleted_parsing(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); + ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + char notify[strlen(first_notify) + strlen(confUri)]; + char notify_deleted[strlen(participant_deleted_notify) + strlen(confUri)]; + + snprintf(notify, sizeof(notify), first_notify, confUri); + tester->cep->notifyReceived(notify); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + + snprintf(notify_deleted, sizeof(notify_deleted), participant_deleted_notify, confUri); + tester->cep->notifyReceived(notify_deleted); + + BC_ASSERT_EQUAL(tester->participants->size(), 1, int, "%d"); + BC_ASSERT_FALSE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_address_unref(confAddress); + tester->ConferenceEventTester::~ConferenceEventTester(); + linphone_core_manager_destroy(marie); +} + +void participant_admined_parsing(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); + ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + char notify[strlen(first_notify) + strlen(confUri)]; + char notify_admined[strlen(participant_admined_notify) + strlen(confUri)]; + + snprintf(notify, sizeof(notify), first_notify, confUri); + tester->cep->notifyReceived(notify); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + + snprintf(notify_admined, sizeof(notify_admined), participant_admined_notify, confUri); + tester->cep->notifyReceived(notify_admined); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 1); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_address_unref(confAddress); + tester->ConferenceEventTester::~ConferenceEventTester(); + linphone_core_manager_destroy(marie); +} + +void participant_unadmined_parsing(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); + ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + char notify[strlen(first_notify) + strlen(confUri)]; + char notify_unadmined[strlen(participant_unadmined_notify) + strlen(confUri)]; + + snprintf(notify, sizeof(notify), first_notify, confUri); + tester->cep->notifyReceived(notify); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + + snprintf(notify_unadmined, sizeof(notify_unadmined), participant_unadmined_notify, confUri); + tester->cep->notifyReceived(notify_unadmined); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 0); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_address_unref(confAddress); + tester->ConferenceEventTester::~ConferenceEventTester(); + linphone_core_manager_destroy(marie); +} + +void send_subscribe_receive_first_notify(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); + ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, pauline->identity); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + string confId("conf233"); + + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneRegistrationOk,1,1000)); + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneRegistrationOk,1,1000)); + + tester->cep->subscribe(confId); + + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionIncomingReceived,1,1000)); + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionActive,1,3000)); + wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_NotifyReceived,1,3000); + + BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + + tester->cep->unsubscribe(); + + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionTerminated,1,1000)); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + tester->ConferenceEventTester::~ConferenceEventTester(); + + linphone_core_manager_destroy(marie); + linphone_core_manager_destroy(pauline); +} + +test_t conf_event_tests[] = { + TEST_NO_TAG("First notify parsing", first_notify_parsing), + TEST_NO_TAG("First notify parsing wrong conf", first_notify_parsing_wrong_conf), + TEST_NO_TAG("Participant added", participant_added_parsing), + TEST_NO_TAG("Participant not added", participant_not_added_parsing), + TEST_NO_TAG("Participant deleted", participant_deleted_parsing), + TEST_NO_TAG("Participant admined", participant_admined_parsing), + TEST_NO_TAG("Participant unadmined", participant_unadmined_parsing), + TEST_NO_TAG("Send subscribe receive first notify", send_subscribe_receive_first_notify) +}; + +test_suite_t conf_event_test_suite = {"Conf event package", NULL, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each, + sizeof(conf_event_tests) / sizeof(conf_event_tests[0]), conf_event_tests}; diff --git a/tester/eventapi_tester.c b/tester/eventapi_tester.c index 7bc39eba8..7369095b5 100644 --- a/tester/eventapi_tester.c +++ b/tester/eventapi_tester.c @@ -82,7 +82,11 @@ void linphone_subscription_state_change(LinphoneCore *lc, LinphoneEvent *lev, Li counters->number_of_LinphoneSubscriptionActive++; if (linphone_event_get_subscription_dir(lev)==LinphoneSubscriptionIncoming){ mgr->lev=lev; - linphone_event_notify(lev,content); + if(strcmp(linphone_event_get_name(lev), "Conference") == 0) { + linphone_conf_event_notify(lev); + } else { + linphone_event_notify(lev,content); + } } break; case LinphoneSubscriptionTerminated: diff --git a/tester/liblinphone_tester.h b/tester/liblinphone_tester.h index 15f55b0d6..77aa54e37 100644 --- a/tester/liblinphone_tester.h +++ b/tester/liblinphone_tester.h @@ -48,6 +48,7 @@ extern test_suite_t presence_test_suite; extern test_suite_t presence_server_test_suite; extern test_suite_t upnp_test_suite; extern test_suite_t event_test_suite; +extern test_suite_t conf_event_test_suite; extern test_suite_t flexisip_test_suite; extern test_suite_t stun_test_suite; extern test_suite_t remote_provisioning_test_suite; @@ -401,7 +402,7 @@ LinphoneAddress * linphone_core_manager_resolve(LinphoneCoreManager *mgr, const FILE *sip_start(const char *senario, const char* dest_username, const char *passwd, LinphoneAddress* dest_addres); void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ice ); - +void linphone_conf_event_notify(LinphoneEvent *lev); #ifdef __cplusplus }; diff --git a/tester/tester.c b/tester/tester.c index 40f8b43b9..a211e1dcf 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -566,7 +566,7 @@ void liblinphone_tester_add_suites() { #endif bc_tester_add_suite(&stun_test_suite); bc_tester_add_suite(&event_test_suite); - bc_tester_add_suite(&flexisip_test_suite); + bc_tester_add_suite(&conf_event_test_suite); bc_tester_add_suite(&remote_provisioning_test_suite); bc_tester_add_suite(&quality_reporting_test_suite); bc_tester_add_suite(&log_collection_test_suite); From e62fe07eca64a96ac45d336b7ee3e37d91de025a Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 1 Aug 2017 13:30:45 +0200 Subject: [PATCH 02/17] put back flexisip test suite --- tester/tester.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tester/tester.c b/tester/tester.c index a211e1dcf..6c5454960 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -550,11 +550,9 @@ void liblinphone_tester_clear_accounts(void){ void liblinphone_tester_add_suites() { bc_tester_add_suite(&setup_test_suite); - bc_tester_add_suite(®ister_test_suite); bc_tester_add_suite(&tunnel_test_suite); bc_tester_add_suite(&offeranswer_test_suite); bc_tester_add_suite(&call_test_suite); - bc_tester_add_suite(&call_video_test_suite); bc_tester_add_suite(&audio_bypass_suite); bc_tester_add_suite(&multi_call_test_suite); bc_tester_add_suite(&message_test_suite); @@ -567,6 +565,7 @@ void liblinphone_tester_add_suites() { bc_tester_add_suite(&stun_test_suite); bc_tester_add_suite(&event_test_suite); bc_tester_add_suite(&conf_event_test_suite); + bc_tester_add_suite(&flexisip_test_suite); bc_tester_add_suite(&remote_provisioning_test_suite); bc_tester_add_suite(&quality_reporting_test_suite); bc_tester_add_suite(&log_collection_test_suite); From d93ccca824341ee1f192a9259eef703f871af5d7 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 1 Aug 2017 15:39:00 +0200 Subject: [PATCH 03/17] put bak tests suites --- tester/confeventpackage_tester.cpp | 15 +++++++-------- tester/tester.c | 2 ++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tester/confeventpackage_tester.cpp b/tester/confeventpackage_tester.cpp index e66bbb602..14199f963 100644 --- a/tester/confeventpackage_tester.cpp +++ b/tester/confeventpackage_tester.cpp @@ -413,7 +413,7 @@ static const char *aliceUri = "sip:alice@example.com"; static const char *frankUri = "sip:frank@example.com"; static const char *confUri = "sips:conf233@example.com"; -void linphone_conf_event_notify(LinphoneEvent *lev) { +void linphone_conf_event_notify(LinphoneEvent *lev){ LinphoneContent* content = linphone_core_create_content(lev->lc); const char* uri = linphone_address_as_string_uri_only((LinphoneAddress*)sal_op_get_to_address(lev->op)); char notify[strlen(first_notify) + strlen(uri)]; @@ -423,7 +423,7 @@ void linphone_conf_event_notify(LinphoneEvent *lev) { linphone_content_unref(content); } -class ConferenceEventTester : public Conference::ConferenceListener { +class ConferenceEventTester : public Conference::ConferenceListener{ public: Conference::ConferenceEventPackage *cep; map *participants; @@ -436,16 +436,16 @@ public: void participantRemoved(LinphoneAddress *addr); void participantSetAdmin(LinphoneAddress *addr, bool isAdmin); }; -ConferenceEventTester::~ConferenceEventTester() { +ConferenceEventTester::~ConferenceEventTester(){ this->cep->~ConferenceEventPackage(); } -ConferenceEventTester::ConferenceEventTester(LinphoneCore *lc, LinphoneAddress *confAddr) { +ConferenceEventTester::ConferenceEventTester(LinphoneCore *lc, LinphoneAddress *confAddr){ this->cep = new Conference::ConferenceEventPackage(lc, this, confAddr); this->participants = new map; } -void ConferenceEventTester::conferenceCreated(LinphoneAddress *confAddress) {} +void ConferenceEventTester::conferenceCreated(LinphoneAddress *confAddress){} void ConferenceEventTester::conferenceTerminated(LinphoneAddress *confAddress){} -void ConferenceEventTester::participantAdded(LinphoneAddress *addr) { +void ConferenceEventTester::participantAdded(LinphoneAddress *addr){ this->participants->insert(pair(linphone_address_as_string(addr),0)); } void ConferenceEventTester::participantRemoved(LinphoneAddress *addr){ @@ -453,7 +453,7 @@ void ConferenceEventTester::participantRemoved(LinphoneAddress *addr){ } void ConferenceEventTester::participantSetAdmin(LinphoneAddress *addr, bool isAdmin){ const char *addrAsString = linphone_address_as_string(addr); - if(this->participants->find(addrAsString) != this->participants->end()) { + if(this->participants->find(addrAsString) != this->participants->end()){ this->participants->erase(addrAsString); this->participants->insert(pair(addrAsString, isAdmin ? 1 : 0)); } @@ -697,7 +697,6 @@ void send_subscribe_receive_first_notify(void){ linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); tester->ConferenceEventTester::~ConferenceEventTester(); - linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline); } diff --git a/tester/tester.c b/tester/tester.c index 6c5454960..2ddbc6e83 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -550,9 +550,11 @@ void liblinphone_tester_clear_accounts(void){ void liblinphone_tester_add_suites() { bc_tester_add_suite(&setup_test_suite); + bc_tester_add_suite(®ister_test_suite); bc_tester_add_suite(&tunnel_test_suite); bc_tester_add_suite(&offeranswer_test_suite); bc_tester_add_suite(&call_test_suite); + bc_tester_add_suite(&call_video_test_suite); bc_tester_add_suite(&audio_bypass_suite); bc_tester_add_suite(&multi_call_test_suite); bc_tester_add_suite(&message_test_suite); From d77af8855828343db8f177523c6b06a0794ac088 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Wed, 2 Aug 2017 15:06:00 +0200 Subject: [PATCH 04/17] use shared_ptr --- src/conference/conference-listener.h | 2 +- tester/confeventpackage_tester.cpp | 178 +++++++++++++-------------- 2 files changed, 85 insertions(+), 95 deletions(-) diff --git a/src/conference/conference-listener.h b/src/conference/conference-listener.h index e5c596fd3..9ed9fa7f9 100644 --- a/src/conference/conference-listener.h +++ b/src/conference/conference-listener.h @@ -28,7 +28,7 @@ namespace LinphonePrivate { // ------------------------------------------------------------------------- class ConferenceListener { public: - //virtual ~ConferenceListener() = 0; + virtual ~ConferenceListener() = default; virtual void conferenceCreated(LinphoneAddress *confAddress) = 0; virtual void conferenceTerminated(LinphoneAddress *confAddress) = 0; virtual void participantAdded(LinphoneAddress *addr) = 0; diff --git a/tester/confeventpackage_tester.cpp b/tester/confeventpackage_tester.cpp index 14199f963..b909bf122 100644 --- a/tester/confeventpackage_tester.cpp +++ b/tester/confeventpackage_tester.cpp @@ -425,90 +425,86 @@ void linphone_conf_event_notify(LinphoneEvent *lev){ class ConferenceEventTester : public Conference::ConferenceListener{ public: - Conference::ConferenceEventPackage *cep; - map *participants; + shared_ptr cep; + map participants; ConferenceEventTester(LinphoneCore *lc, LinphoneAddress *confAddr); - ~ConferenceEventTester(); + void conferenceCreated(LinphoneAddress *confAddress); void conferenceTerminated(LinphoneAddress *confAddress); void participantAdded(LinphoneAddress *addr); void participantRemoved(LinphoneAddress *addr); void participantSetAdmin(LinphoneAddress *addr, bool isAdmin); }; -ConferenceEventTester::~ConferenceEventTester(){ - this->cep->~ConferenceEventPackage(); -} + ConferenceEventTester::ConferenceEventTester(LinphoneCore *lc, LinphoneAddress *confAddr){ - this->cep = new Conference::ConferenceEventPackage(lc, this, confAddr); - this->participants = new map; + this->cep = make_shared(lc, this, confAddr); } + void ConferenceEventTester::conferenceCreated(LinphoneAddress *confAddress){} void ConferenceEventTester::conferenceTerminated(LinphoneAddress *confAddress){} void ConferenceEventTester::participantAdded(LinphoneAddress *addr){ - this->participants->insert(pair(linphone_address_as_string(addr),0)); + this->participants.insert(pair(linphone_address_as_string(addr),0)); } void ConferenceEventTester::participantRemoved(LinphoneAddress *addr){ - this->participants->erase(linphone_address_as_string(addr)); + this->participants.erase(linphone_address_as_string(addr)); } void ConferenceEventTester::participantSetAdmin(LinphoneAddress *addr, bool isAdmin){ const char *addrAsString = linphone_address_as_string(addr); - if(this->participants->find(addrAsString) != this->participants->end()){ - this->participants->erase(addrAsString); - this->participants->insert(pair(addrAsString, isAdmin ? 1 : 0)); + if(this->participants.find(addrAsString) != this->participants.end()){ + this->participants.erase(addrAsString); + this->participants.insert(pair(addrAsString, isAdmin ? 1 : 0)); } } void first_notify_parsing(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); - ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + ConferenceEventTester tester(marie->lc, confAddress); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); char notify[strlen(first_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester->cep->notifyReceived(notify); + tester.cep->notifyReceived(notify); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); linphone_address_unref(confAddress); - tester->ConferenceEventTester::~ConferenceEventTester(); linphone_core_manager_destroy(marie); } void first_notify_parsing_wrong_conf(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, "sips:conf322@example.com"); - ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + ConferenceEventTester tester(marie->lc, confAddress); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); char notify[strlen(first_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester->cep->notifyReceived(notify); + tester.cep->notifyReceived(notify); - BC_ASSERT_EQUAL(tester->participants->size(), 0, int, "%d"); - BC_ASSERT_FALSE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_FALSE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); + BC_ASSERT_EQUAL(tester.participants.size(), 0, int, "%d"); + BC_ASSERT_FALSE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_FALSE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); linphone_address_unref(confAddress); - tester->ConferenceEventTester::~ConferenceEventTester(); linphone_core_manager_destroy(marie); } void participant_added_parsing(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); - ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + ConferenceEventTester tester(marie->lc, confAddress); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); LinphoneAddress *frankAddr = linphone_core_interpret_url(marie->lc, frankUri); @@ -516,33 +512,32 @@ void participant_added_parsing(void){ char notify_added[strlen(participant_added_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester->cep->notifyReceived(notify); + tester.cep->notifyReceived(notify); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_added, sizeof(notify_added), participant_added_notify, confUri); - tester->cep->notifyReceived(notify_added); + tester.cep->notifyReceived(notify_added); - BC_ASSERT_EQUAL(tester->participants->size(), 3, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(frankAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(frankAddr))->second == 0); + BC_ASSERT_EQUAL(tester.participants.size(), 3, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(frankAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(frankAddr))->second == 0); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); linphone_address_unref(frankAddr); linphone_address_unref(confAddress); - tester->ConferenceEventTester::~ConferenceEventTester(); linphone_core_manager_destroy(marie); } void participant_not_added_parsing(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); - ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + ConferenceEventTester tester(marie->lc, confAddress); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); LinphoneAddress *frankAddr = linphone_core_interpret_url(marie->lc, frankUri); @@ -550,127 +545,123 @@ void participant_not_added_parsing(void){ char notify_not_added[strlen(participant_not_added_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester->cep->notifyReceived(notify); + tester.cep->notifyReceived(notify); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_not_added, sizeof(notify_not_added), participant_not_added_notify, confUri); - tester->cep->notifyReceived(notify_not_added); + tester.cep->notifyReceived(notify_not_added); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_FALSE(tester->participants->find(linphone_address_as_string(frankAddr)) != tester->participants->end()); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_FALSE(tester.participants.find(linphone_address_as_string(frankAddr)) != tester.participants.end()); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); linphone_address_unref(frankAddr); linphone_address_unref(confAddress); - tester->ConferenceEventTester::~ConferenceEventTester(); linphone_core_manager_destroy(marie); } void participant_deleted_parsing(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); - ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + ConferenceEventTester tester(marie->lc, confAddress); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); char notify[strlen(first_notify) + strlen(confUri)]; char notify_deleted[strlen(participant_deleted_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester->cep->notifyReceived(notify); + tester.cep->notifyReceived(notify); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_deleted, sizeof(notify_deleted), participant_deleted_notify, confUri); - tester->cep->notifyReceived(notify_deleted); + tester.cep->notifyReceived(notify_deleted); - BC_ASSERT_EQUAL(tester->participants->size(), 1, int, "%d"); - BC_ASSERT_FALSE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); + BC_ASSERT_EQUAL(tester.participants.size(), 1, int, "%d"); + BC_ASSERT_FALSE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); linphone_address_unref(confAddress); - tester->ConferenceEventTester::~ConferenceEventTester(); linphone_core_manager_destroy(marie); } void participant_admined_parsing(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); - ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + ConferenceEventTester tester(marie->lc, confAddress); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); char notify[strlen(first_notify) + strlen(confUri)]; char notify_admined[strlen(participant_admined_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester->cep->notifyReceived(notify); + tester.cep->notifyReceived(notify); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_admined, sizeof(notify_admined), participant_admined_notify, confUri); - tester->cep->notifyReceived(notify_admined); + tester.cep->notifyReceived(notify_admined); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 1); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 1); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); linphone_address_unref(confAddress); - tester->ConferenceEventTester::~ConferenceEventTester(); linphone_core_manager_destroy(marie); } void participant_unadmined_parsing(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneAddress *confAddress = linphone_core_interpret_url(marie->lc, confUri); - ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, confAddress); + ConferenceEventTester tester(marie->lc, confAddress); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); char notify[strlen(first_notify) + strlen(confUri)]; char notify_unadmined[strlen(participant_unadmined_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester->cep->notifyReceived(notify); + tester.cep->notifyReceived(notify); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_unadmined, sizeof(notify_unadmined), participant_unadmined_notify, confUri); - tester->cep->notifyReceived(notify_unadmined); + tester.cep->notifyReceived(notify_unadmined); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 0); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 0); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); linphone_address_unref(confAddress); - tester->ConferenceEventTester::~ConferenceEventTester(); linphone_core_manager_destroy(marie); } void send_subscribe_receive_first_notify(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); - ConferenceEventTester *tester = new ConferenceEventTester(marie->lc, pauline->identity); + ConferenceEventTester tester(marie->lc, pauline->identity); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); string confId("conf233"); @@ -678,25 +669,24 @@ void send_subscribe_receive_first_notify(void){ BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneRegistrationOk,1,1000)); BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneRegistrationOk,1,1000)); - tester->cep->subscribe(confId); + tester.cep->subscribe(confId); BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionIncomingReceived,1,1000)); BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionActive,1,3000)); wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_NotifyReceived,1,3000); - BC_ASSERT_EQUAL(tester->participants->size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr)) != tester->participants->end()); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester->participants->find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); - tester->cep->unsubscribe(); + tester.cep->unsubscribe(); BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionTerminated,1,1000)); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); - tester->ConferenceEventTester::~ConferenceEventTester(); linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline); } From fc029784356e7aeef46959c70a2219e70c7710b9 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Fri, 4 Aug 2017 14:24:08 +0200 Subject: [PATCH 05/17] create the conf event notify + tests --- coreapi/CMakeLists.txt | 6 +- coreapi/linphonecore.c | 15 +- .../local-conference-event-handler.cpp | 155 ++++++++ .../local-conference-event-handler.h | 112 ++++++ ...pp => remote-conference-event-handler.cpp} | 31 +- ...ge.h => remote-conference-event-handler.h} | 23 +- tester/confeventpackage_tester.cpp | 374 +++++++++++++----- tester/eventapi_tester.c | 2 +- 8 files changed, 587 insertions(+), 131 deletions(-) create mode 100644 src/conference/local-conference-event-handler.cpp create mode 100644 src/conference/local-conference-event-handler.h rename src/conference/{conference-event-package.cpp => remote-conference-event-handler.cpp} (71%) rename src/conference/{conference-event-package.h => remote-conference-event-handler.h} (67%) diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index b0747a5fd..a2dec92ab 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -39,7 +39,8 @@ set(LINPHONE_PRIVATE_HEADER_FILES ../src/object/singleton.h ../src/utils/general.h ../src/conference/conference-listener.h - ../src/conference/conference-event-package.h + ../src/conference/remote-conference-event-handler.h + ../src/conference/local-conference-event-handler.h ../src/conference/conference-info.hxx bellesip_sal/sal_impl.h carddav.h @@ -127,7 +128,8 @@ set(LINPHONE_SOURCE_FILES_C ) set(LINPHONE_SOURCE_FILES_CXX conference.cc - ../src/conference/conference-event-package.cpp + ../src/conference/remote-conference-event-handler.cpp + ../src/conference/local-conference-event-handler.cpp ../src/conference/conference-info.cxx ) set(LINPHONE_INCLUDE_DIRS ${LINPHONE_INCLUDE_DIRS} /Users/reisbenjamin/xsd-4.0.0-i686-macosx/libxsd /usr/local/Cellar/xerces-c/3.1.4/include) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 07d215d8c..6786c376a 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -45,7 +45,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "mediastreamer2/msjpegwriter.h" #include "mediastreamer2/msogl.h" #include "mediastreamer2/msvolume.h" -#include "conference/conference-event-package.h" +#include "conference/remote-conference-event-handler.h" #ifdef INET6 #ifndef _WIN32 @@ -2117,10 +2117,10 @@ static void linphone_core_internal_notify_received(LinphoneCore *lc, LinphoneEve friendLists = friendLists->next; } } else if (strcmp(notified_event, "Conference") == 0) { - LinphonePrivate::Conference::ConferenceEventPackage *cep = reinterpret_cast(linphone_event_get_user_data(lev)); - if(cep) { - ms_message("notify event for conference %s", cep->getConfId().c_str()); - cep->notifyReceived((char *) linphone_content_get_buffer(body)); + LinphonePrivate::Conference::RemoteConferenceEventHandler *handler = reinterpret_cast(linphone_event_get_user_data(lev)); + if(handler) { + ms_message("notify event for conference %s", handler->getConfId().c_str()); + handler->notifyReceived((char *) linphone_content_get_buffer(body)); } } } @@ -2129,10 +2129,7 @@ static void linphone_core_internal_subscription_state_changed(LinphoneCore *lc, if (strcasecmp(linphone_event_get_name(lev), "Presence") == 0) { linphone_friend_list_subscription_state_changed(lc, lev, state); } else if (strcmp(linphone_event_get_name(lev), "Conference") == 0) { - LinphonePrivate::Conference::ConferenceEventPackage *cep = reinterpret_cast(linphone_event_get_user_data(lev)); - if(cep) { - - } + } } diff --git a/src/conference/local-conference-event-handler.cpp b/src/conference/local-conference-event-handler.cpp new file mode 100644 index 000000000..ef26d59ef --- /dev/null +++ b/src/conference/local-conference-event-handler.cpp @@ -0,0 +1,155 @@ +/* + * local-conference-event-handler.cpp + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "local-conference-event-handler.h" +#include "conference-info.hxx" +#include "private.h" + +using namespace std; +using namespace conference_info; +using namespace LinphonePrivate; + +class Conference::LocalConferenceEventHandlerPrivate : public ObjectPrivate { +public: + void notifyFullState(string notify, LinphoneEvent *lev); + void notifyAllExcept(string notify, LinphoneAddress *addr); + + LocalConference *conf; + LinphoneCore *lc; +}; + +void Conference::LocalConferenceEventHandlerPrivate::notifyFullState(string notify, LinphoneEvent *lev) { + LinphoneContent* content = linphone_core_create_content(lev->lc); + linphone_content_set_buffer(content,notify.c_str(),strlen(notify.c_str())); + linphone_event_notify(lev, content); + linphone_content_unref(content); + // linphone_event_unref(lev); ?? +} + +void Conference::LocalConferenceEventHandlerPrivate::notifyAllExcept(string notify, LinphoneAddress *addr) { + for(auto participant : conf->getParticipants()) { + if(!linphone_address_equal(participant.getAddress(), addr)) { + LinphoneEvent *lev = linphone_core_create_notify(lc, participant.getAddress(), "Conference"); + LinphoneContent* content = linphone_core_create_content(lev->lc); + linphone_content_set_buffer(content,notify.c_str(),strlen(notify.c_str())); + linphone_event_notify(lev, content); + linphone_content_unref(content); + linphone_event_unref(lev); + } + } +} + +// -------- Conference::LocalConferenceEventHandler public methods --------- +Conference::LocalConferenceEventHandler::LocalConferenceEventHandler(LinphoneCore *core, LocalConference *localConf) : Object(new LocalConferenceEventHandlerPrivate) { + L_D(LocalConferenceEventHandler); + xercesc::XMLPlatformUtils::Initialize(); + d->conf = localConf; + d->lc = core; // conf->getCore() ? +} + +Conference::LocalConferenceEventHandler::~LocalConferenceEventHandler() { + xercesc::XMLPlatformUtils::Terminate(); +} + +string Conference::LocalConferenceEventHandler::subscribeReceived(LinphoneEvent *lev) { + L_D(LocalConferenceEventHandler); + char *entity = linphone_address_as_string_uri_only(d->conf->getAddress()); + Conference_type confInfo = Conference_type(entity); + Users_type users; + confInfo.setUsers(users); + stringstream notify; + xml_schema::NamespaceInfomap map; + + map[""].name = "urn:ietf:params:xml:ns:conference-info"; + for(auto participant : d->conf->getParticipants()) { + User_type user = User_type(); + User_roles_type roles; + user.setRoles(roles); + user.setEntity(linphone_address_as_string_uri_only(participant.getAddress())); + user.getRoles()->getEntry().push_back(participant.isAdmin() ? "admin" : "participant"); + user.setState("full"); + confInfo.getUsers()->getUser().push_back(user); + } + + serializeConference_info(notify, confInfo, map); + //d->notifyFullState(notify.str(), lev); + return notify.str(); +} + +string Conference::LocalConferenceEventHandler::notifyParticipantAdded(LinphoneAddress *addr) { + L_D(LocalConferenceEventHandler); + char *entity = linphone_address_as_string_uri_only(d->conf->getAddress()); + Conference_type confInfo = Conference_type(entity); + Users_type users; + confInfo.setUsers(users); + stringstream notify; + xml_schema::NamespaceInfomap map; + + User_type user = User_type(); + User_roles_type roles; + user.setRoles(roles); + user.setEntity(linphone_address_as_string_uri_only(addr)); + user.getRoles()->getEntry().push_back("participant"); + user.setState("full"); + confInfo.getUsers()->getUser().push_back(user); + + serializeConference_info(notify, confInfo, map); + //d->notifyAllExcept(notify.str(), addr); + return notify.str(); +} + +string Conference::LocalConferenceEventHandler::notifyParticipantRemoved(LinphoneAddress *addr) { + L_D(LocalConferenceEventHandler); + char *entity = linphone_address_as_string_uri_only(d->conf->getAddress()); + Conference_type confInfo = Conference_type(entity); + Users_type users; + confInfo.setUsers(users); + stringstream notify; + xml_schema::NamespaceInfomap map; + + User_type user = User_type(); + user.setEntity(linphone_address_as_string_uri_only(addr)); + user.setState("deleted"); + confInfo.getUsers()->getUser().push_back(user); + + serializeConference_info(notify, confInfo, map); + //d->notifyAllExcept(notify.str(), addr); + return notify.str(); +} + +string Conference::LocalConferenceEventHandler::notifyParticipantSetAdmin(LinphoneAddress *addr, bool isAdmin) { + L_D(LocalConferenceEventHandler); + char *entity = linphone_address_as_string_uri_only(d->conf->getAddress()); + Conference_type confInfo = Conference_type(entity); + Users_type users; + confInfo.setUsers(users); + stringstream notify; + xml_schema::NamespaceInfomap map; + + User_type user = User_type(); + User_roles_type roles; + user.setRoles(roles); + user.setEntity(linphone_address_as_string_uri_only(addr)); + user.getRoles()->getEntry().push_back(isAdmin ? "admin" : "participant"); + user.setState("partial"); + confInfo.getUsers()->getUser().push_back(user); + + serializeConference_info(notify, confInfo, map); + //d->notifyAllExcept(notify.str(), addr); + return notify.str(); +} diff --git a/src/conference/local-conference-event-handler.h b/src/conference/local-conference-event-handler.h new file mode 100644 index 000000000..001a2a492 --- /dev/null +++ b/src/conference/local-conference-event-handler.h @@ -0,0 +1,112 @@ +/* + * local-conference-event-handler.h + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _LOCAL_CONFERENCE_EVENT_HANDLER_H_ +#define _LOCAL_CONFERENCE_EVENT_HANDLER_H_ + +#include +#include +#include + +#include "object/object.h" +#include "linphone/core.h" +#include "linphone/event.h" + +namespace LinphonePrivate { + namespace Conference { + // ------------------------------------------------------------------------- + // LocalConferenceEventHandler. + // ------------------------------------------------------------------------- + class LocalConference; + class LocalConferenceEventHandlerPrivate; + class LocalConferenceEventHandler : public Object { + public: + LocalConferenceEventHandler(LinphoneCore *core, LocalConference* localConf); + ~LocalConferenceEventHandler(); + std::string subscribeReceived(LinphoneEvent *lev); + std::string notifyParticipantAdded(LinphoneAddress *addr); + std::string notifyParticipantRemoved(LinphoneAddress *addr); + std::string notifyParticipantSetAdmin(LinphoneAddress *addr, bool isAdmin); + + private: + L_DECLARE_PRIVATE(LocalConferenceEventHandler); + L_DISABLE_COPY(LocalConferenceEventHandler); + }; + + class Participant { + public: + Participant(LinphoneAddress *addr, bool admin); + ~Participant(); + bool isAdmin(); + LinphoneAddress *getAddress(); + + LinphoneAddress *mAddr; + bool mAdmin; + }; + + class LocalConference { + public: + LocalConference(LinphoneCore *lc, LinphoneAddress *confAddr); + ~LocalConference(); + LinphoneAddress *getAddress(); + std::list getParticipants(); + + std::shared_ptr mHandler; + std::list mParticipants; + LinphoneAddress *mConfAddr; + }; + } +} + + +// -------- Conference::LocalConference public methods --------- +LinphonePrivate::Conference::LocalConference::LocalConference(LinphoneCore *core, LinphoneAddress *confAddr) { + mConfAddr = confAddr; + mHandler = std::make_shared(core, this); +} + +LinphonePrivate::Conference::LocalConference::~LocalConference() { + //linphone_address_unref(mConfAddr); +} + +LinphoneAddress* LinphonePrivate::Conference::LocalConference::getAddress() { + return mConfAddr; +} + +std::list LinphonePrivate::Conference::LocalConference::getParticipants() { + return mParticipants; +} + +LinphonePrivate::Conference::Participant::Participant(LinphoneAddress *addr, bool admin) { + mAddr = addr; + mAdmin = admin; +} + +LinphonePrivate::Conference::Participant::~Participant() { + //linphone_address_unref(mAddr); +} + +bool LinphonePrivate::Conference::Participant::isAdmin() { + return mAdmin; +} + +LinphoneAddress* LinphonePrivate::Conference::Participant::getAddress() { + return mAddr; +} + +#endif // ifndef _LOCAL_CONFERENCE_EVENT_HANDLER_H_ \ No newline at end of file diff --git a/src/conference/conference-event-package.cpp b/src/conference/remote-conference-event-handler.cpp similarity index 71% rename from src/conference/conference-event-package.cpp rename to src/conference/remote-conference-event-handler.cpp index 41a2b26bf..226aa9e4c 100644 --- a/src/conference/conference-event-package.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -1,5 +1,5 @@ /* - * conference-event-package.cpp + * remote-conference-event-handler.cpp * Copyright (C) 2017 Belledonne Communications SARL * * This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "conference-event-package.h" +#include "remote-conference-event-handler.h" #include "conference-info.hxx" #include "private.h" @@ -24,7 +24,7 @@ using namespace std; using namespace conference_info; using namespace LinphonePrivate; -class LinphonePrivate::Conference::ConferenceEventPackagePrivate : public ObjectPrivate { +class Conference::RemoteConferenceEventHandlerPrivate : public ObjectPrivate { public: LinphoneCore *lc; ConferenceListener *listener; @@ -33,8 +33,9 @@ public: LinphoneEvent *lev; }; -Conference::ConferenceEventPackage::ConferenceEventPackage(LinphoneCore *lc, ConferenceListener *listener, LinphoneAddress *confAddr) : Object(new Conference::ConferenceEventPackagePrivate) { - L_D(ConferenceEventPackage); +// -------- Conference::RemoteConferenceEventHandler public methods --------- +Conference::RemoteConferenceEventHandler::RemoteConferenceEventHandler(LinphoneCore *lc, ConferenceListener *listener, LinphoneAddress *confAddr) : Object(new RemoteConferenceEventHandlerPrivate) { + L_D(RemoteConferenceEventHandler); xercesc::XMLPlatformUtils::Initialize(); d->lc = lc; d->listener = listener; @@ -43,15 +44,15 @@ Conference::ConferenceEventPackage::ConferenceEventPackage(LinphoneCore *lc, Con d->lev = NULL; } -Conference::ConferenceEventPackage::~ConferenceEventPackage() { - L_D(ConferenceEventPackage); +Conference::RemoteConferenceEventHandler::~RemoteConferenceEventHandler() { + L_D(RemoteConferenceEventHandler); xercesc::XMLPlatformUtils::Terminate(); linphone_address_unref(d->confAddr); if(d->lev) linphone_event_unref(d->lev); } -void Conference::ConferenceEventPackage::subscribe(string confId) { - L_D(ConferenceEventPackage); +void Conference::RemoteConferenceEventHandler::subscribe(string confId) { + L_D(RemoteConferenceEventHandler); d->confId = confId; d->lev = linphone_core_create_subscribe(d->lc, d->confAddr, "Conference", 600); linphone_event_ref(d->lev); @@ -61,13 +62,13 @@ void Conference::ConferenceEventPackage::subscribe(string confId) { linphone_event_send_subscribe(d->lev, NULL); } -void Conference::ConferenceEventPackage::unsubscribe() { - L_D(ConferenceEventPackage); +void Conference::RemoteConferenceEventHandler::unsubscribe() { + L_D(RemoteConferenceEventHandler); linphone_event_terminate(d->lev); } -void Conference::ConferenceEventPackage::notifyReceived(const char *xmlBody) { - L_D(ConferenceEventPackage); +void Conference::RemoteConferenceEventHandler::notifyReceived(const char *xmlBody) { + L_D(RemoteConferenceEventHandler); istringstream data(xmlBody); unique_ptr confInfo = parseConference_info(data, xml_schema::Flags::dont_validate); if(strcmp(confInfo->getEntity().c_str(), linphone_address_as_string(d->confAddr)) == 0) { @@ -95,7 +96,7 @@ void Conference::ConferenceEventPackage::notifyReceived(const char *xmlBody) { } } -string Conference::ConferenceEventPackage::getConfId() { - L_D(ConferenceEventPackage); +string Conference::RemoteConferenceEventHandler::getConfId() { + L_D(RemoteConferenceEventHandler); return d->confId; } diff --git a/src/conference/conference-event-package.h b/src/conference/remote-conference-event-handler.h similarity index 67% rename from src/conference/conference-event-package.h rename to src/conference/remote-conference-event-handler.h index 3237cf41d..ef8212128 100644 --- a/src/conference/conference-event-package.h +++ b/src/conference/remote-conference-event-handler.h @@ -1,5 +1,5 @@ /* - * conference-event-package.h + * remote-conference-event-handler.h * Copyright (C) 2017 Belledonne Communications SARL * * This program is free software: you can redistribute it and/or modify @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#ifndef _CONFERENCE_EVENT_PACKAGE_H_ -#define _CONFERENCE_EVENT_PACKAGE_H_ +#ifndef _REMOTE_CONFERENCE_EVENT_HANDLER_H_ +#define _REMOTE_CONFERENCE_EVENT_HANDLER_H_ #include @@ -27,25 +27,24 @@ namespace LinphonePrivate { namespace Conference { - class ConferenceEventPackagePrivate; - // ------------------------------------------------------------------------- - // ConferenceEventPackage. + // RemoteConferenceEventHandler. // ------------------------------------------------------------------------- - class ConferenceEventPackage : public Object { + class RemoteConferenceEventHandlerPrivate; + class RemoteConferenceEventHandler : public Object { public: - ConferenceEventPackage(LinphoneCore *lc, ConferenceListener *listener, LinphoneAddress *confAddr); - ~ConferenceEventPackage(); + RemoteConferenceEventHandler(LinphoneCore *lc, ConferenceListener *listener, LinphoneAddress *confAddr); + ~RemoteConferenceEventHandler(); void subscribe(std::string confId); void notifyReceived(const char *xmlBody); void unsubscribe(); std::string getConfId(); private: - L_DECLARE_PRIVATE(ConferenceEventPackage); - L_DISABLE_COPY(ConferenceEventPackage); + L_DECLARE_PRIVATE(RemoteConferenceEventHandler); + L_DISABLE_COPY(RemoteConferenceEventHandler); }; } } -#endif // ifndef _CONFERENCE_EVENT_PACKAGE_H_ +#endif // ifndef _REMOTE_CONFERENCE_EVENT_HANDLER_H_ diff --git a/tester/confeventpackage_tester.cpp b/tester/confeventpackage_tester.cpp index b909bf122..e737ec654 100644 --- a/tester/confeventpackage_tester.cpp +++ b/tester/confeventpackage_tester.cpp @@ -22,7 +22,8 @@ #include "private.h" #include "liblinphone_tester.h" #include "conference/conference-listener.h" -#include "conference/conference-event-package.h" +#include "conference/remote-conference-event-handler.h" +#include "conference/local-conference-event-handler.h" using namespace LinphonePrivate; using namespace std; @@ -413,20 +414,12 @@ static const char *aliceUri = "sip:alice@example.com"; static const char *frankUri = "sip:frank@example.com"; static const char *confUri = "sips:conf233@example.com"; -void linphone_conf_event_notify(LinphoneEvent *lev){ - LinphoneContent* content = linphone_core_create_content(lev->lc); - const char* uri = linphone_address_as_string_uri_only((LinphoneAddress*)sal_op_get_to_address(lev->op)); - char notify[strlen(first_notify) + strlen(uri)]; - snprintf(notify, sizeof(notify), first_notify, uri); - linphone_content_set_buffer(content,notify,strlen(notify)); - linphone_event_notify(lev, content); - linphone_content_unref(content); -} + class ConferenceEventTester : public Conference::ConferenceListener{ public: - shared_ptr cep; - map participants; + shared_ptr mHandler; + map mParticipants; ConferenceEventTester(LinphoneCore *lc, LinphoneAddress *confAddr); @@ -438,22 +431,22 @@ public: }; ConferenceEventTester::ConferenceEventTester(LinphoneCore *lc, LinphoneAddress *confAddr){ - this->cep = make_shared(lc, this, confAddr); + mHandler = make_shared(lc, this, confAddr); } void ConferenceEventTester::conferenceCreated(LinphoneAddress *confAddress){} void ConferenceEventTester::conferenceTerminated(LinphoneAddress *confAddress){} void ConferenceEventTester::participantAdded(LinphoneAddress *addr){ - this->participants.insert(pair(linphone_address_as_string(addr),0)); + mParticipants.insert(pair(linphone_address_as_string(addr),0)); } void ConferenceEventTester::participantRemoved(LinphoneAddress *addr){ - this->participants.erase(linphone_address_as_string(addr)); + mParticipants.erase(linphone_address_as_string(addr)); } void ConferenceEventTester::participantSetAdmin(LinphoneAddress *addr, bool isAdmin){ const char *addrAsString = linphone_address_as_string(addr); - if(this->participants.find(addrAsString) != this->participants.end()){ - this->participants.erase(addrAsString); - this->participants.insert(pair(addrAsString, isAdmin ? 1 : 0)); + if(mParticipants.find(addrAsString) != mParticipants.end()){ + mParticipants.erase(addrAsString); + mParticipants.insert(pair(addrAsString, isAdmin ? 1 : 0)); } } @@ -466,13 +459,13 @@ void first_notify_parsing(void){ char notify[strlen(first_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester.cep->notifyReceived(notify); + tester.mHandler->notifyReceived(notify); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); @@ -489,11 +482,11 @@ void first_notify_parsing_wrong_conf(void){ char notify[strlen(first_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester.cep->notifyReceived(notify); + tester.mHandler->notifyReceived(notify); - BC_ASSERT_EQUAL(tester.participants.size(), 0, int, "%d"); - BC_ASSERT_FALSE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_FALSE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 0, int, "%d"); + BC_ASSERT_FALSE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_FALSE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); @@ -512,20 +505,20 @@ void participant_added_parsing(void){ char notify_added[strlen(participant_added_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester.cep->notifyReceived(notify); + tester.mHandler->notifyReceived(notify); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_added, sizeof(notify_added), participant_added_notify, confUri); - tester.cep->notifyReceived(notify_added); + tester.mHandler->notifyReceived(notify_added); - BC_ASSERT_EQUAL(tester.participants.size(), 3, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(frankAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(frankAddr))->second == 0); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 3, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(frankAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(frankAddr))->second == 0); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); @@ -545,19 +538,19 @@ void participant_not_added_parsing(void){ char notify_not_added[strlen(participant_not_added_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester.cep->notifyReceived(notify); + tester.mHandler->notifyReceived(notify); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_not_added, sizeof(notify_not_added), participant_not_added_notify, confUri); - tester.cep->notifyReceived(notify_not_added); + tester.mHandler->notifyReceived(notify_not_added); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_FALSE(tester.participants.find(linphone_address_as_string(frankAddr)) != tester.participants.end()); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_FALSE(tester.mParticipants.find(linphone_address_as_string(frankAddr)) != tester.mParticipants.end()); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); @@ -576,19 +569,19 @@ void participant_deleted_parsing(void){ char notify_deleted[strlen(participant_deleted_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester.cep->notifyReceived(notify); + tester.mHandler->notifyReceived(notify); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_deleted, sizeof(notify_deleted), participant_deleted_notify, confUri); - tester.cep->notifyReceived(notify_deleted); + tester.mHandler->notifyReceived(notify_deleted); - BC_ASSERT_EQUAL(tester.participants.size(), 1, int, "%d"); - BC_ASSERT_FALSE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 1, int, "%d"); + BC_ASSERT_FALSE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); @@ -606,20 +599,20 @@ void participant_admined_parsing(void){ char notify_admined[strlen(participant_admined_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester.cep->notifyReceived(notify); + tester.mHandler->notifyReceived(notify); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_admined, sizeof(notify_admined), participant_admined_notify, confUri); - tester.cep->notifyReceived(notify_admined); + tester.mHandler->notifyReceived(notify_admined); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 1); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 1); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); @@ -637,20 +630,20 @@ void participant_unadmined_parsing(void){ char notify_unadmined[strlen(participant_unadmined_notify) + strlen(confUri)]; snprintf(notify, sizeof(notify), first_notify, confUri); - tester.cep->notifyReceived(notify); + tester.mHandler->notifyReceived(notify); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); snprintf(notify_unadmined, sizeof(notify_unadmined), participant_unadmined_notify, confUri); - tester.cep->notifyReceived(notify_unadmined); + tester.mHandler->notifyReceived(notify_unadmined); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 0); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 0); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); @@ -658,39 +651,231 @@ void participant_unadmined_parsing(void){ linphone_core_manager_destroy(marie); } -void send_subscribe_receive_first_notify(void){ +void send_first_notify(void) { + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); + ConferenceEventTester tester(marie->lc, pauline->identity); + Conference::LocalConference localConf(pauline->lc, pauline->identity); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + Conference::Participant p1(bobAddr, false); + Conference::Participant p2(aliceAddr, true); + LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); + string notify; + + localConf.mParticipants.push_back(p1); + localConf.mParticipants.push_back(p2); + notify = localConf.mHandler->subscribeReceived(lev); + tester.mHandler->notifyReceived(notify.c_str()); + + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); + + linphone_event_unref(lev); + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_core_manager_destroy(marie); + linphone_core_manager_destroy(pauline); +} + +void send_added_notify(void) { LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); ConferenceEventTester tester(marie->lc, pauline->identity); + Conference::LocalConference localConf(pauline->lc, pauline->identity); LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); - string confId("conf233"); + LinphoneAddress *frankAddr = linphone_core_interpret_url(marie->lc, frankUri); + Conference::Participant p1(bobAddr, false); + Conference::Participant p2(aliceAddr, true); + Conference::Participant p3(frankAddr, false); + LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); + string notify; - BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneRegistrationOk,1,1000)); - BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneRegistrationOk,1,1000)); + localConf.mParticipants.push_back(p1); + localConf.mParticipants.push_back(p2); + notify = localConf.mHandler->subscribeReceived(lev); + tester.mHandler->notifyReceived(notify.c_str()); - tester.cep->subscribe(confId); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); - BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionIncomingReceived,1,1000)); - BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionActive,1,3000)); - wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_NotifyReceived,1,3000); + notify = localConf.mHandler->notifyParticipantAdded(frankAddr); + tester.mHandler->notifyReceived(notify.c_str()); - BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d"); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr)) != tester.participants.end()); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(bobAddr))->second == 0); - BC_ASSERT_TRUE(tester.participants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_EQUAL(tester.mParticipants.size(), 3, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(frankAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(frankAddr))->second == 0); - tester.cep->unsubscribe(); + linphone_event_unref(lev); + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_address_unref(frankAddr); + linphone_core_manager_destroy(marie); + linphone_core_manager_destroy(pauline); +} - BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionTerminated,1,1000)); +void send_removed_notify(void) { + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); + ConferenceEventTester tester(marie->lc, pauline->identity); + Conference::LocalConference localConf(pauline->lc, pauline->identity); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + Conference::Participant p1(bobAddr, false); + Conference::Participant p2(aliceAddr, true); + LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); + string notify; + localConf.mParticipants.push_back(p1); + localConf.mParticipants.push_back(p2); + notify = localConf.mHandler->subscribeReceived(lev); + tester.mHandler->notifyReceived(notify.c_str()); + + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); + + notify = localConf.mHandler->notifyParticipantRemoved(bobAddr); + tester.mHandler->notifyReceived(notify.c_str()); + + BC_ASSERT_EQUAL(tester.mParticipants.size(), 1, int, "%d"); + BC_ASSERT_FALSE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); + + linphone_event_unref(lev); linphone_address_unref(bobAddr); linphone_address_unref(aliceAddr); linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline); } +void send_admined_notify(void) { + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); + ConferenceEventTester tester(marie->lc, pauline->identity); + Conference::LocalConference localConf(pauline->lc, pauline->identity); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + Conference::Participant p1(bobAddr, false); + Conference::Participant p2(aliceAddr, true); + Conference::Participant p3(bobAddr, true); + LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); + string notify; + + localConf.mParticipants.push_back(p1); + localConf.mParticipants.push_back(p2); + notify = localConf.mHandler->subscribeReceived(lev); + tester.mHandler->notifyReceived(notify.c_str()); + + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); + + notify = localConf.mHandler->notifyParticipantSetAdmin(bobAddr, true); + tester.mHandler->notifyReceived(notify.c_str()); + + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 1); + + linphone_event_unref(lev); + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_core_manager_destroy(marie); + linphone_core_manager_destroy(pauline); +} + +void send_unadmined_notify(void) { + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); + ConferenceEventTester tester(marie->lc, pauline->identity); + Conference::LocalConference localConf(pauline->lc, pauline->identity); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + Conference::Participant p1(bobAddr, false); + Conference::Participant p2(aliceAddr, true); + Conference::Participant p3(aliceAddr, false); + LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); + string notify; + + localConf.mParticipants.push_back(p1); + localConf.mParticipants.push_back(p2); + notify = localConf.mHandler->subscribeReceived(lev); + tester.mHandler->notifyReceived(notify.c_str()); + + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); + + notify = localConf.mHandler->notifyParticipantSetAdmin(aliceAddr, false); + tester.mHandler->notifyReceived(notify.c_str()); + + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + + linphone_event_unref(lev); + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_core_manager_destroy(marie); + linphone_core_manager_destroy(pauline); +} + +void send_subscribe_receive_first_notify(void){ + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); + ConferenceEventTester tester(marie->lc, pauline->identity); + LinphoneAddress *bobAddr = linphone_core_interpret_url(marie->lc, bobUri); + LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); + string confId("conf233"); + + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneRegistrationOk,1,1000)); + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneRegistrationOk,1,1000)); + + tester.mHandler->subscribe(confId); + + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionIncomingReceived,1,1000)); + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionActive,1,3000)); + wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_NotifyReceived,1,3000); + + BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr)) != tester.mParticipants.end()); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); + BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); + + tester.mHandler->unsubscribe(); + + BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneSubscriptionTerminated,1,1000)); + + linphone_address_unref(bobAddr); + linphone_address_unref(aliceAddr); + linphone_core_manager_destroy(marie); + linphone_core_manager_destroy(pauline); +} + test_t conf_event_tests[] = { TEST_NO_TAG("First notify parsing", first_notify_parsing), TEST_NO_TAG("First notify parsing wrong conf", first_notify_parsing_wrong_conf), @@ -699,7 +884,12 @@ test_t conf_event_tests[] = { TEST_NO_TAG("Participant deleted", participant_deleted_parsing), TEST_NO_TAG("Participant admined", participant_admined_parsing), TEST_NO_TAG("Participant unadmined", participant_unadmined_parsing), - TEST_NO_TAG("Send subscribe receive first notify", send_subscribe_receive_first_notify) + TEST_NO_TAG("Send first notify", send_first_notify), + TEST_NO_TAG("Send participant added notify", send_added_notify), + TEST_NO_TAG("Send participant removed notify", send_removed_notify), + TEST_NO_TAG("Send participant admined notify", send_admined_notify), + TEST_NO_TAG("Send participant unadmined notify", send_unadmined_notify) + //TEST_NO_TAG("Send subscribe receive first notify", send_subscribe_receive_first_notify) }; test_suite_t conf_event_test_suite = {"Conf event package", NULL, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each, diff --git a/tester/eventapi_tester.c b/tester/eventapi_tester.c index 7369095b5..24614827f 100644 --- a/tester/eventapi_tester.c +++ b/tester/eventapi_tester.c @@ -83,7 +83,7 @@ void linphone_subscription_state_change(LinphoneCore *lc, LinphoneEvent *lev, Li if (linphone_event_get_subscription_dir(lev)==LinphoneSubscriptionIncoming){ mgr->lev=lev; if(strcmp(linphone_event_get_name(lev), "Conference") == 0) { - linphone_conf_event_notify(lev); + // TODO : Get LocalConfEventHandler and call handler->subscribeReceived(lev) } else { linphone_event_notify(lev,content); } From bbd08f3aaf20907f6244e642d93592aedef41086 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Fri, 4 Aug 2017 14:44:10 +0200 Subject: [PATCH 06/17] fix merge --- coreapi/CMakeLists.txt | 5 +---- src/conference/local-conference-event-handler.cpp | 2 +- src/conference/remote-conference-event-handler.cpp | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index 5bccca85d..06d84215d 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -184,11 +184,8 @@ set(LIBS ${MEDIASTREAMER2_LIBRARIES} ${ORTP_LIBRARIES} ${XML2_LIBRARIES} -<<<<<<< HEAD - /usr/local/Cellar/xerces-c/3.1.4/lib/libxerces-c.dylib -======= ${BELR_LIBRARIES} ->>>>>>> origin/master + /usr/local/Cellar/xerces-c/3.1.4/lib/libxerces-c.dylib ) if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") list(APPEND LIBS "Ws2_32") diff --git a/src/conference/local-conference-event-handler.cpp b/src/conference/local-conference-event-handler.cpp index ef26d59ef..ff0e6a3b5 100644 --- a/src/conference/local-conference-event-handler.cpp +++ b/src/conference/local-conference-event-handler.cpp @@ -55,7 +55,7 @@ void Conference::LocalConferenceEventHandlerPrivate::notifyAllExcept(string noti } // -------- Conference::LocalConferenceEventHandler public methods --------- -Conference::LocalConferenceEventHandler::LocalConferenceEventHandler(LinphoneCore *core, LocalConference *localConf) : Object(new LocalConferenceEventHandlerPrivate) { +Conference::LocalConferenceEventHandler::LocalConferenceEventHandler(LinphoneCore *core, LocalConference *localConf) : Object(*new LocalConferenceEventHandlerPrivate) { L_D(LocalConferenceEventHandler); xercesc::XMLPlatformUtils::Initialize(); d->conf = localConf; diff --git a/src/conference/remote-conference-event-handler.cpp b/src/conference/remote-conference-event-handler.cpp index 226aa9e4c..08ed76c36 100644 --- a/src/conference/remote-conference-event-handler.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -34,7 +34,7 @@ public: }; // -------- Conference::RemoteConferenceEventHandler public methods --------- -Conference::RemoteConferenceEventHandler::RemoteConferenceEventHandler(LinphoneCore *lc, ConferenceListener *listener, LinphoneAddress *confAddr) : Object(new RemoteConferenceEventHandlerPrivate) { +Conference::RemoteConferenceEventHandler::RemoteConferenceEventHandler(LinphoneCore *lc, ConferenceListener *listener, LinphoneAddress *confAddr) : Object(*new RemoteConferenceEventHandlerPrivate) { L_D(RemoteConferenceEventHandler); xercesc::XMLPlatformUtils::Initialize(); d->lc = lc; From 23f4d851f193b1e8998b9f2aacdae3c315ce8c2c Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 7 Aug 2017 11:22:56 +0200 Subject: [PATCH 07/17] better use of memory --- .../local-conference-event-handler.cpp | 4 +-- .../local-conference-event-handler.h | 29 ++++++++++++------- tester/confeventpackage_tester.cpp | 18 ++++++------ 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/conference/local-conference-event-handler.cpp b/src/conference/local-conference-event-handler.cpp index ff0e6a3b5..3bde61970 100644 --- a/src/conference/local-conference-event-handler.cpp +++ b/src/conference/local-conference-event-handler.cpp @@ -42,7 +42,7 @@ void Conference::LocalConferenceEventHandlerPrivate::notifyFullState(string noti } void Conference::LocalConferenceEventHandlerPrivate::notifyAllExcept(string notify, LinphoneAddress *addr) { - for(auto participant : conf->getParticipants()) { + for(const auto &participant : conf->getParticipants()) { if(!linphone_address_equal(participant.getAddress(), addr)) { LinphoneEvent *lev = linphone_core_create_notify(lc, participant.getAddress(), "Conference"); LinphoneContent* content = linphone_core_create_content(lev->lc); @@ -76,7 +76,7 @@ string Conference::LocalConferenceEventHandler::subscribeReceived(LinphoneEvent xml_schema::NamespaceInfomap map; map[""].name = "urn:ietf:params:xml:ns:conference-info"; - for(auto participant : d->conf->getParticipants()) { + for(const auto &participant : d->conf->getParticipants()) { User_type user = User_type(); User_roles_type roles; user.setRoles(roles); diff --git a/src/conference/local-conference-event-handler.h b/src/conference/local-conference-event-handler.h index 001a2a492..0b2768685 100644 --- a/src/conference/local-conference-event-handler.h +++ b/src/conference/local-conference-event-handler.h @@ -52,9 +52,10 @@ namespace LinphonePrivate { public: Participant(LinphoneAddress *addr, bool admin); ~Participant(); - bool isAdmin(); - LinphoneAddress *getAddress(); + bool isAdmin() const; + const LinphoneAddress *getAddress() const; + private: LinphoneAddress *mAddr; bool mAdmin; }; @@ -63,12 +64,15 @@ namespace LinphonePrivate { public: LocalConference(LinphoneCore *lc, LinphoneAddress *confAddr); ~LocalConference(); - LinphoneAddress *getAddress(); - std::list getParticipants(); - - std::shared_ptr mHandler; + const LinphoneAddress *getAddress() const; + std::list getParticipants() const; + const std::shared_ptr getHandler() const; + std::list mParticipants; + + private: LinphoneAddress *mConfAddr; + std::shared_ptr mHandler; }; } } @@ -84,11 +88,16 @@ LinphonePrivate::Conference::LocalConference::~LocalConference() { //linphone_address_unref(mConfAddr); } -LinphoneAddress* LinphonePrivate::Conference::LocalConference::getAddress() { +const LinphoneAddress* LinphonePrivate::Conference::LocalConference::getAddress() const { return mConfAddr; } -std::list LinphonePrivate::Conference::LocalConference::getParticipants() { + +const std::shared_ptr LinphonePrivate::Conference::LocalConference::getHandler() const { + return mHandler; +} + +std::list LinphonePrivate::Conference::LocalConference::getParticipants() const { return mParticipants; } @@ -101,11 +110,11 @@ LinphonePrivate::Conference::Participant::~Participant() { //linphone_address_unref(mAddr); } -bool LinphonePrivate::Conference::Participant::isAdmin() { +bool LinphonePrivate::Conference::Participant::isAdmin() const { return mAdmin; } -LinphoneAddress* LinphonePrivate::Conference::Participant::getAddress() { +const LinphoneAddress* LinphonePrivate::Conference::Participant::getAddress() const { return mAddr; } diff --git a/tester/confeventpackage_tester.cpp b/tester/confeventpackage_tester.cpp index e737ec654..64d43468e 100644 --- a/tester/confeventpackage_tester.cpp +++ b/tester/confeventpackage_tester.cpp @@ -665,7 +665,7 @@ void send_first_notify(void) { localConf.mParticipants.push_back(p1); localConf.mParticipants.push_back(p2); - notify = localConf.mHandler->subscribeReceived(lev); + notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); @@ -697,7 +697,7 @@ void send_added_notify(void) { localConf.mParticipants.push_back(p1); localConf.mParticipants.push_back(p2); - notify = localConf.mHandler->subscribeReceived(lev); + notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); @@ -706,7 +706,7 @@ void send_added_notify(void) { BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); - notify = localConf.mHandler->notifyParticipantAdded(frankAddr); + notify = localConf.getHandler()->notifyParticipantAdded(frankAddr); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 3, int, "%d"); @@ -739,7 +739,7 @@ void send_removed_notify(void) { localConf.mParticipants.push_back(p1); localConf.mParticipants.push_back(p2); - notify = localConf.mHandler->subscribeReceived(lev); + notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); @@ -748,7 +748,7 @@ void send_removed_notify(void) { BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); - notify = localConf.mHandler->notifyParticipantRemoved(bobAddr); + notify = localConf.getHandler()->notifyParticipantRemoved(bobAddr); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 1, int, "%d"); @@ -778,7 +778,7 @@ void send_admined_notify(void) { localConf.mParticipants.push_back(p1); localConf.mParticipants.push_back(p2); - notify = localConf.mHandler->subscribeReceived(lev); + notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); @@ -787,7 +787,7 @@ void send_admined_notify(void) { BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); - notify = localConf.mHandler->notifyParticipantSetAdmin(bobAddr, true); + notify = localConf.getHandler()->notifyParticipantSetAdmin(bobAddr, true); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); @@ -818,7 +818,7 @@ void send_unadmined_notify(void) { localConf.mParticipants.push_back(p1); localConf.mParticipants.push_back(p2); - notify = localConf.mHandler->subscribeReceived(lev); + notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); @@ -827,7 +827,7 @@ void send_unadmined_notify(void) { BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(bobAddr))->second == 0); BC_ASSERT_TRUE(tester.mParticipants.find(linphone_address_as_string(aliceAddr))->second == 1); - notify = localConf.mHandler->notifyParticipantSetAdmin(aliceAddr, false); + notify = localConf.getHandler()->notifyParticipantSetAdmin(aliceAddr, false); tester.mHandler->notifyReceived(notify.c_str()); BC_ASSERT_EQUAL(tester.mParticipants.size(), 2, int, "%d"); From 8272134d35371acb3d22c7736b5e5d191877e547 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 7 Aug 2017 11:56:54 +0200 Subject: [PATCH 08/17] allow abstract participant arch to localConference --- .../local-conference-event-handler.h | 8 ++++++-- tester/confeventpackage_tester.cpp | 20 +++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/conference/local-conference-event-handler.h b/src/conference/local-conference-event-handler.h index 0b2768685..4dd08d1e5 100644 --- a/src/conference/local-conference-event-handler.h +++ b/src/conference/local-conference-event-handler.h @@ -67,12 +67,12 @@ namespace LinphonePrivate { const LinphoneAddress *getAddress() const; std::list getParticipants() const; const std::shared_ptr getHandler() const; - - std::list mParticipants; + void addParticipant(Participant p); private: LinphoneAddress *mConfAddr; std::shared_ptr mHandler; + std::list mParticipants; }; } } @@ -101,6 +101,10 @@ std::list LinphonePrivate::Conference: return mParticipants; } +void LinphonePrivate::Conference::LocalConference::addParticipant(LinphonePrivate::Conference::Participant p) { + mParticipants.push_back(p); +} + LinphonePrivate::Conference::Participant::Participant(LinphoneAddress *addr, bool admin) { mAddr = addr; mAdmin = admin; diff --git a/tester/confeventpackage_tester.cpp b/tester/confeventpackage_tester.cpp index 64d43468e..a0753694d 100644 --- a/tester/confeventpackage_tester.cpp +++ b/tester/confeventpackage_tester.cpp @@ -663,8 +663,8 @@ void send_first_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); @@ -695,8 +695,8 @@ void send_added_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); @@ -737,8 +737,8 @@ void send_removed_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); @@ -776,8 +776,8 @@ void send_admined_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); @@ -816,8 +816,8 @@ void send_unadmined_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); From 3e3991acc2dd36b9849e360f1b51f785f0203e40 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 7 Aug 2017 12:02:33 +0200 Subject: [PATCH 09/17] remove useless variable --- tester/confeventpackage_tester.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/tester/confeventpackage_tester.cpp b/tester/confeventpackage_tester.cpp index a0753694d..82d8adc3a 100644 --- a/tester/confeventpackage_tester.cpp +++ b/tester/confeventpackage_tester.cpp @@ -691,7 +691,6 @@ void send_added_notify(void) { LinphoneAddress *frankAddr = linphone_core_interpret_url(marie->lc, frankUri); Conference::Participant p1(bobAddr, false); Conference::Participant p2(aliceAddr, true); - Conference::Participant p3(frankAddr, false); LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; @@ -772,7 +771,6 @@ void send_admined_notify(void) { LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); Conference::Participant p1(bobAddr, false); Conference::Participant p2(aliceAddr, true); - Conference::Participant p3(bobAddr, true); LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; @@ -812,7 +810,6 @@ void send_unadmined_notify(void) { LinphoneAddress *aliceAddr = linphone_core_interpret_url(marie->lc, aliceUri); Conference::Participant p1(bobAddr, false); Conference::Participant p2(aliceAddr, true); - Conference::Participant p3(aliceAddr, false); LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; From 6a90b6371e576be2e480d2b460a0b62f63bf4606 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Thu, 10 Aug 2017 14:21:20 +0200 Subject: [PATCH 10/17] merge master --- CMakeLists.txt | 1 + coreapi/CMakeLists.txt | 41 +++------- coreapi/misc.c | 1 + coreapi/private.h | 21 ----- include/linphone/content.h | 22 ++++++ include/sal/sal.h | 6 +- src/CMakeLists.txt | 79 +++++++++++++++++++ .../local-conference-event-handler.cpp | 1 + .../remote-conference-event-handler.cpp | 1 + src/cpim/header/cpim-core-headers.h | 6 +- src/cpim/header/cpim-generic-header.cpp | 4 +- src/cpim/header/cpim-generic-header.h | 2 +- src/cpim/header/cpim-header-p.h | 1 + src/cpim/header/cpim-header.h | 2 +- src/cpim/message/cpim-message.cpp | 1 + src/cpim/message/cpim-message.h | 2 +- src/cpim/parser/cpim-parser.cpp | 1 + src/object/object-p.h | 41 ++++++++++ src/object/object.cpp | 33 ++++++++ src/object/object.h | 23 +----- src/object/singleton.h | 10 ++- src/utils/general.h | 18 +++++ tester/message_tester.c | 4 +- 23 files changed, 236 insertions(+), 85 deletions(-) create mode 100644 src/CMakeLists.txt create mode 100644 src/object/object-p.h create mode 100644 src/object/object.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d0ff54e5..17b86bbaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,6 +330,7 @@ endif() add_subdirectory(include) add_subdirectory(java) +add_subdirectory(src) add_subdirectory(coreapi) add_subdirectory(share) if(ENABLE_CONSOLE_UI) diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index 06d84215d..905a521d9 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -33,24 +33,7 @@ if(ANDROID) find_package(Support REQUIRED) endif() - -set(LINPHONE_PRIVATE_HEADER_FILES - ../src/conference/conference-info.hxx - ../src/conference/conference-listener.h - ../src/conference/local-conference-event-handler.h - ../src/conference/remote-conference-event-handler.h - ../src/cpim/cpim.h - ../src/cpim/header/cpim-core-headers.h - ../src/cpim/header/cpim-generic-header.h - ../src/cpim/header/cpim-header-p.h - ../src/cpim/header/cpim-header.h - ../src/cpim/message/cpim-message.h - ../src/cpim/parser/cpim-grammar.h - ../src/cpim/parser/cpim-parser.h - ../src/object/object.h - ../src/object/singleton.h - ../src/utils/general.h - ../src/utils/utils.h +list(APPEND LINPHONE_PRIVATE_HEADER_FILES bellesip_sal/sal_impl.h carddav.h conference_private.h @@ -137,18 +120,8 @@ set(LINPHONE_SOURCE_FILES_C ) set(LINPHONE_SOURCE_FILES_CXX conference.cc - ../src/conference/conference-info.cxx - ../src/conference/local-conference-event-handler.cpp - ../src/conference/remote-conference-event-handler.cpp - ../src/cpim/header/cpim-core-headers.cpp - ../src/cpim/header/cpim-generic-header.cpp - ../src/cpim/header/cpim-header.cpp - ../src/cpim/message/cpim-message.cpp - ../src/cpim/parser/cpim-grammar.cpp - ../src/cpim/parser/cpim-parser.cpp - ../src/utils/utils.cpp ) -set(LINPHONE_INCLUDE_DIRS ${LINPHONE_INCLUDE_DIRS} /Users/reisbenjamin/xsd-4.0.0-i686-macosx/libxsd /usr/local/Cellar/xerces-c/3.1.4/include) +set(LINPHONE_INCLUDE_DIRS ${LINPHONE_INCLUDE_DIRS}) if(ANDROID) list(APPEND LINPHONE_SOURCE_FILES_CXX linphonecore_jni.cc) set_source_files_properties(linphonecore_jni.cc PROPERTIES COMPILE_DEFINITIONS "USE_JAVAH") @@ -233,7 +206,10 @@ bc_apply_compile_flags(LINPHONE_SOURCE_FILES_CXX STRICT_OPTIONS_CPP STRICT_OPTIO bc_apply_compile_flags(LINPHONE_SOURCE_FILES_OBJC STRICT_OPTIONS_CPP STRICT_OPTIONS_OBJC) if(ENABLE_STATIC) - add_library(linphone-static STATIC ${LINPHONE_HEADER_FILES} ${LINPHONE_PRIVATE_HEADER_FILES} ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC}) + add_library(linphone-static STATIC ${LINPHONE_HEADER_FILES} ${LINPHONE_PRIVATE_HEADER_FILES} + ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC} + $ + ) set_target_properties(linphone-static PROPERTIES OUTPUT_NAME linphone) add_dependencies(linphone-static liblinphone-git-version) target_include_directories(linphone-static PUBLIC ${LINPHONE_INCLUDE_DIRS}) @@ -250,7 +226,10 @@ if(ENABLE_STATIC) ) endif() if(ENABLE_SHARED) - add_library(linphone SHARED ${LINPHONE_HEADER_FILES} ${LINPHONE_PRIVATE_HEADER_FILES} ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC}) + add_library(linphone SHARED ${LINPHONE_HEADER_FILES} ${LINPHONE_PRIVATE_HEADER_FILES} + ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC} + $ + ) if(IOS) if(IOS) set(MIN_OS ${LINPHONE_IOS_DEPLOYMENT_TARGET}) diff --git a/coreapi/misc.c b/coreapi/misc.c index 6d0f4819f..fe10698aa 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -579,6 +579,7 @@ static const struct addrinfo * find_nat64_addrinfo(const struct addrinfo *ai) { static const struct addrinfo * find_ipv4_addrinfo(const struct addrinfo *ai) { while (ai != NULL) { if (ai->ai_family == AF_INET) break; + if (ai->ai_family == AF_INET6 && ai->ai_flags & AI_V4MAPPED) break; ai = ai->ai_next; } return ai; diff --git a/coreapi/private.h b/coreapi/private.h index a43cb2713..83d1d14c2 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -1946,27 +1946,6 @@ SalStreamDir sal_dir_from_call_params_dir(LinphoneMediaDirection cpdir); /***************************************************************************** * LINPHONE CONTENT PRIVATE ACCESSORS * ****************************************************************************/ -/** - * Get the key associated with a RCS file transfer message if encrypted - * @param[in] content LinphoneContent object. - * @return The key to encrypt/decrypt the file associated to this content. - */ -LINPHONE_PUBLIC const char *linphone_content_get_key(const LinphoneContent *content); - -/** - * Get the size of key associated with a RCS file transfer message if encrypted - * @param[in] content LinphoneContent object. - * @return The key size in bytes - */ -size_t linphone_content_get_key_size(const LinphoneContent *content); - -/** - * Set the key associated with a RCS file transfer message if encrypted - * @param[in] content LinphoneContent object. - * @param[in] key The key to be used to encrypt/decrypt file associated to this content. - * @param[in] keyLength The lengh of the key. - */ -void linphone_content_set_key(LinphoneContent *content, const char *key, const size_t keyLength); /** * Get the address of the crypto context associated with a RCS file transfer message if encrypted diff --git a/include/linphone/content.h b/include/linphone/content.h index c91a15559..653d4344a 100644 --- a/include/linphone/content.h +++ b/include/linphone/content.h @@ -192,6 +192,28 @@ LINPHONE_PUBLIC LinphoneContent * linphone_content_find_part_by_header(const Lin */ LINPHONE_PUBLIC const char * linphone_content_get_custom_header(const LinphoneContent *content, const char *header_name); +/** + * Get the key associated with a RCS file transfer message if encrypted + * @param[in] content LinphoneContent object. + * @return The key to encrypt/decrypt the file associated to this content. + */ +LINPHONE_PUBLIC const char *linphone_content_get_key(const LinphoneContent *content); + +/** + * Get the size of key associated with a RCS file transfer message if encrypted + * @param[in] content LinphoneContent object. + * @return The key size in bytes + */ +LINPHONE_PUBLIC size_t linphone_content_get_key_size(const LinphoneContent *content); + +/** + * Set the key associated with a RCS file transfer message if encrypted + * @param[in] content LinphoneContent object. + * @param[in] key The key to be used to encrypt/decrypt file associated to this content. + * @param[in] keyLength The lengh of the key. + */ +LINPHONE_PUBLIC void linphone_content_set_key(LinphoneContent *content, const char *key, const size_t keyLength); + /** * @} */ diff --git a/include/sal/sal.h b/include/sal/sal.h index 4a566e157..f41c09336 100644 --- a/include/sal/sal.h +++ b/include/sal/sal.h @@ -346,7 +346,7 @@ int sal_media_description_get_nb_active_streams(const SalMediaDescription *md); struct SalOpBase; typedef void (*SalOpReleaseCb)(struct SalOpBase *op); - + /*this structure must be at the first byte of the SalOp structure defined by implementors*/ typedef struct SalOpBase{ Sal *root; @@ -658,7 +658,7 @@ void sal_verify_server_certificates(Sal *ctx, bool_t verify); void sal_verify_server_cn(Sal *ctx, bool_t verify); void sal_set_ssl_config(Sal *ctx, void *ssl_config); LINPHONE_PUBLIC void sal_set_uuid(Sal*ctx, const char *uuid); -int sal_create_uuid(Sal*ctx, char *uuid, size_t len); +LINPHONE_PUBLIC int sal_create_uuid(Sal*ctx, char *uuid, size_t len); int sal_generate_uuid(char *uuid, size_t len); LINPHONE_PUBLIC void sal_enable_test_features(Sal*ctx, bool_t enabled); void sal_use_no_initial_route(Sal *ctx, bool_t enabled); @@ -963,5 +963,3 @@ int sal_get_http_proxy_port(const Sal *sal); #endif #endif - - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..f86e48ea2 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,79 @@ +############################################################################ +# CMakeLists.txt +# Copyright (C) 2017 Belledonne Communications, Grenoble France +# +############################################################################ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +############################################################################ + +set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES + conference/conference-info.hxx + conference/conference-listener.h + conference/local-conference-event-handler.h + conference/remote-conference-event-handler.h + cpim/cpim.h + cpim/header/cpim-core-headers.h + cpim/header/cpim-generic-header.h + cpim/header/cpim-header-p.h + cpim/header/cpim-header.h + cpim/message/cpim-message.h + cpim/parser/cpim-grammar.h + cpim/parser/cpim-parser.h + object/object.h + object/object-p.h + object/singleton.h + utils/general.h + utils/utils.h +) + +set(LINPHONE_CXX_OBJECTS_SOURCE_FILES + conference/conference-info.cxx + conference/local-conference-event-handler.cpp + conference/remote-conference-event-handler.cpp + cpim/header/cpim-core-headers.cpp + cpim/header/cpim-generic-header.cpp + cpim/header/cpim-header.cpp + cpim/message/cpim-message.cpp + cpim/parser/cpim-grammar.cpp + cpim/parser/cpim-parser.cpp + object/object.cpp + utils/utils.cpp +) + +set(LINPHONE_CXX_OBJECTS_DEFINITIONS "-DLIBLINPHONE_EXPORTS") +set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS} /Users/reisbenjamin/xsd-4.0.0-i686-macosx/libxsd /usr/local/Cellar/xerces-c/3.1.4/include) + +set(LINPHONE_PRIVATE_HEADER_FILES) +foreach(header ${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES}) + list(APPEND LINPHONE_PRIVATE_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${header}") +endforeach() +set(LINPHONE_PRIVATE_HEADER_FILES ${LINPHONE_PRIVATE_HEADER_FILES} PARENT_SCOPE) + +bc_apply_compile_flags(LINPHONE_CXX_OBJECTS_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX) + +if(ENABLE_STATIC) + add_library(linphone-cxx-objects-static OBJECT ${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES}) + target_compile_definitions(linphone-cxx-objects-static PRIVATE ${LINPHONE_CXX_OBJECTS_DEFINITIONS}) + target_include_directories(linphone-cxx-objects-static PRIVATE ${LINPHONE_CXX_OBJECTS_INCLUDE_DIRS} ${LINPHONE_INCLUDE_DIRS}) +endif() + +if(ENABLE_SHARED) + add_library(linphone-cxx-objects OBJECT ${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES}) + target_compile_definitions(linphone-cxx-objects PRIVATE ${LINPHONE_CXX_OBJECTS_DEFINITIONS}) + target_include_directories(linphone-cxx-objects PRIVATE ${LINPHONE_CXX_OBJECTS_INCLUDE_DIRS} ${LINPHONE_INCLUDE_DIRS}) + target_compile_options(linphone-cxx-objects PRIVATE "-fPIC") +endif() diff --git a/src/conference/local-conference-event-handler.cpp b/src/conference/local-conference-event-handler.cpp index 3bde61970..09ff726fe 100644 --- a/src/conference/local-conference-event-handler.cpp +++ b/src/conference/local-conference-event-handler.cpp @@ -19,6 +19,7 @@ #include "local-conference-event-handler.h" #include "conference-info.hxx" #include "private.h" +#include "object/object-p.h" using namespace std; using namespace conference_info; diff --git a/src/conference/remote-conference-event-handler.cpp b/src/conference/remote-conference-event-handler.cpp index 08ed76c36..71eb39026 100644 --- a/src/conference/remote-conference-event-handler.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -19,6 +19,7 @@ #include "remote-conference-event-handler.h" #include "conference-info.hxx" #include "private.h" +#include "object/object-p.h" using namespace std; using namespace conference_info; diff --git a/src/cpim/header/cpim-core-headers.h b/src/cpim/header/cpim-core-headers.h index 965904908..3ff1deecd 100644 --- a/src/cpim/header/cpim-core-headers.h +++ b/src/cpim/header/cpim-core-headers.h @@ -24,7 +24,7 @@ // ============================================================================= #define MAKE_CORE_HEADER(CLASS_PREFIX, NAME) \ - class CLASS_PREFIX ## Header : public CoreHeader { \ + class LINPHONE_PUBLIC CLASS_PREFIX ## Header : public CoreHeader { \ public: \ CLASS_PREFIX ## Header() = default; \ inline std::string getName() const override { \ @@ -43,7 +43,7 @@ namespace LinphonePrivate { // Generic core header. // ------------------------------------------------------------------------- - class CoreHeader : public Header { + class LINPHONE_PUBLIC CoreHeader : public Header { friend class HeaderNode; public: @@ -79,7 +79,7 @@ namespace LinphonePrivate { class SubjectHeaderPrivate; - class SubjectHeader : public CoreHeader { + class LINPHONE_PUBLIC SubjectHeader : public CoreHeader { friend class HeaderNode; public: diff --git a/src/cpim/header/cpim-generic-header.cpp b/src/cpim/header/cpim-generic-header.cpp index 178cfbb27..6c043c55d 100644 --- a/src/cpim/header/cpim-generic-header.cpp +++ b/src/cpim/header/cpim-generic-header.cpp @@ -32,8 +32,10 @@ using namespace LinphonePrivate; class Cpim::GenericHeaderPrivate : public HeaderPrivate { public: + GenericHeaderPrivate () : parameters(make_shared > >()) {} + string name; - shared_ptr > > parameters = make_shared > >(); + shared_ptr > > parameters; }; Cpim::GenericHeader::GenericHeader () : Header(*new GenericHeaderPrivate) {} diff --git a/src/cpim/header/cpim-generic-header.h b/src/cpim/header/cpim-generic-header.h index fb1a198cf..94ced0e44 100644 --- a/src/cpim/header/cpim-generic-header.h +++ b/src/cpim/header/cpim-generic-header.h @@ -31,7 +31,7 @@ namespace LinphonePrivate { class GenericHeaderPrivate; class HeaderNode; - class GenericHeader : public Header { + class LINPHONE_PUBLIC GenericHeader : public Header { friend class HeaderNode; public: diff --git a/src/cpim/header/cpim-header-p.h b/src/cpim/header/cpim-header-p.h index 2e3208dd4..446e98647 100644 --- a/src/cpim/header/cpim-header-p.h +++ b/src/cpim/header/cpim-header-p.h @@ -20,6 +20,7 @@ #define _CPIM_HEADER_P_H_ #include "cpim-header.h" +#include "object/object-p.h" // ============================================================================= diff --git a/src/cpim/header/cpim-header.h b/src/cpim/header/cpim-header.h index 3dbcb2fbe..1839d3afa 100644 --- a/src/cpim/header/cpim-header.h +++ b/src/cpim/header/cpim-header.h @@ -29,7 +29,7 @@ namespace LinphonePrivate { namespace Cpim { class HeaderPrivate; - class Header : public Object { + class LINPHONE_PUBLIC Header : public Object { public: virtual ~Header () = default; diff --git a/src/cpim/message/cpim-message.cpp b/src/cpim/message/cpim-message.cpp index af1e06209..7eab6fea0 100644 --- a/src/cpim/message/cpim-message.cpp +++ b/src/cpim/message/cpim-message.cpp @@ -19,6 +19,7 @@ #include #include "cpim/parser/cpim-parser.h" +#include "object/object-p.h" #include "utils/utils.h" #include "cpim-message.h" diff --git a/src/cpim/message/cpim-message.h b/src/cpim/message/cpim-message.h index 2620fe336..fe8d0d03f 100644 --- a/src/cpim/message/cpim-message.h +++ b/src/cpim/message/cpim-message.h @@ -28,7 +28,7 @@ namespace LinphonePrivate { namespace Cpim { class MessagePrivate; - class Message : public Object { + class LINPHONE_PUBLIC Message : public Object { public: Message (); diff --git a/src/cpim/parser/cpim-parser.cpp b/src/cpim/parser/cpim-parser.cpp index 8d2a88e97..8c637fcb4 100644 --- a/src/cpim/parser/cpim-parser.cpp +++ b/src/cpim/parser/cpim-parser.cpp @@ -24,6 +24,7 @@ #include "linphone/core.h" #include "cpim-grammar.h" +#include "object/object-p.h" #include "utils/utils.h" #include "cpim-parser.h" diff --git a/src/object/object-p.h b/src/object/object-p.h new file mode 100644 index 000000000..f08a6b968 --- /dev/null +++ b/src/object/object-p.h @@ -0,0 +1,41 @@ +/* + * object-p.h + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _OBJECT_P_H_ +#define _OBJECT_P_H_ + +#include "utils/general.h" + +// ============================================================================= + +namespace LinphonePrivate { + class Object; + + class ObjectPrivate { + public: + virtual ~ObjectPrivate () = default; + + protected: + Object *mPublic = nullptr; + + private: + L_DECLARE_PUBLIC(Object); + }; +} + +#endif // ifndef _OBJECT_P_H_ diff --git a/src/object/object.cpp b/src/object/object.cpp new file mode 100644 index 000000000..a4c0a5a34 --- /dev/null +++ b/src/object/object.cpp @@ -0,0 +1,33 @@ +/* + * object.cpp + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "object-p.h" + +#include "object.h" + +using namespace LinphonePrivate; + +// ============================================================================= + +Object::~Object () { + delete mPrivate; +} + +Object::Object (ObjectPrivate &p) : mPrivate(&p) { + mPrivate->mPublic = this; +} diff --git a/src/object/object.h b/src/object/object.h index 76ae2d67f..5756bcc8e 100644 --- a/src/object/object.h +++ b/src/object/object.h @@ -24,29 +24,14 @@ // ============================================================================= namespace LinphonePrivate { - class Object; + class ObjectPrivate; - class ObjectPrivate { + class LINPHONE_PUBLIC Object { public: - virtual ~ObjectPrivate () = default; + virtual ~Object (); protected: - Object *mPublic = nullptr; - - private: - L_DECLARE_PUBLIC(Object); - }; - - class Object { - public: - virtual ~Object () { - delete mPrivate; - } - - protected: - explicit Object (ObjectPrivate &p) : mPrivate(&p) { - mPrivate->mPublic = this; - } + explicit Object (ObjectPrivate &p); ObjectPrivate *mPrivate = nullptr; diff --git a/src/object/singleton.h b/src/object/singleton.h index 6acad3c6d..16e16d471 100644 --- a/src/object/singleton.h +++ b/src/object/singleton.h @@ -30,8 +30,10 @@ namespace LinphonePrivate { virtual ~Singleton () = default; static T *getInstance () { - if (!mInstance) + if (!mInstance) { mInstance = new T(); + static SingletonDeleter deleter; + } return mInstance; } @@ -39,6 +41,12 @@ namespace LinphonePrivate { explicit Singleton (ObjectPrivate &p) : Object(p) {} private: + struct SingletonDeleter { + ~SingletonDeleter () { + delete mInstance; + } + }; + static T *mInstance; L_DISABLE_COPY(Singleton); diff --git a/src/utils/general.h b/src/utils/general.h index 0fc5afe6f..e0a8ed7f6 100644 --- a/src/utils/general.h +++ b/src/utils/general.h @@ -21,6 +21,24 @@ #ifndef _GENERAL_H_ #define _GENERAL_H_ +#ifndef LINPHONE_PUBLIC + #if defined(_MSC_VER) + #ifdef LINPHONE_STATIC + #define LINPHONE_PUBLIC + #else + #ifdef LINPHONE_EXPORTS + #define LINPHONE_PUBLIC __declspec(dllexport) + #else + #define LINPHONE_PUBLIC __declspec(dllimport) + #endif + #endif + #else + #define LINPHONE_PUBLIC + #endif +#endif + +// ----------------------------------------------------------------------------- + #define L_DECLARE_PRIVATE(CLASS) \ inline CLASS ## Private * getPrivate() { \ return reinterpret_cast(mPrivate); \ diff --git a/tester/message_tester.c b/tester/message_tester.c index c7a7156cb..cff9645fc 100644 --- a/tester/message_tester.c +++ b/tester/message_tester.c @@ -2492,12 +2492,12 @@ test_t message_tests[] = { }; static int message_tester_before_suite(void) { - liblinphone_tester_keep_uuid = TRUE; + //liblinphone_tester_keep_uuid = TRUE; return 0; } static int message_tester_after_suite(void) { - liblinphone_tester_keep_uuid = FALSE; + //liblinphone_tester_keep_uuid = FALSE; return 0; } From e1fb16defa3fe905ae5d3f5dbfaf90aa6eaaa7c8 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 14 Aug 2017 15:42:03 +0200 Subject: [PATCH 11/17] rearrange files --- .../local-conference-event-handler.cpp | 2 +- .../remote-conference-event-handler.cpp | 2 +- src/{conference => xml}/conference-info.cxx | 0 src/{conference => xml}/conference-info.hxx | 6 +- src/{conference => xml}/conference-info.xsd | 0 src/xml/xml.cxx | 451 ++++++++++++++++++ src/{conference => xml}/xml.hxx | 6 +- src/xml/xml.xsd | 287 +++++++++++ 8 files changed, 746 insertions(+), 8 deletions(-) rename src/{conference => xml}/conference-info.cxx (100%) rename src/{conference => xml}/conference-info.hxx (99%) rename src/{conference => xml}/conference-info.xsd (100%) create mode 100644 src/xml/xml.cxx rename src/{conference => xml}/xml.hxx (97%) create mode 100644 src/xml/xml.xsd diff --git a/src/conference/local-conference-event-handler.cpp b/src/conference/local-conference-event-handler.cpp index 09ff726fe..7b49d5b7b 100644 --- a/src/conference/local-conference-event-handler.cpp +++ b/src/conference/local-conference-event-handler.cpp @@ -17,7 +17,7 @@ */ #include "local-conference-event-handler.h" -#include "conference-info.hxx" +#include "xml/conference-info.hxx" #include "private.h" #include "object/object-p.h" diff --git a/src/conference/remote-conference-event-handler.cpp b/src/conference/remote-conference-event-handler.cpp index 71eb39026..4aa8561be 100644 --- a/src/conference/remote-conference-event-handler.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -17,7 +17,7 @@ */ #include "remote-conference-event-handler.h" -#include "conference-info.hxx" +#include "xml/conference-info.hxx" #include "private.h" #include "object/object-p.h" diff --git a/src/conference/conference-info.cxx b/src/xml/conference-info.cxx similarity index 100% rename from src/conference/conference-info.cxx rename to src/xml/conference-info.cxx diff --git a/src/conference/conference-info.hxx b/src/xml/conference-info.hxx similarity index 99% rename from src/conference/conference-info.hxx rename to src/xml/conference-info.hxx index 45404038b..70cdb386e 100644 --- a/src/conference/conference-info.hxx +++ b/src/xml/conference-info.hxx @@ -31,8 +31,8 @@ // in the accompanying FLOSSE file. // -#ifndef CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_SRC_XML_CONFERENCE_INFO_HXX -#define CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_SRC_XML_CONFERENCE_INFO_HXX +#ifndef CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_CONFERENCE_INFO_HXX +#define CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_CONFERENCE_INFO_HXX #ifndef XSD_CXX11 #define XSD_CXX11 @@ -3859,4 +3859,4 @@ namespace conference_info // // End epilogue. -#endif // CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_SRC_XML_CONFERENCE_INFO_HXX +#endif // CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_CONFERENCE_INFO_HXX diff --git a/src/conference/conference-info.xsd b/src/xml/conference-info.xsd similarity index 100% rename from src/conference/conference-info.xsd rename to src/xml/conference-info.xsd diff --git a/src/xml/xml.cxx b/src/xml/xml.cxx new file mode 100644 index 000000000..be2199c9d --- /dev/null +++ b/src/xml/xml.cxx @@ -0,0 +1,451 @@ +// Copyright (c) 2005-2014 Code Synthesis Tools CC +// +// This program was generated by CodeSynthesis XSD, an XML Schema to +// C++ data binding compiler. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// In addition, as a special exception, Code Synthesis Tools CC gives +// permission to link this program with the Xerces-C++ library (or with +// modified versions of Xerces-C++ that use the same license as Xerces-C++), +// and distribute linked combinations including the two. You must obey +// the GNU General Public License version 2 in all respects for all of +// the code used other than Xerces-C++. If you modify this copy of the +// program, you may extend this exception to your version of the program, +// but you are not obligated to do so. If you do not wish to do so, delete +// this exception statement from your version. +// +// Furthermore, Code Synthesis Tools CC makes a special exception for +// the Free/Libre and Open Source Software (FLOSS) which is described +// in the accompanying FLOSSE file. +// + +// Begin prologue. +// +// +// End prologue. + +#include + +#include "xml.hxx" + +namespace namespace_ +{ + // Lang + // + + Lang:: + Lang (const char* s) + : ::xml_schema::String (s) + { + } + + Lang:: + Lang (const ::std::string& s) + : ::xml_schema::String (s) + { + } + + Lang:: + Lang (const Lang& o, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (o, f, c) + { + } + + // Space + // + + Space:: + Space (Value v) + : ::xml_schema::Ncname (_xsd_Space_literals_[v]) + { + } + + Space:: + Space (const char* v) + : ::xml_schema::Ncname (v) + { + } + + Space:: + Space (const ::std::string& v) + : ::xml_schema::Ncname (v) + { + } + + Space:: + Space (const ::xml_schema::Ncname& v) + : ::xml_schema::Ncname (v) + { + } + + Space:: + Space (const Space& v, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Ncname (v, f, c) + { + } + + Space& Space:: + operator= (Value v) + { + static_cast< ::xml_schema::Ncname& > (*this) = + ::xml_schema::Ncname (_xsd_Space_literals_[v]); + + return *this; + } + + + // Lang_member + // + + Lang_member:: + Lang_member (Value v) + : ::xml_schema::String (_xsd_Lang_member_literals_[v]) + { + } + + Lang_member:: + Lang_member (const char* v) + : ::xml_schema::String (v) + { + } + + Lang_member:: + Lang_member (const ::std::string& v) + : ::xml_schema::String (v) + { + } + + Lang_member:: + Lang_member (const ::xml_schema::String& v) + : ::xml_schema::String (v) + { + } + + Lang_member:: + Lang_member (const Lang_member& v, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (v, f, c) + { + } + + Lang_member& Lang_member:: + operator= (Value v) + { + static_cast< ::xml_schema::String& > (*this) = + ::xml_schema::String (_xsd_Lang_member_literals_[v]); + + return *this; + } +} + +#include + +#include + +namespace namespace_ +{ + // Lang + // + + Lang:: + Lang (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (e, f, c) + { + } + + Lang:: + Lang (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (a, f, c) + { + } + + Lang:: + Lang (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (s, e, f, c) + { + } + + Lang* Lang:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Lang (*this, f, c); + } + + // Space + // + + Space:: + Space (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Ncname (e, f, c) + { + _xsd_Space_convert (); + } + + Space:: + Space (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Ncname (a, f, c) + { + _xsd_Space_convert (); + } + + Space:: + Space (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Ncname (s, e, f, c) + { + _xsd_Space_convert (); + } + + Space* Space:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Space (*this, f, c); + } + + Space::Value Space:: + _xsd_Space_convert () const + { + ::xsd::cxx::tree::enum_comparator< char > c (_xsd_Space_literals_); + const Value* i (::std::lower_bound ( + _xsd_Space_indexes_, + _xsd_Space_indexes_ + 2, + *this, + c)); + + if (i == _xsd_Space_indexes_ + 2 || _xsd_Space_literals_[*i] != *this) + { + throw ::xsd::cxx::tree::unexpected_enumerator < char > (*this); + } + + return *i; + } + + const char* const Space:: + _xsd_Space_literals_[2] = + { + "default", + "preserve" + }; + + const Space::Value Space:: + _xsd_Space_indexes_[2] = + { + ::namespace_::Space::default_, + ::namespace_::Space::preserve + }; + + // Lang_member + // + + Lang_member:: + Lang_member (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (e, f, c) + { + _xsd_Lang_member_convert (); + } + + Lang_member:: + Lang_member (const ::xercesc::DOMAttr& a, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (a, f, c) + { + _xsd_Lang_member_convert (); + } + + Lang_member:: + Lang_member (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (s, e, f, c) + { + _xsd_Lang_member_convert (); + } + + Lang_member* Lang_member:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Lang_member (*this, f, c); + } + + Lang_member::Value Lang_member:: + _xsd_Lang_member_convert () const + { + ::xsd::cxx::tree::enum_comparator< char > c (_xsd_Lang_member_literals_); + const Value* i (::std::lower_bound ( + _xsd_Lang_member_indexes_, + _xsd_Lang_member_indexes_ + 1, + *this, + c)); + + if (i == _xsd_Lang_member_indexes_ + 1 || _xsd_Lang_member_literals_[*i] != *this) + { + throw ::xsd::cxx::tree::unexpected_enumerator < char > (*this); + } + + return *i; + } + + const char* const Lang_member:: + _xsd_Lang_member_literals_[1] = + { + "" + }; + + const Lang_member::Value Lang_member:: + _xsd_Lang_member_indexes_[1] = + { + ::namespace_::Lang_member::empty + }; +} + +#include + +namespace namespace_ +{ + ::std::ostream& + operator<< (::std::ostream& o, const Lang& i) + { + return o << static_cast< const ::xml_schema::String& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, Space::Value i) + { + return o << Space::_xsd_Space_literals_[i]; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Space& i) + { + return o << static_cast< const ::xml_schema::Ncname& > (i); + } + + ::std::ostream& + operator<< (::std::ostream& o, Lang_member::Value i) + { + return o << Lang_member::_xsd_Lang_member_literals_[i]; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Lang_member& i) + { + return o << static_cast< const ::xml_schema::String& > (i); + } +} + +#include +#include +#include + +namespace namespace_ +{ +} + +#include +#include +#include + +namespace namespace_ +{ + void + operator<< (::xercesc::DOMElement& e, const Lang& i) + { + e << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const Lang& i) + { + a << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const Lang& i) + { + l << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Space& i) + { + e << static_cast< const ::xml_schema::Ncname& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const Space& i) + { + a << static_cast< const ::xml_schema::Ncname& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const Space& i) + { + l << static_cast< const ::xml_schema::Ncname& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Lang_member& i) + { + e << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const Lang_member& i) + { + a << static_cast< const ::xml_schema::String& > (i); + } + + void + operator<< (::xml_schema::ListStream& l, + const Lang_member& i) + { + l << static_cast< const ::xml_schema::String& > (i); + } +} + +#include + +// Begin epilogue. +// +// +// End epilogue. + diff --git a/src/conference/xml.hxx b/src/xml/xml.hxx similarity index 97% rename from src/conference/xml.hxx rename to src/xml/xml.hxx index 52de06acf..d63650f40 100644 --- a/src/conference/xml.hxx +++ b/src/xml/xml.hxx @@ -31,8 +31,8 @@ // in the accompanying FLOSSE file. // -#ifndef CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_PRIVATE_SRC_XML_XML_HXX -#define CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_PRIVATE_SRC_XML_XML_HXX +#ifndef CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_XML_HXX +#define CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_XML_HXX #ifndef XSD_CXX11 #define XSD_CXX11 @@ -500,4 +500,4 @@ namespace namespace_ // // End epilogue. -#endif // CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_FLEXISIP_PRIVATE_SRC_XML_XML_HXX +#endif // CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_XML_HXX diff --git a/src/xml/xml.xsd b/src/xml/xml.xsd new file mode 100644 index 000000000..aea7d0db0 --- /dev/null +++ b/src/xml/xml.xsd @@ -0,0 +1,287 @@ + + + + + + +
+

About the XML namespace

+ +
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

+

+ Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + + +
+ +

lang (as an attribute name)

+

+ denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

+ +
+
+

Notes

+

+ Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

+

+ See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + + +
+ +

space (as an attribute name)

+

+ denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

+ +
+
+
+ + + + + + +
+ + + +
+ +

base (as an attribute name)

+

+ denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

+ +

+ See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

+
+
+
+
+ + + + +
+ +

id (as an attribute name)

+

+ denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

+ +

+ See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

+
+
+
+
+ + + + + + + + + + +
+ +

Father (in any context at all)

+ +
+

+ denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

+
+

+ In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

+
+
+
+
+
+ + + +
+

About this schema document

+ +
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+          <schema . . .>
+           . . .
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+     
+

+ or +

+
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+     
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+          <type . . .>
+           . . .
+           <attributeGroup ref="xml:specialAttrs"/>
+     
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + + +
+

Versioning policy for this schema document

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + http://www.w3.org/2009/01/xml.xsd. +

+

+ At the date of issue it can also be found at + + http://www.w3.org/2001/xml.xsd. +

+

+ The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + http://www.w3.org/2001/xml.xsd + + will change accordingly; the version at + + http://www.w3.org/2009/01/xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+ +
+ From c681332e72b3a10a2ee1baa0fbd66acbedd524be Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 14 Aug 2017 15:41:59 +0200 Subject: [PATCH 12/17] Correctly locate libxsd. --- CMakeLists.txt | 1 + coreapi/CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- src/conference/local-conference-event-handler.h | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17b86bbaa..2625c0acd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,7 @@ else() find_package(Belr REQUIRED) endif() find_package(XML2 REQUIRED) +find_package(LibXsd REQUIRED) find_package(Zlib) if(ENABLE_TUNNEL) if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS) diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index 905a521d9..8d926a907 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -158,7 +158,7 @@ set(LIBS ${ORTP_LIBRARIES} ${XML2_LIBRARIES} ${BELR_LIBRARIES} - /usr/local/Cellar/xerces-c/3.1.4/lib/libxerces-c.dylib + ${LIBXSD_LIBRARIES} ) if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") list(APPEND LIBS "Ws2_32") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f86e48ea2..8ed54e447 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -55,7 +55,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES ) set(LINPHONE_CXX_OBJECTS_DEFINITIONS "-DLIBLINPHONE_EXPORTS") -set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS} /Users/reisbenjamin/xsd-4.0.0-i686-macosx/libxsd /usr/local/Cellar/xerces-c/3.1.4/include) +set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS} ${LIBXSD_INCLUDE_DIRS}) set(LINPHONE_PRIVATE_HEADER_FILES) foreach(header ${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES}) diff --git a/src/conference/local-conference-event-handler.h b/src/conference/local-conference-event-handler.h index 4dd08d1e5..7a803ba84 100644 --- a/src/conference/local-conference-event-handler.h +++ b/src/conference/local-conference-event-handler.h @@ -20,6 +20,7 @@ #define _LOCAL_CONFERENCE_EVENT_HANDLER_H_ #include +#include #include #include @@ -122,4 +123,4 @@ const LinphoneAddress* LinphonePrivate::Conference::Participant::getAddress() co return mAddr; } -#endif // ifndef _LOCAL_CONFERENCE_EVENT_HANDLER_H_ \ No newline at end of file +#endif // ifndef _LOCAL_CONFERENCE_EVENT_HANDLER_H_ From 8c54a0e85d9abdafd82795a0459a54f14e7eb2d6 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 14 Aug 2017 16:49:00 +0200 Subject: [PATCH 13/17] Fix naming of files generated by xsd. --- src/CMakeLists.txt | 9 +++++++-- src/conference/local-conference-event-handler.cpp | 2 +- src/conference/remote-conference-event-handler.cpp | 2 +- src/xml/{conference-info.cxx => conference-info.cpp} | 2 +- src/xml/{conference-info.hxx => conference-info.h} | 8 ++++---- src/xml/{xml.cxx => xml.cpp} | 2 +- src/xml/{xml.hxx => xml.h} | 6 +++--- 7 files changed, 18 insertions(+), 13 deletions(-) rename src/xml/{conference-info.cxx => conference-info.cpp} (99%) rename src/xml/{conference-info.hxx => conference-info.h} (99%) rename src/xml/{xml.cxx => xml.cpp} (99%) rename src/xml/{xml.hxx => xml.h} (97%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8ed54e447..dc8c3dc3f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,7 +21,6 @@ ############################################################################ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES - conference/conference-info.hxx conference/conference-listener.h conference/local-conference-event-handler.h conference/remote-conference-event-handler.h @@ -38,10 +37,11 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES object/singleton.h utils/general.h utils/utils.h + xml/conference-info.h + xml/xml.h ) set(LINPHONE_CXX_OBJECTS_SOURCE_FILES - conference/conference-info.cxx conference/local-conference-event-handler.cpp conference/remote-conference-event-handler.cpp cpim/header/cpim-core-headers.cpp @@ -52,8 +52,13 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES cpim/parser/cpim-parser.cpp object/object.cpp utils/utils.cpp + xml/conference-info.cpp + xml/xml.cpp ) +ADD_XSD_WRAPPERS(xml/xml "XML XSD - xml.xsd") +ADD_XSD_WRAPPERS(xml/conference-info "Conference info XSD - conference-info.xsd") + set(LINPHONE_CXX_OBJECTS_DEFINITIONS "-DLIBLINPHONE_EXPORTS") set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS} ${LIBXSD_INCLUDE_DIRS}) diff --git a/src/conference/local-conference-event-handler.cpp b/src/conference/local-conference-event-handler.cpp index 7b49d5b7b..a0ccca42a 100644 --- a/src/conference/local-conference-event-handler.cpp +++ b/src/conference/local-conference-event-handler.cpp @@ -17,7 +17,7 @@ */ #include "local-conference-event-handler.h" -#include "xml/conference-info.hxx" +#include "xml/conference-info.h" #include "private.h" #include "object/object-p.h" diff --git a/src/conference/remote-conference-event-handler.cpp b/src/conference/remote-conference-event-handler.cpp index 4aa8561be..879d40c4a 100644 --- a/src/conference/remote-conference-event-handler.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -17,7 +17,7 @@ */ #include "remote-conference-event-handler.h" -#include "xml/conference-info.hxx" +#include "xml/conference-info.h" #include "private.h" #include "object/object-p.h" diff --git a/src/xml/conference-info.cxx b/src/xml/conference-info.cpp similarity index 99% rename from src/xml/conference-info.cxx rename to src/xml/conference-info.cpp index d43cb20d0..228e2fb9d 100644 --- a/src/xml/conference-info.cxx +++ b/src/xml/conference-info.cpp @@ -38,7 +38,7 @@ #include -#include "conference-info.hxx" +#include "conference-info.h" namespace conference_info { diff --git a/src/xml/conference-info.hxx b/src/xml/conference-info.h similarity index 99% rename from src/xml/conference-info.hxx rename to src/xml/conference-info.h index 70cdb386e..1626d55e3 100644 --- a/src/xml/conference-info.hxx +++ b/src/xml/conference-info.h @@ -31,8 +31,8 @@ // in the accompanying FLOSSE file. // -#ifndef CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_CONFERENCE_INFO_HXX -#define CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_CONFERENCE_INFO_HXX +#ifndef XML_CONFERENCE_INFO_H +#define XML_CONFERENCE_INFO_H #ifndef XSD_CXX11 #define XSD_CXX11 @@ -299,7 +299,7 @@ namespace conference_info #include -#include "xml.hxx" +#include "xml.h" namespace conference_info { @@ -3859,4 +3859,4 @@ namespace conference_info // // End epilogue. -#endif // CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_CONFERENCE_INFO_HXX +#endif // XML_CONFERENCE_INFO_H diff --git a/src/xml/xml.cxx b/src/xml/xml.cpp similarity index 99% rename from src/xml/xml.cxx rename to src/xml/xml.cpp index be2199c9d..5be074eb8 100644 --- a/src/xml/xml.cxx +++ b/src/xml/xml.cpp @@ -38,7 +38,7 @@ #include -#include "xml.hxx" +#include "xml.h" namespace namespace_ { diff --git a/src/xml/xml.hxx b/src/xml/xml.h similarity index 97% rename from src/xml/xml.hxx rename to src/xml/xml.h index d63650f40..916ef8807 100644 --- a/src/xml/xml.hxx +++ b/src/xml/xml.h @@ -31,8 +31,8 @@ // in the accompanying FLOSSE file. // -#ifndef CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_XML_HXX -#define CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_XML_HXX +#ifndef XML_XML_H +#define XML_XML_H #ifndef XSD_CXX11 #define XSD_CXX11 @@ -500,4 +500,4 @@ namespace namespace_ // // End epilogue. -#endif // CXX_USERS_REISBENJAMIN_DEVELOPPEMENT_LINPHONE_DESKTOP_SUBMODULES_LINPHONE_SRC_XML_XML_HXX +#endif // XML_XML_H From 37b9abe75931681e82bd72b12cd730d3b6f6c0bc Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 28 Aug 2017 15:49:09 +0200 Subject: [PATCH 14/17] libxsd temporary optionnal --- CMakeLists.txt | 2 +- coreapi/CMakeLists.txt | 4 +++- src/CMakeLists.txt | 13 +++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24d225847..8c52f90f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,7 +133,7 @@ else() find_package(Belr REQUIRED) endif() find_package(XML2 REQUIRED) -find_package(LibXsd REQUIRED) +find_package(LibXsd) find_package(Soci) find_package(Zlib) if(ENABLE_TUNNEL) diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index 88c78b589..61a84cb91 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -158,7 +158,6 @@ set(LIBS ${ORTP_LIBRARIES} ${XML2_LIBRARIES} ${BELR_LIBRARIES} - ${LIBXSD_LIBRARIES} ) if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") list(APPEND LIBS "Ws2_32") @@ -169,6 +168,9 @@ endif() if(ZLIB_FOUND) list(APPEND LIBS ${ZLIB_LIBRARIES}) endif() +if(LIBXSD_FOUND) + list(APPEND LIBS ${LIBXSD_LIBRARIES}) +endif() if(SOCI_FOUND) list(APPEND LIBS ${SOCI_LIBRARIES}) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4b064d20e..3210f9861 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -89,14 +89,19 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES xml/conference-info.cpp xml/xml.cpp ) +if(LIBXSD_FOUND) + ADD_XSD_WRAPPERS(xml/xml "XML XSD - xml.xsd") + ADD_XSD_WRAPPERS(xml/conference-info "Conference info XSD - conference-info.xsd") +endif() -ADD_XSD_WRAPPERS(xml/xml "XML XSD - xml.xsd") -ADD_XSD_WRAPPERS(xml/conference-info "Conference info XSD - conference-info.xsd") - -set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS} ${LIBXSD_INCLUDE_DIRS}) +set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS}) set(LINPHONE_CXX_OBJECTS_DEFINITIONS "-DLIBLINPHONE_EXPORTS") set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS}) +if(LIBXSD_FOUND) + list(APPEND LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${LIBXSD_INCLUDE_DIRS}) +endif() + if(SOCI_FOUND) list(APPEND LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${SOCI_INCLUDE_DIRS} ${SOCI_MYSQL_INCLUDES}) add_definitions(-DSOCI_ENABLED) From 621385d2217bf214138522e5da97927cfbd3c1c9 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 28 Aug 2017 15:50:06 +0200 Subject: [PATCH 15/17] Revert "libxsd temporary optionnal" This reverts commit 37b9abe75931681e82bd72b12cd730d3b6f6c0bc. --- CMakeLists.txt | 2 +- coreapi/CMakeLists.txt | 4 +--- src/CMakeLists.txt | 13 ++++--------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c52f90f5..24d225847 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,7 +133,7 @@ else() find_package(Belr REQUIRED) endif() find_package(XML2 REQUIRED) -find_package(LibXsd) +find_package(LibXsd REQUIRED) find_package(Soci) find_package(Zlib) if(ENABLE_TUNNEL) diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index 61a84cb91..88c78b589 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -158,6 +158,7 @@ set(LIBS ${ORTP_LIBRARIES} ${XML2_LIBRARIES} ${BELR_LIBRARIES} + ${LIBXSD_LIBRARIES} ) if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") list(APPEND LIBS "Ws2_32") @@ -168,9 +169,6 @@ endif() if(ZLIB_FOUND) list(APPEND LIBS ${ZLIB_LIBRARIES}) endif() -if(LIBXSD_FOUND) - list(APPEND LIBS ${LIBXSD_LIBRARIES}) -endif() if(SOCI_FOUND) list(APPEND LIBS ${SOCI_LIBRARIES}) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3210f9861..4b064d20e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -89,19 +89,14 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES xml/conference-info.cpp xml/xml.cpp ) -if(LIBXSD_FOUND) - ADD_XSD_WRAPPERS(xml/xml "XML XSD - xml.xsd") - ADD_XSD_WRAPPERS(xml/conference-info "Conference info XSD - conference-info.xsd") -endif() -set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS}) +ADD_XSD_WRAPPERS(xml/xml "XML XSD - xml.xsd") +ADD_XSD_WRAPPERS(xml/conference-info "Conference info XSD - conference-info.xsd") + +set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS} ${LIBXSD_INCLUDE_DIRS}) set(LINPHONE_CXX_OBJECTS_DEFINITIONS "-DLIBLINPHONE_EXPORTS") set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS}) -if(LIBXSD_FOUND) - list(APPEND LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${LIBXSD_INCLUDE_DIRS}) -endif() - if(SOCI_FOUND) list(APPEND LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${SOCI_INCLUDE_DIRS} ${SOCI_MYSQL_INCLUDES}) add_definitions(-DSOCI_ENABLED) From c43454cbc929beac7c2c76821392f82e04c357f6 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 29 Aug 2017 11:20:26 +0200 Subject: [PATCH 16/17] add resource-lists.xsd --- src/CMakeLists.txt | 1 + src/xml/resource-lists.xsd | 81 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/xml/resource-lists.xsd diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4b064d20e..679599314 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,6 +92,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES ADD_XSD_WRAPPERS(xml/xml "XML XSD - xml.xsd") ADD_XSD_WRAPPERS(xml/conference-info "Conference info XSD - conference-info.xsd") +ADD_XSD_WRAPPERS(xml/resource-lists "Resourece lists XSD - resource-lists.xsd") set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS} ${LIBXSD_INCLUDE_DIRS}) set(LINPHONE_CXX_OBJECTS_DEFINITIONS "-DLIBLINPHONE_EXPORTS") diff --git a/src/xml/resource-lists.xsd b/src/xml/resource-lists.xsd new file mode 100644 index 000000000..c4884db55 --- /dev/null +++ b/src/xml/resource-lists.xsd @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4ca48b6162698edc88b68a8acf5752798ee48574 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 29 Aug 2017 15:42:01 +0200 Subject: [PATCH 17/17] add resource-lists generated API --- src/xml/resource-lists.cpp | 2451 ++++++++++++++++++++++++++++++++++++ src/xml/resource-lists.h | 1254 ++++++++++++++++++ 2 files changed, 3705 insertions(+) create mode 100644 src/xml/resource-lists.cpp create mode 100644 src/xml/resource-lists.h diff --git a/src/xml/resource-lists.cpp b/src/xml/resource-lists.cpp new file mode 100644 index 000000000..0f94f63c0 --- /dev/null +++ b/src/xml/resource-lists.cpp @@ -0,0 +1,2451 @@ +// Copyright (c) 2005-2014 Code Synthesis Tools CC +// +// This program was generated by CodeSynthesis XSD, an XML Schema to +// C++ data binding compiler. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// In addition, as a special exception, Code Synthesis Tools CC gives +// permission to link this program with the Xerces-C++ library (or with +// modified versions of Xerces-C++ that use the same license as Xerces-C++), +// and distribute linked combinations including the two. You must obey +// the GNU General Public License version 2 in all respects for all of +// the code used other than Xerces-C++. If you modify this copy of the +// program, you may extend this exception to your version of the program, +// but you are not obligated to do so. If you do not wish to do so, delete +// this exception statement from your version. +// +// Furthermore, Code Synthesis Tools CC makes a special exception for +// the Free/Libre and Open Source Software (FLOSS) which is described +// in the accompanying FLOSSE file. +// + +// Begin prologue. +// +// +// End prologue. + +#include + +#include "resource-lists.h" + +namespace resource_lists +{ + // ListType + // + + const ListType::Display_nameOptional& ListType:: + getDisplay_name () const + { + return this->display_name_; + } + + ListType::Display_nameOptional& ListType:: + getDisplay_name () + { + return this->display_name_; + } + + void ListType:: + setDisplay_name (const Display_nameType& x) + { + this->display_name_.set (x); + } + + void ListType:: + setDisplay_name (const Display_nameOptional& x) + { + this->display_name_ = x; + } + + void ListType:: + setDisplay_name (::std::unique_ptr< Display_nameType > x) + { + this->display_name_.set (std::move (x)); + } + + const ListType::ListSequence& ListType:: + getList () const + { + return this->list_; + } + + ListType::ListSequence& ListType:: + getList () + { + return this->list_; + } + + void ListType:: + setList (const ListSequence& s) + { + this->list_ = s; + } + + const ListType::ExternalSequence& ListType:: + getExternal () const + { + return this->external_; + } + + ListType::ExternalSequence& ListType:: + getExternal () + { + return this->external_; + } + + void ListType:: + setExternal (const ExternalSequence& s) + { + this->external_ = s; + } + + const ListType::EntrySequence& ListType:: + getEntry () const + { + return this->entry_; + } + + ListType::EntrySequence& ListType:: + getEntry () + { + return this->entry_; + } + + void ListType:: + setEntry (const EntrySequence& s) + { + this->entry_ = s; + } + + const ListType::Entry_refSequence& ListType:: + getEntry_ref () const + { + return this->entry_ref_; + } + + ListType::Entry_refSequence& ListType:: + getEntry_ref () + { + return this->entry_ref_; + } + + void ListType:: + setEntry_ref (const Entry_refSequence& s) + { + this->entry_ref_ = s; + } + + const ListType::AnySequence& ListType:: + getAny () const + { + return this->any_; + } + + ListType::AnySequence& ListType:: + getAny () + { + return this->any_; + } + + void ListType:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const ListType::NameOptional& ListType:: + getName () const + { + return this->name_; + } + + ListType::NameOptional& ListType:: + getName () + { + return this->name_; + } + + void ListType:: + setName (const NameType& x) + { + this->name_.set (x); + } + + void ListType:: + setName (const NameOptional& x) + { + this->name_ = x; + } + + void ListType:: + setName (::std::unique_ptr< NameType > x) + { + this->name_.set (std::move (x)); + } + + const ListType::AnyAttributeSet& ListType:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + ListType::AnyAttributeSet& ListType:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void ListType:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& ListType:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& ListType:: + getDomDocument () + { + return *this->dom_document_; + } + + + // EntryType + // + + const EntryType::Display_nameOptional& EntryType:: + getDisplay_name () const + { + return this->display_name_; + } + + EntryType::Display_nameOptional& EntryType:: + getDisplay_name () + { + return this->display_name_; + } + + void EntryType:: + setDisplay_name (const Display_nameType& x) + { + this->display_name_.set (x); + } + + void EntryType:: + setDisplay_name (const Display_nameOptional& x) + { + this->display_name_ = x; + } + + void EntryType:: + setDisplay_name (::std::unique_ptr< Display_nameType > x) + { + this->display_name_.set (std::move (x)); + } + + const EntryType::AnySequence& EntryType:: + getAny () const + { + return this->any_; + } + + EntryType::AnySequence& EntryType:: + getAny () + { + return this->any_; + } + + void EntryType:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const EntryType::UriType& EntryType:: + getUri () const + { + return this->uri_.get (); + } + + EntryType::UriType& EntryType:: + getUri () + { + return this->uri_.get (); + } + + void EntryType:: + setUri (const UriType& x) + { + this->uri_.set (x); + } + + void EntryType:: + setUri (::std::unique_ptr< UriType > x) + { + this->uri_.set (std::move (x)); + } + + ::std::unique_ptr< EntryType::UriType > EntryType:: + detachUri () + { + return this->uri_.detach (); + } + + const EntryType::AnyAttributeSet& EntryType:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + EntryType::AnyAttributeSet& EntryType:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void EntryType:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& EntryType:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& EntryType:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Entry_refType + // + + const Entry_refType::Display_nameOptional& Entry_refType:: + getDisplay_name () const + { + return this->display_name_; + } + + Entry_refType::Display_nameOptional& Entry_refType:: + getDisplay_name () + { + return this->display_name_; + } + + void Entry_refType:: + setDisplay_name (const Display_nameType& x) + { + this->display_name_.set (x); + } + + void Entry_refType:: + setDisplay_name (const Display_nameOptional& x) + { + this->display_name_ = x; + } + + void Entry_refType:: + setDisplay_name (::std::unique_ptr< Display_nameType > x) + { + this->display_name_.set (std::move (x)); + } + + const Entry_refType::AnySequence& Entry_refType:: + getAny () const + { + return this->any_; + } + + Entry_refType::AnySequence& Entry_refType:: + getAny () + { + return this->any_; + } + + void Entry_refType:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const Entry_refType::RefType& Entry_refType:: + getRef () const + { + return this->ref_.get (); + } + + Entry_refType::RefType& Entry_refType:: + getRef () + { + return this->ref_.get (); + } + + void Entry_refType:: + setRef (const RefType& x) + { + this->ref_.set (x); + } + + void Entry_refType:: + setRef (::std::unique_ptr< RefType > x) + { + this->ref_.set (std::move (x)); + } + + ::std::unique_ptr< Entry_refType::RefType > Entry_refType:: + detachRef () + { + return this->ref_.detach (); + } + + const Entry_refType::AnyAttributeSet& Entry_refType:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + Entry_refType::AnyAttributeSet& Entry_refType:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void Entry_refType:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& Entry_refType:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& Entry_refType:: + getDomDocument () + { + return *this->dom_document_; + } + + + // ExternalType + // + + const ExternalType::Display_nameOptional& ExternalType:: + getDisplay_name () const + { + return this->display_name_; + } + + ExternalType::Display_nameOptional& ExternalType:: + getDisplay_name () + { + return this->display_name_; + } + + void ExternalType:: + setDisplay_name (const Display_nameType& x) + { + this->display_name_.set (x); + } + + void ExternalType:: + setDisplay_name (const Display_nameOptional& x) + { + this->display_name_ = x; + } + + void ExternalType:: + setDisplay_name (::std::unique_ptr< Display_nameType > x) + { + this->display_name_.set (std::move (x)); + } + + const ExternalType::AnySequence& ExternalType:: + getAny () const + { + return this->any_; + } + + ExternalType::AnySequence& ExternalType:: + getAny () + { + return this->any_; + } + + void ExternalType:: + setAny (const AnySequence& s) + { + this->any_ = s; + } + + const ExternalType::AnchorOptional& ExternalType:: + getAnchor () const + { + return this->anchor_; + } + + ExternalType::AnchorOptional& ExternalType:: + getAnchor () + { + return this->anchor_; + } + + void ExternalType:: + setAnchor (const AnchorType& x) + { + this->anchor_.set (x); + } + + void ExternalType:: + setAnchor (const AnchorOptional& x) + { + this->anchor_ = x; + } + + void ExternalType:: + setAnchor (::std::unique_ptr< AnchorType > x) + { + this->anchor_.set (std::move (x)); + } + + const ExternalType::AnyAttributeSet& ExternalType:: + getAnyAttribute () const + { + return this->any_attribute_; + } + + ExternalType::AnyAttributeSet& ExternalType:: + getAnyAttribute () + { + return this->any_attribute_; + } + + void ExternalType:: + setAnyAttribute (const AnyAttributeSet& s) + { + this->any_attribute_ = s; + } + + const ::xercesc::DOMDocument& ExternalType:: + getDomDocument () const + { + return *this->dom_document_; + } + + ::xercesc::DOMDocument& ExternalType:: + getDomDocument () + { + return *this->dom_document_; + } + + + // Display_nameType + // + + const Display_nameType::LangOptional& Display_nameType:: + getLang () const + { + return this->lang_; + } + + Display_nameType::LangOptional& Display_nameType:: + getLang () + { + return this->lang_; + } + + void Display_nameType:: + setLang (const LangType& x) + { + this->lang_.set (x); + } + + void Display_nameType:: + setLang (const LangOptional& x) + { + this->lang_ = x; + } + + void Display_nameType:: + setLang (::std::unique_ptr< LangType > x) + { + this->lang_.set (std::move (x)); + } + + + // List + // + + + // Display_name + // + + + // Resource_lists + // + + const Resource_lists::ListSequence& Resource_lists:: + getList () const + { + return this->list_; + } + + Resource_lists::ListSequence& Resource_lists:: + getList () + { + return this->list_; + } + + void Resource_lists:: + setList (const ListSequence& s) + { + this->list_ = s; + } +} + +#include + +#include + +namespace resource_lists +{ + // ListType + // + + ListType:: + ListType () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (this), + list_ (this), + external_ (this), + entry_ (this), + entry_ref_ (this), + any_ (this->getDomDocument ()), + name_ (this), + any_attribute_ (this->getDomDocument ()) + { + } + + ListType:: + ListType (const ListType& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (x.display_name_, f, this), + list_ (x.list_, f, this), + external_ (x.external_, f, this), + entry_ (x.entry_, f, this), + entry_ref_ (x.entry_ref_, f, this), + any_ (x.any_, this->getDomDocument ()), + name_ (x.name_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + ListType:: + ListType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (this), + list_ (this), + external_ (this), + entry_ (this), + entry_ref_ (this), + any_ (this->getDomDocument ()), + name_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void ListType:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-name + // + if (n.name () == "display-name" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< Display_nameType > r ( + Display_nameTraits::create (i, f, this)); + + if (!this->display_name_) + { + this->display_name_.set (::std::move (r)); + continue; + } + } + + // list + // + if (n.name () == "list" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< ListType1 > r ( + ListTraits::create (i, f, this)); + + this->list_.push_back (::std::move (r)); + continue; + } + + // external + // + if (n.name () == "external" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< ExternalType > r ( + ExternalTraits::create (i, f, this)); + + this->external_.push_back (::std::move (r)); + continue; + } + + // entry + // + if (n.name () == "entry" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< EntryType > r ( + EntryTraits::create (i, f, this)); + + this->entry_.push_back (::std::move (r)); + continue; + } + + // entry-ref + // + if (n.name () == "entry-ref" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< Entry_refType > r ( + Entry_refTraits::create (i, f, this)); + + this->entry_ref_.push_back (::std::move (r)); + continue; + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:resource-lists")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "name" && n.namespace_ ().empty ()) + { + this->name_.set (NameTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:resource-lists" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + ListType* ListType:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class ListType (*this, f, c); + } + + ListType& ListType:: + operator= (const ListType& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_name_ = x.display_name_; + this->list_ = x.list_; + this->external_ = x.external_; + this->entry_ = x.entry_; + this->entry_ref_ = x.entry_ref_; + this->any_ = x.any_; + this->name_ = x.name_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + ListType:: + ~ListType () + { + } + + // EntryType + // + + EntryType:: + EntryType (const UriType& uri) + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (this), + any_ (this->getDomDocument ()), + uri_ (uri, this), + any_attribute_ (this->getDomDocument ()) + { + } + + EntryType:: + EntryType (const EntryType& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (x.display_name_, f, this), + any_ (x.any_, this->getDomDocument ()), + uri_ (x.uri_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + EntryType:: + EntryType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (this), + any_ (this->getDomDocument ()), + uri_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void EntryType:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-name + // + if (n.name () == "display-name" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< Display_nameType > r ( + Display_nameTraits::create (i, f, this)); + + if (!this->display_name_) + { + this->display_name_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:resource-lists")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "uri" && n.namespace_ ().empty ()) + { + this->uri_.set (UriTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:resource-lists" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!uri_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "uri", + ""); + } + } + + EntryType* EntryType:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class EntryType (*this, f, c); + } + + EntryType& EntryType:: + operator= (const EntryType& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_name_ = x.display_name_; + this->any_ = x.any_; + this->uri_ = x.uri_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + EntryType:: + ~EntryType () + { + } + + // Entry_refType + // + + Entry_refType:: + Entry_refType (const RefType& ref) + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (this), + any_ (this->getDomDocument ()), + ref_ (ref, this), + any_attribute_ (this->getDomDocument ()) + { + } + + Entry_refType:: + Entry_refType (const Entry_refType& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (x.display_name_, f, this), + any_ (x.any_, this->getDomDocument ()), + ref_ (x.ref_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + Entry_refType:: + Entry_refType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (this), + any_ (this->getDomDocument ()), + ref_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void Entry_refType:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-name + // + if (n.name () == "display-name" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< Display_nameType > r ( + Display_nameTraits::create (i, f, this)); + + if (!this->display_name_) + { + this->display_name_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:resource-lists")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "ref" && n.namespace_ ().empty ()) + { + this->ref_.set (RefTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:resource-lists" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + + if (!ref_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "ref", + ""); + } + } + + Entry_refType* Entry_refType:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Entry_refType (*this, f, c); + } + + Entry_refType& Entry_refType:: + operator= (const Entry_refType& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_name_ = x.display_name_; + this->any_ = x.any_; + this->ref_ = x.ref_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + Entry_refType:: + ~Entry_refType () + { + } + + // ExternalType + // + + ExternalType:: + ExternalType () + : ::xml_schema::Type (), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (this), + any_ (this->getDomDocument ()), + anchor_ (this), + any_attribute_ (this->getDomDocument ()) + { + } + + ExternalType:: + ExternalType (const ExternalType& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (x.display_name_, f, this), + any_ (x.any_, this->getDomDocument ()), + anchor_ (x.anchor_, f, this), + any_attribute_ (x.any_attribute_, this->getDomDocument ()) + { + } + + ExternalType:: + ExternalType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + dom_document_ (::xsd::cxx::xml::dom::create_document< char > ()), + display_name_ (this), + any_ (this->getDomDocument ()), + anchor_ (this), + any_attribute_ (this->getDomDocument ()) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void ExternalType:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // display-name + // + if (n.name () == "display-name" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< Display_nameType > r ( + Display_nameTraits::create (i, f, this)); + + if (!this->display_name_) + { + this->display_name_.set (::std::move (r)); + continue; + } + } + + // any + // + if ((!n.namespace_ ().empty () && n.namespace_ () != "urn:ietf:params:xml:ns:resource-lists")) + { + ::xercesc::DOMElement* r ( + static_cast< ::xercesc::DOMElement* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMElement* > (&i), true))); + this->any_.push_back (r); + continue; + } + + break; + } + + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "anchor" && n.namespace_ ().empty ()) + { + this->anchor_.set (AnchorTraits::create (i, f, this)); + continue; + } + + // any_attribute + // + if ((!n.namespace_ ().empty () && + n.namespace_ () != "urn:ietf:params:xml:ns:resource-lists" && + n.namespace_ () != ::xsd::cxx::xml::bits::xmlns_namespace< char > () && + n.namespace_ () != ::xsd::cxx::xml::bits::xsi_namespace< char > ())) + { + ::xercesc::DOMAttr* r ( + static_cast< ::xercesc::DOMAttr* > ( + this->getDomDocument ().importNode ( + const_cast< ::xercesc::DOMAttr* > (&i), true))); + this->any_attribute_ .insert (r); + continue; + } + } + } + + ExternalType* ExternalType:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class ExternalType (*this, f, c); + } + + ExternalType& ExternalType:: + operator= (const ExternalType& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->display_name_ = x.display_name_; + this->any_ = x.any_; + this->anchor_ = x.anchor_; + this->any_attribute_ = x.any_attribute_; + } + + return *this; + } + + ExternalType:: + ~ExternalType () + { + } + + // Display_nameType + // + + Display_nameType:: + Display_nameType () + : ::xml_schema::String (), + lang_ (this) + { + } + + Display_nameType:: + Display_nameType (const char* _xsd_String_base) + : ::xml_schema::String (_xsd_String_base), + lang_ (this) + { + } + + Display_nameType:: + Display_nameType (const ::std::string& _xsd_String_base) + : ::xml_schema::String (_xsd_String_base), + lang_ (this) + { + } + + Display_nameType:: + Display_nameType (const ::xml_schema::String& _xsd_String_base) + : ::xml_schema::String (_xsd_String_base), + lang_ (this) + { + } + + Display_nameType:: + Display_nameType (const Display_nameType& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (x, f, c), + lang_ (x.lang_, f, this) + { + } + + Display_nameType:: + Display_nameType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::String (e, f | ::xml_schema::Flags::base, c), + lang_ (this) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); + this->parse (p, f); + } + } + + void Display_nameType:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + while (p.more_attributes ()) + { + const ::xercesc::DOMAttr& i (p.next_attribute ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + if (n.name () == "lang" && n.namespace_ () == "http://www.w3.org/XML/1998/namespace") + { + this->lang_.set (LangTraits::create (i, f, this)); + continue; + } + } + } + + Display_nameType* Display_nameType:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Display_nameType (*this, f, c); + } + + Display_nameType& Display_nameType:: + operator= (const Display_nameType& x) + { + if (this != &x) + { + static_cast< ::xml_schema::String& > (*this) = x; + this->lang_ = x.lang_; + } + + return *this; + } + + Display_nameType:: + ~Display_nameType () + { + } + + // List + // + + List:: + List () + : ::resource_lists::ListType () + { + } + + List:: + List (const List& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::resource_lists::ListType (x, f, c) + { + } + + List:: + List (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::resource_lists::ListType (e, f, c) + { + } + + List* List:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class List (*this, f, c); + } + + List:: + ~List () + { + } + + // Display_name + // + + Display_name:: + Display_name () + : ::resource_lists::Display_nameType () + { + } + + Display_name:: + Display_name (const char* _xsd_String_base) + : ::resource_lists::Display_nameType (_xsd_String_base) + { + } + + Display_name:: + Display_name (const ::std::string& _xsd_String_base) + : ::resource_lists::Display_nameType (_xsd_String_base) + { + } + + Display_name:: + Display_name (const ::xml_schema::String& _xsd_String_base) + : ::resource_lists::Display_nameType (_xsd_String_base) + { + } + + Display_name:: + Display_name (const Display_name& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::resource_lists::Display_nameType (x, f, c) + { + } + + Display_name:: + Display_name (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::resource_lists::Display_nameType (e, f, c) + { + } + + Display_name* Display_name:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Display_name (*this, f, c); + } + + Display_name:: + ~Display_name () + { + } + + // Resource_lists + // + + Resource_lists:: + Resource_lists () + : ::xml_schema::Type (), + list_ (this) + { + } + + Resource_lists:: + Resource_lists (const Resource_lists& x, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (x, f, c), + list_ (x.list_, f, this) + { + } + + Resource_lists:: + Resource_lists (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f, + ::xml_schema::Container* c) + : ::xml_schema::Type (e, f | ::xml_schema::Flags::base, c), + list_ (this) + { + if ((f & ::xml_schema::Flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false); + this->parse (p, f); + } + } + + void Resource_lists:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::Flags f) + { + for (; p.more_content (); p.next_content (false)) + { + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // list + // + if (n.name () == "list" && n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< ListType > r ( + ListTraits::create (i, f, this)); + + this->list_.push_back (::std::move (r)); + continue; + } + + break; + } + } + + Resource_lists* Resource_lists:: + _clone (::xml_schema::Flags f, + ::xml_schema::Container* c) const + { + return new class Resource_lists (*this, f, c); + } + + Resource_lists& Resource_lists:: + operator= (const Resource_lists& x) + { + if (this != &x) + { + static_cast< ::xml_schema::Type& > (*this) = x; + this->list_ = x.list_; + } + + return *this; + } + + Resource_lists:: + ~Resource_lists () + { + } +} + +#include + +namespace resource_lists +{ + ::std::ostream& + operator<< (::std::ostream& o, const ListType& i) + { + if (i.getDisplay_name ()) + { + o << ::std::endl << "display-name: " << *i.getDisplay_name (); + } + + for (ListType::ListConstIterator + b (i.getList ().begin ()), e (i.getList ().end ()); + b != e; ++b) + { + o << ::std::endl << "list: " << *b; + } + + for (ListType::ExternalConstIterator + b (i.getExternal ().begin ()), e (i.getExternal ().end ()); + b != e; ++b) + { + o << ::std::endl << "external: " << *b; + } + + for (ListType::EntryConstIterator + b (i.getEntry ().begin ()), e (i.getEntry ().end ()); + b != e; ++b) + { + o << ::std::endl << "entry: " << *b; + } + + for (ListType::Entry_refConstIterator + b (i.getEntry_ref ().begin ()), e (i.getEntry_ref ().end ()); + b != e; ++b) + { + o << ::std::endl << "entry-ref: " << *b; + } + + if (i.getName ()) + { + o << ::std::endl << "name: " << *i.getName (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const EntryType& i) + { + if (i.getDisplay_name ()) + { + o << ::std::endl << "display-name: " << *i.getDisplay_name (); + } + + o << ::std::endl << "uri: " << i.getUri (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Entry_refType& i) + { + if (i.getDisplay_name ()) + { + o << ::std::endl << "display-name: " << *i.getDisplay_name (); + } + + o << ::std::endl << "ref: " << i.getRef (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const ExternalType& i) + { + if (i.getDisplay_name ()) + { + o << ::std::endl << "display-name: " << *i.getDisplay_name (); + } + + if (i.getAnchor ()) + { + o << ::std::endl << "anchor: " << *i.getAnchor (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Display_nameType& i) + { + o << static_cast< const ::xml_schema::String& > (i); + + if (i.getLang ()) + { + o << ::std::endl << "lang: " << *i.getLang (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const List& i) + { + o << static_cast< const ::resource_lists::ListType& > (i); + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Display_name& i) + { + o << static_cast< const ::resource_lists::Display_nameType& > (i); + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Resource_lists& i) + { + for (Resource_lists::ListConstIterator + b (i.getList ().begin ()), e (i.getList ().end ()); + b != e; ++b) + { + o << ::std::endl << "list: " << *b; + } + + return o; + } +} + +#include +#include +#include + +namespace resource_lists +{ + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (const ::std::string& u, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::tree::error_handler< char > h; + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + u, h, p, f)); + + h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > (); + + return ::std::unique_ptr< ::resource_lists::Resource_lists > ( + ::resource_lists::parseResource_lists ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (const ::std::string& u, + ::xml_schema::ErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + u, h, p, f)); + + if (!d.get ()) + throw ::xsd::cxx::tree::parsing< char > (); + + return ::std::unique_ptr< ::resource_lists::Resource_lists > ( + ::resource_lists::parseResource_lists ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (const ::std::string& u, + ::xercesc::DOMErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + u, h, p, f)); + + if (!d.get ()) + throw ::xsd::cxx::tree::parsing< char > (); + + return ::std::unique_ptr< ::resource_lists::Resource_lists > ( + ::resource_lists::parseResource_lists ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::xml::sax::std_input_source isrc (is); + return ::resource_lists::parseResource_lists (isrc, f, p); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + ::xml_schema::ErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::xml::sax::std_input_source isrc (is); + return ::resource_lists::parseResource_lists (isrc, h, f, p); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + ::xercesc::DOMErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::sax::std_input_source isrc (is); + return ::resource_lists::parseResource_lists (isrc, h, f, p); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + const ::std::string& sid, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::xml::sax::std_input_source isrc (is, sid); + return ::resource_lists::parseResource_lists (isrc, f, p); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + const ::std::string& sid, + ::xml_schema::ErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0, + (f & ::xml_schema::Flags::keep_dom) == 0); + + ::xsd::cxx::xml::sax::std_input_source isrc (is, sid); + return ::resource_lists::parseResource_lists (isrc, h, f, p); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + const ::std::string& sid, + ::xercesc::DOMErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::xml::sax::std_input_source isrc (is, sid); + return ::resource_lists::parseResource_lists (isrc, h, f, p); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::xercesc::InputSource& i, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xsd::cxx::tree::error_handler< char > h; + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + i, h, p, f)); + + h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > (); + + return ::std::unique_ptr< ::resource_lists::Resource_lists > ( + ::resource_lists::parseResource_lists ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::xercesc::InputSource& i, + ::xml_schema::ErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + i, h, p, f)); + + if (!d.get ()) + throw ::xsd::cxx::tree::parsing< char > (); + + return ::std::unique_ptr< ::resource_lists::Resource_lists > ( + ::resource_lists::parseResource_lists ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::xercesc::InputSource& i, + ::xercesc::DOMErrorHandler& h, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::parse< char > ( + i, h, p, f)); + + if (!d.get ()) + throw ::xsd::cxx::tree::parsing< char > (); + + return ::std::unique_ptr< ::resource_lists::Resource_lists > ( + ::resource_lists::parseResource_lists ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (const ::xercesc::DOMDocument& doc, + ::xml_schema::Flags f, + const ::xml_schema::Properties& p) + { + if (f & ::xml_schema::Flags::keep_dom) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (true))); + + return ::std::unique_ptr< ::resource_lists::Resource_lists > ( + ::resource_lists::parseResource_lists ( + std::move (d), f | ::xml_schema::Flags::own_dom, p)); + } + + const ::xercesc::DOMElement& e (*doc.getDocumentElement ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (e)); + + if (n.name () == "resource-lists" && + n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< ::resource_lists::Resource_lists > r ( + ::xsd::cxx::tree::traits< ::resource_lists::Resource_lists, char >::create ( + e, f, 0)); + return r; + } + + throw ::xsd::cxx::tree::unexpected_element < char > ( + n.name (), + n.namespace_ (), + "resource-lists", + "urn:ietf:params:xml:ns:resource-lists"); + } + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d, + ::xml_schema::Flags f, + const ::xml_schema::Properties&) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > c ( + ((f & ::xml_schema::Flags::keep_dom) && + !(f & ::xml_schema::Flags::own_dom)) + ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (true)) + : 0); + + ::xercesc::DOMDocument& doc (c.get () ? *c : *d); + const ::xercesc::DOMElement& e (*doc.getDocumentElement ()); + + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (e)); + + if (f & ::xml_schema::Flags::keep_dom) + doc.setUserData (::xml_schema::dom::treeNodeKey, + (c.get () ? &c : &d), + 0); + + if (n.name () == "resource-lists" && + n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + ::std::unique_ptr< ::resource_lists::Resource_lists > r ( + ::xsd::cxx::tree::traits< ::resource_lists::Resource_lists, char >::create ( + e, f, 0)); + return r; + } + + throw ::xsd::cxx::tree::unexpected_element < char > ( + n.name (), + n.namespace_ (), + "resource-lists", + "urn:ietf:params:xml:ns:resource-lists"); + } +} + +#include +#include +#include + +namespace resource_lists +{ + void + operator<< (::xercesc::DOMElement& e, const ListType& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (ListType::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-name + // + if (i.getDisplay_name ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-name", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *i.getDisplay_name (); + } + + // list + // + for (ListType::ListConstIterator + b (i.getList ().begin ()), n (i.getList ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "list", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *b; + } + + // external + // + for (ListType::ExternalConstIterator + b (i.getExternal ().begin ()), n (i.getExternal ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "external", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *b; + } + + // entry + // + for (ListType::EntryConstIterator + b (i.getEntry ().begin ()), n (i.getEntry ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "entry", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *b; + } + + // entry-ref + // + for (ListType::Entry_refConstIterator + b (i.getEntry_ref ().begin ()), n (i.getEntry_ref ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "entry-ref", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *b; + } + + // any + // + for (ListType::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // name + // + if (i.getName ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "name", + e)); + + a << *i.getName (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const EntryType& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (EntryType::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-name + // + if (i.getDisplay_name ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-name", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *i.getDisplay_name (); + } + + // any + // + for (EntryType::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // uri + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "uri", + e)); + + a << i.getUri (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Entry_refType& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (Entry_refType::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-name + // + if (i.getDisplay_name ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-name", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *i.getDisplay_name (); + } + + // any + // + for (Entry_refType::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // ref + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "ref", + e)); + + a << i.getRef (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const ExternalType& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // any_attribute + // + for (ExternalType::AnyAttributeConstIterator + b (i.getAnyAttribute ().begin ()), n (i.getAnyAttribute ().end ()); + b != n; ++b) + { + ::xercesc::DOMAttr* a ( + static_cast< ::xercesc::DOMAttr* > ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMAttr* > (&(*b)), true))); + + if (a->getLocalName () == 0) + e.setAttributeNode (a); + else + e.setAttributeNodeNS (a); + } + + // display-name + // + if (i.getDisplay_name ()) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "display-name", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *i.getDisplay_name (); + } + + // any + // + for (ExternalType::AnyConstIterator + b (i.getAny ().begin ()), n (i.getAny ().end ()); + b != n; ++b) + { + e.appendChild ( + e.getOwnerDocument ()->importNode ( + const_cast< ::xercesc::DOMElement* > (&(*b)), true)); + } + + // anchor + // + if (i.getAnchor ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "anchor", + e)); + + a << *i.getAnchor (); + } + } + + void + serializeResource_lists (::std::ostream& o, + const ::resource_lists::Resource_lists& s, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0); + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::resource_lists::serializeResource_lists (s, m, f)); + + ::xsd::cxx::tree::error_handler< char > h; + + ::xsd::cxx::xml::dom::ostream_format_target t (o); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > (); + } + } + + void + serializeResource_lists (::std::ostream& o, + const ::resource_lists::Resource_lists& s, + ::xml_schema::ErrorHandler& h, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xsd::cxx::xml::auto_initializer i ( + (f & ::xml_schema::Flags::dont_initialize) == 0); + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::resource_lists::serializeResource_lists (s, m, f)); + ::xsd::cxx::xml::dom::ostream_format_target t (o); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + throw ::xsd::cxx::tree::serialization< char > (); + } + } + + void + serializeResource_lists (::std::ostream& o, + const ::resource_lists::Resource_lists& s, + ::xercesc::DOMErrorHandler& h, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::resource_lists::serializeResource_lists (s, m, f)); + ::xsd::cxx::xml::dom::ostream_format_target t (o); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + throw ::xsd::cxx::tree::serialization< char > (); + } + } + + void + serializeResource_lists (::xercesc::XMLFormatTarget& t, + const ::resource_lists::Resource_lists& s, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::resource_lists::serializeResource_lists (s, m, f)); + + ::xsd::cxx::tree::error_handler< char > h; + + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > (); + } + } + + void + serializeResource_lists (::xercesc::XMLFormatTarget& t, + const ::resource_lists::Resource_lists& s, + ::xml_schema::ErrorHandler& h, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::resource_lists::serializeResource_lists (s, m, f)); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + throw ::xsd::cxx::tree::serialization< char > (); + } + } + + void + serializeResource_lists (::xercesc::XMLFormatTarget& t, + const ::resource_lists::Resource_lists& s, + ::xercesc::DOMErrorHandler& h, + const ::xml_schema::NamespaceInfomap& m, + const ::std::string& e, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::resource_lists::serializeResource_lists (s, m, f)); + if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f)) + { + throw ::xsd::cxx::tree::serialization< char > (); + } + } + + void + serializeResource_lists (::xercesc::DOMDocument& d, + const ::resource_lists::Resource_lists& s, + ::xml_schema::Flags) + { + ::xercesc::DOMElement& e (*d.getDocumentElement ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (e)); + + if (n.name () == "resource-lists" && + n.namespace_ () == "urn:ietf:params:xml:ns:resource-lists") + { + e << s; + } + else + { + throw ::xsd::cxx::tree::unexpected_element < char > ( + n.name (), + n.namespace_ (), + "resource-lists", + "urn:ietf:params:xml:ns:resource-lists"); + } + } + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > + serializeResource_lists (const ::resource_lists::Resource_lists& s, + const ::xml_schema::NamespaceInfomap& m, + ::xml_schema::Flags f) + { + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d ( + ::xsd::cxx::xml::dom::serialize< char > ( + "resource-lists", + "urn:ietf:params:xml:ns:resource-lists", + m, f)); + + ::resource_lists::serializeResource_lists (*d, s, f); + return d; + } + + void + operator<< (::xercesc::DOMElement& e, const Display_nameType& i) + { + e << static_cast< const ::xml_schema::String& > (i); + + // lang + // + if (i.getLang ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "lang", + "http://www.w3.org/XML/1998/namespace", + e)); + + a << *i.getLang (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const List& i) + { + e << static_cast< const ::resource_lists::ListType& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Display_name& i) + { + e << static_cast< const ::resource_lists::Display_nameType& > (i); + } + + void + operator<< (::xercesc::DOMElement& e, const Resource_lists& i) + { + e << static_cast< const ::xml_schema::Type& > (i); + + // list + // + for (Resource_lists::ListConstIterator + b (i.getList ().begin ()), n (i.getList ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "list", + "urn:ietf:params:xml:ns:resource-lists", + e)); + + s << *b; + } + } +} + +#include + +// Begin epilogue. +// +// +// End epilogue. + diff --git a/src/xml/resource-lists.h b/src/xml/resource-lists.h new file mode 100644 index 000000000..4c499fa3d --- /dev/null +++ b/src/xml/resource-lists.h @@ -0,0 +1,1254 @@ +// Copyright (c) 2005-2014 Code Synthesis Tools CC +// +// This program was generated by CodeSynthesis XSD, an XML Schema to +// C++ data binding compiler. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// In addition, as a special exception, Code Synthesis Tools CC gives +// permission to link this program with the Xerces-C++ library (or with +// modified versions of Xerces-C++ that use the same license as Xerces-C++), +// and distribute linked combinations including the two. You must obey +// the GNU General Public License version 2 in all respects for all of +// the code used other than Xerces-C++. If you modify this copy of the +// program, you may extend this exception to your version of the program, +// but you are not obligated to do so. If you do not wish to do so, delete +// this exception statement from your version. +// +// Furthermore, Code Synthesis Tools CC makes a special exception for +// the Free/Libre and Open Source Software (FLOSS) which is described +// in the accompanying FLOSSE file. +// + +#ifndef XML_RESOURCE_LISTS_H +#define XML_RESOURCE_LISTS_H + +#ifndef XSD_CXX11 +#define XSD_CXX11 +#endif + +#ifndef XSD_USE_CHAR +#define XSD_USE_CHAR +#endif + +#ifndef XSD_CXX_TREE_USE_CHAR +#define XSD_CXX_TREE_USE_CHAR +#endif + +// Begin prologue. +// +// +// End prologue. + +#include + +#if (XSD_INT_VERSION != 4000000L) +#error XSD runtime version mismatch +#endif + +#include + +#include + +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace xml_schema +{ + // anyType and anySimpleType. + // + typedef ::xsd::cxx::tree::type Type; + typedef ::xsd::cxx::tree::simple_type< char, Type > SimpleType; + typedef ::xsd::cxx::tree::type Container; + + // 8-bit + // + typedef signed char Byte; + typedef unsigned char UnsignedByte; + + // 16-bit + // + typedef short Short; + typedef unsigned short UnsignedShort; + + // 32-bit + // + typedef int Int; + typedef unsigned int UnsignedInt; + + // 64-bit + // + typedef long long Long; + typedef unsigned long long UnsignedLong; + + // Supposed to be arbitrary-length integral types. + // + typedef long long Integer; + typedef long long NonPositiveInteger; + typedef unsigned long long NonNegativeInteger; + typedef unsigned long long PositiveInteger; + typedef long long NegativeInteger; + + // Boolean. + // + typedef bool Boolean; + + // Floating-point types. + // + typedef float Float; + typedef double Double; + typedef double Decimal; + + // String types. + // + typedef ::xsd::cxx::tree::string< char, SimpleType > String; + typedef ::xsd::cxx::tree::normalized_string< char, String > NormalizedString; + typedef ::xsd::cxx::tree::token< char, NormalizedString > Token; + typedef ::xsd::cxx::tree::name< char, Token > Name; + typedef ::xsd::cxx::tree::nmtoken< char, Token > Nmtoken; + typedef ::xsd::cxx::tree::nmtokens< char, SimpleType, Nmtoken > Nmtokens; + typedef ::xsd::cxx::tree::ncname< char, Name > Ncname; + typedef ::xsd::cxx::tree::language< char, Token > Language; + + // ID/IDREF. + // + typedef ::xsd::cxx::tree::id< char, Ncname > Id; + typedef ::xsd::cxx::tree::idref< char, Ncname, Type > Idref; + typedef ::xsd::cxx::tree::idrefs< char, SimpleType, Idref > Idrefs; + + // URI. + // + typedef ::xsd::cxx::tree::uri< char, SimpleType > Uri; + + // Qualified name. + // + typedef ::xsd::cxx::tree::qname< char, SimpleType, Uri, Ncname > Qname; + + // Binary. + // + typedef ::xsd::cxx::tree::buffer< char > Buffer; + typedef ::xsd::cxx::tree::base64_binary< char, SimpleType > Base64Binary; + typedef ::xsd::cxx::tree::hex_binary< char, SimpleType > HexBinary; + + // Date/time. + // + typedef ::xsd::cxx::tree::time_zone TimeZone; + typedef ::xsd::cxx::tree::date< char, SimpleType > Date; + typedef ::xsd::cxx::tree::date_time< char, SimpleType > DateTime; + typedef ::xsd::cxx::tree::duration< char, SimpleType > Duration; + typedef ::xsd::cxx::tree::gday< char, SimpleType > Gday; + typedef ::xsd::cxx::tree::gmonth< char, SimpleType > Gmonth; + typedef ::xsd::cxx::tree::gmonth_day< char, SimpleType > GmonthDay; + typedef ::xsd::cxx::tree::gyear< char, SimpleType > Gyear; + typedef ::xsd::cxx::tree::gyear_month< char, SimpleType > GyearMonth; + typedef ::xsd::cxx::tree::time< char, SimpleType > Time; + + // Entity. + // + typedef ::xsd::cxx::tree::entity< char, Ncname > Entity; + typedef ::xsd::cxx::tree::entities< char, SimpleType, Entity > Entities; + + typedef ::xsd::cxx::tree::content_order ContentOrder; + // Namespace information and list stream. Used in + // serialization functions. + // + typedef ::xsd::cxx::xml::dom::namespace_info< char > NamespaceInfo; + typedef ::xsd::cxx::xml::dom::namespace_infomap< char > NamespaceInfomap; + typedef ::xsd::cxx::tree::list_stream< char > ListStream; + typedef ::xsd::cxx::tree::as_double< Double > AsDouble; + typedef ::xsd::cxx::tree::as_decimal< Decimal > AsDecimal; + typedef ::xsd::cxx::tree::facet Facet; + + // Flags and properties. + // + typedef ::xsd::cxx::tree::flags Flags; + typedef ::xsd::cxx::tree::properties< char > Properties; + + // Parsing/serialization diagnostics. + // + typedef ::xsd::cxx::tree::severity Severity; + typedef ::xsd::cxx::tree::error< char > Error; + typedef ::xsd::cxx::tree::diagnostics< char > Diagnostics; + + // Exceptions. + // + typedef ::xsd::cxx::tree::exception< char > Exception; + typedef ::xsd::cxx::tree::bounds< char > Bounds; + typedef ::xsd::cxx::tree::duplicate_id< char > DuplicateId; + typedef ::xsd::cxx::tree::parsing< char > Parsing; + typedef ::xsd::cxx::tree::expected_element< char > ExpectedElement; + typedef ::xsd::cxx::tree::unexpected_element< char > UnexpectedElement; + typedef ::xsd::cxx::tree::expected_attribute< char > ExpectedAttribute; + typedef ::xsd::cxx::tree::unexpected_enumerator< char > UnexpectedEnumerator; + typedef ::xsd::cxx::tree::expected_text_content< char > ExpectedTextContent; + typedef ::xsd::cxx::tree::no_prefix_mapping< char > NoPrefixMapping; + typedef ::xsd::cxx::tree::serialization< char > Serialization; + + // Error handler callback interface. + // + typedef ::xsd::cxx::xml::error_handler< char > ErrorHandler; + + // DOM interaction. + // + namespace dom + { + // Automatic pointer for DOMDocument. + // + using ::xsd::cxx::xml::dom::unique_ptr; + +#ifndef XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA +#define XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA + // DOM user data key for back pointers to tree nodes. + // + const XMLCh* const treeNodeKey = ::xsd::cxx::tree::user_data_keys::node; +#endif + } +} + +// Forward declarations. +// +namespace resource_lists +{ + class ListType; + class EntryType; + class Entry_refType; + class ExternalType; + class Display_nameType; + class List; + class Display_name; + class Resource_lists; +} + + +#include // ::std::unique_ptr +#include // std::numeric_limits +#include // std::binary_search +#include // std::move + +#include + +#include +#include +#include +#include + +#include + +#include + +#include "xml.h" + +namespace resource_lists +{ + class ListType: public ::xml_schema::Type + { + public: + // display-name + // + typedef ::resource_lists::Display_nameType Display_nameType; + typedef ::xsd::cxx::tree::optional< Display_nameType > Display_nameOptional; + typedef ::xsd::cxx::tree::traits< Display_nameType, char > Display_nameTraits; + + const Display_nameOptional& + getDisplay_name () const; + + Display_nameOptional& + getDisplay_name (); + + void + setDisplay_name (const Display_nameType& x); + + void + setDisplay_name (const Display_nameOptional& x); + + void + setDisplay_name (::std::unique_ptr< Display_nameType > p); + + // list + // + typedef ::resource_lists::List ListType1; + typedef ::xsd::cxx::tree::sequence< ListType1 > ListSequence; + typedef ListSequence::iterator ListIterator; + typedef ListSequence::const_iterator ListConstIterator; + typedef ::xsd::cxx::tree::traits< ListType1, char > ListTraits; + + const ListSequence& + getList () const; + + ListSequence& + getList (); + + void + setList (const ListSequence& s); + + // external + // + typedef ::resource_lists::ExternalType ExternalType; + typedef ::xsd::cxx::tree::sequence< ExternalType > ExternalSequence; + typedef ExternalSequence::iterator ExternalIterator; + typedef ExternalSequence::const_iterator ExternalConstIterator; + typedef ::xsd::cxx::tree::traits< ExternalType, char > ExternalTraits; + + const ExternalSequence& + getExternal () const; + + ExternalSequence& + getExternal (); + + void + setExternal (const ExternalSequence& s); + + // entry + // + typedef ::resource_lists::EntryType EntryType; + typedef ::xsd::cxx::tree::sequence< EntryType > EntrySequence; + typedef EntrySequence::iterator EntryIterator; + typedef EntrySequence::const_iterator EntryConstIterator; + typedef ::xsd::cxx::tree::traits< EntryType, char > EntryTraits; + + const EntrySequence& + getEntry () const; + + EntrySequence& + getEntry (); + + void + setEntry (const EntrySequence& s); + + // entry-ref + // + typedef ::resource_lists::Entry_refType Entry_refType; + typedef ::xsd::cxx::tree::sequence< Entry_refType > Entry_refSequence; + typedef Entry_refSequence::iterator Entry_refIterator; + typedef Entry_refSequence::const_iterator Entry_refConstIterator; + typedef ::xsd::cxx::tree::traits< Entry_refType, char > Entry_refTraits; + + const Entry_refSequence& + getEntry_ref () const; + + Entry_refSequence& + getEntry_ref (); + + void + setEntry_ref (const Entry_refSequence& s); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // name + // + typedef ::xml_schema::String NameType; + typedef ::xsd::cxx::tree::optional< NameType > NameOptional; + typedef ::xsd::cxx::tree::traits< NameType, char > NameTraits; + + const NameOptional& + getName () const; + + NameOptional& + getName (); + + void + setName (const NameType& x); + + void + setName (const NameOptional& x); + + void + setName (::std::unique_ptr< NameType > p); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + ListType (); + + ListType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + ListType (const ListType& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual ListType* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + ListType& + operator= (const ListType& x); + + virtual + ~ListType (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_nameOptional display_name_; + ListSequence list_; + ExternalSequence external_; + EntrySequence entry_; + Entry_refSequence entry_ref_; + AnySequence any_; + NameOptional name_; + AnyAttributeSet any_attribute_; + }; + + class EntryType: public ::xml_schema::Type + { + public: + // display-name + // + typedef ::resource_lists::Display_name Display_nameType; + typedef ::xsd::cxx::tree::optional< Display_nameType > Display_nameOptional; + typedef ::xsd::cxx::tree::traits< Display_nameType, char > Display_nameTraits; + + const Display_nameOptional& + getDisplay_name () const; + + Display_nameOptional& + getDisplay_name (); + + void + setDisplay_name (const Display_nameType& x); + + void + setDisplay_name (const Display_nameOptional& x); + + void + setDisplay_name (::std::unique_ptr< Display_nameType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // uri + // + typedef ::xml_schema::Uri UriType; + typedef ::xsd::cxx::tree::traits< UriType, char > UriTraits; + + const UriType& + getUri () const; + + UriType& + getUri (); + + void + setUri (const UriType& x); + + void + setUri (::std::unique_ptr< UriType > p); + + ::std::unique_ptr< UriType > + detachUri (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + EntryType (const UriType&); + + EntryType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + EntryType (const EntryType& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual EntryType* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + EntryType& + operator= (const EntryType& x); + + virtual + ~EntryType (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_nameOptional display_name_; + AnySequence any_; + ::xsd::cxx::tree::one< UriType > uri_; + AnyAttributeSet any_attribute_; + }; + + class Entry_refType: public ::xml_schema::Type + { + public: + // display-name + // + typedef ::resource_lists::Display_nameType Display_nameType; + typedef ::xsd::cxx::tree::optional< Display_nameType > Display_nameOptional; + typedef ::xsd::cxx::tree::traits< Display_nameType, char > Display_nameTraits; + + const Display_nameOptional& + getDisplay_name () const; + + Display_nameOptional& + getDisplay_name (); + + void + setDisplay_name (const Display_nameType& x); + + void + setDisplay_name (const Display_nameOptional& x); + + void + setDisplay_name (::std::unique_ptr< Display_nameType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // ref + // + typedef ::xml_schema::Uri RefType; + typedef ::xsd::cxx::tree::traits< RefType, char > RefTraits; + + const RefType& + getRef () const; + + RefType& + getRef (); + + void + setRef (const RefType& x); + + void + setRef (::std::unique_ptr< RefType > p); + + ::std::unique_ptr< RefType > + detachRef (); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + Entry_refType (const RefType&); + + Entry_refType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Entry_refType (const Entry_refType& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Entry_refType* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Entry_refType& + operator= (const Entry_refType& x); + + virtual + ~Entry_refType (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_nameOptional display_name_; + AnySequence any_; + ::xsd::cxx::tree::one< RefType > ref_; + AnyAttributeSet any_attribute_; + }; + + class ExternalType: public ::xml_schema::Type + { + public: + // display-name + // + typedef ::resource_lists::Display_nameType Display_nameType; + typedef ::xsd::cxx::tree::optional< Display_nameType > Display_nameOptional; + typedef ::xsd::cxx::tree::traits< Display_nameType, char > Display_nameTraits; + + const Display_nameOptional& + getDisplay_name () const; + + Display_nameOptional& + getDisplay_name (); + + void + setDisplay_name (const Display_nameType& x); + + void + setDisplay_name (const Display_nameOptional& x); + + void + setDisplay_name (::std::unique_ptr< Display_nameType > p); + + // any + // + typedef ::xsd::cxx::tree::element_sequence AnySequence; + typedef AnySequence::iterator AnyIterator; + typedef AnySequence::const_iterator AnyConstIterator; + + const AnySequence& + getAny () const; + + AnySequence& + getAny (); + + void + setAny (const AnySequence& s); + + // anchor + // + typedef ::xml_schema::Uri AnchorType; + typedef ::xsd::cxx::tree::optional< AnchorType > AnchorOptional; + typedef ::xsd::cxx::tree::traits< AnchorType, char > AnchorTraits; + + const AnchorOptional& + getAnchor () const; + + AnchorOptional& + getAnchor (); + + void + setAnchor (const AnchorType& x); + + void + setAnchor (const AnchorOptional& x); + + void + setAnchor (::std::unique_ptr< AnchorType > p); + + // any_attribute + // + typedef ::xsd::cxx::tree::attribute_set< char > AnyAttributeSet; + typedef AnyAttributeSet::iterator AnyAttributeIterator; + typedef AnyAttributeSet::const_iterator AnyAttributeConstIterator; + + const AnyAttributeSet& + getAnyAttribute () const; + + AnyAttributeSet& + getAnyAttribute (); + + void + setAnyAttribute (const AnyAttributeSet& s); + + // DOMDocument for wildcard content. + // + const ::xercesc::DOMDocument& + getDomDocument () const; + + ::xercesc::DOMDocument& + getDomDocument (); + + // Constructors. + // + ExternalType (); + + ExternalType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + ExternalType (const ExternalType& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual ExternalType* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + ExternalType& + operator= (const ExternalType& x); + + virtual + ~ExternalType (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dom_document_; + + Display_nameOptional display_name_; + AnySequence any_; + AnchorOptional anchor_; + AnyAttributeSet any_attribute_; + }; + + class Display_nameType: public ::xml_schema::String + { + public: + // lang + // + typedef ::namespace_::Lang LangType; + typedef ::xsd::cxx::tree::optional< LangType > LangOptional; + typedef ::xsd::cxx::tree::traits< LangType, char > LangTraits; + + const LangOptional& + getLang () const; + + LangOptional& + getLang (); + + void + setLang (const LangType& x); + + void + setLang (const LangOptional& x); + + void + setLang (::std::unique_ptr< LangType > p); + + // Constructors. + // + Display_nameType (); + + Display_nameType (const char*); + + Display_nameType (const ::std::string&); + + Display_nameType (const ::xml_schema::String&); + + Display_nameType (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Display_nameType (const Display_nameType& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Display_nameType* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Display_nameType& + operator= (const Display_nameType& x); + + virtual + ~Display_nameType (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + LangOptional lang_; + }; + + class List: public ::resource_lists::ListType + { + public: + // Constructors. + // + List (); + + List (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + List (const List& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual List* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + virtual + ~List (); + }; + + class Display_name: public ::resource_lists::Display_nameType + { + public: + // Constructors. + // + Display_name (); + + Display_name (const char*); + + Display_name (const ::std::string&); + + Display_name (const ::xml_schema::String&); + + Display_name (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Display_name (const Display_name& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Display_name* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + virtual + ~Display_name (); + }; + + class Resource_lists: public ::xml_schema::Type + { + public: + // list + // + typedef ::resource_lists::ListType ListType; + typedef ::xsd::cxx::tree::sequence< ListType > ListSequence; + typedef ListSequence::iterator ListIterator; + typedef ListSequence::const_iterator ListConstIterator; + typedef ::xsd::cxx::tree::traits< ListType, char > ListTraits; + + const ListSequence& + getList () const; + + ListSequence& + getList (); + + void + setList (const ListSequence& s); + + // Constructors. + // + Resource_lists (); + + Resource_lists (const ::xercesc::DOMElement& e, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + Resource_lists (const Resource_lists& x, + ::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0); + + virtual Resource_lists* + _clone (::xml_schema::Flags f = 0, + ::xml_schema::Container* c = 0) const; + + Resource_lists& + operator= (const Resource_lists& x); + + virtual + ~Resource_lists (); + + // Implementation. + // + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::Flags); + + protected: + ListSequence list_; + }; +} + +#include + +namespace resource_lists +{ + ::std::ostream& + operator<< (::std::ostream&, const ListType&); + + ::std::ostream& + operator<< (::std::ostream&, const EntryType&); + + ::std::ostream& + operator<< (::std::ostream&, const Entry_refType&); + + ::std::ostream& + operator<< (::std::ostream&, const ExternalType&); + + ::std::ostream& + operator<< (::std::ostream&, const Display_nameType&); + + ::std::ostream& + operator<< (::std::ostream&, const List&); + + ::std::ostream& + operator<< (::std::ostream&, const Display_name&); + + ::std::ostream& + operator<< (::std::ostream&, const Resource_lists&); +} + +#include + +#include +#include +#include + +namespace resource_lists +{ + // Parse a URI or a local file. + // + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (const ::std::string& uri, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (const ::std::string& uri, + ::xml_schema::ErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (const ::std::string& uri, + ::xercesc::DOMErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + // Parse std::istream. + // + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + ::xml_schema::ErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + ::xercesc::DOMErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + const ::std::string& id, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + const ::std::string& id, + ::xml_schema::ErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::std::istream& is, + const ::std::string& id, + ::xercesc::DOMErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + // Parse xercesc::InputSource. + // + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::xercesc::InputSource& is, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::xercesc::InputSource& is, + ::xml_schema::ErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::xercesc::InputSource& is, + ::xercesc::DOMErrorHandler& eh, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + // Parse xercesc::DOMDocument. + // + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (const ::xercesc::DOMDocument& d, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); + + ::std::unique_ptr< ::resource_lists::Resource_lists > + parseResource_lists (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d, + ::xml_schema::Flags f = 0, + const ::xml_schema::Properties& p = ::xml_schema::Properties ()); +} + +#include + +#include +#include +#include + +#include + +namespace resource_lists +{ + void + operator<< (::xercesc::DOMElement&, const ListType&); + + void + operator<< (::xercesc::DOMElement&, const EntryType&); + + void + operator<< (::xercesc::DOMElement&, const Entry_refType&); + + void + operator<< (::xercesc::DOMElement&, const ExternalType&); + + // Serialize to std::ostream. + // + + void + serializeResource_lists (::std::ostream& os, + const ::resource_lists::Resource_lists& x, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + void + serializeResource_lists (::std::ostream& os, + const ::resource_lists::Resource_lists& x, + ::xml_schema::ErrorHandler& eh, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + void + serializeResource_lists (::std::ostream& os, + const ::resource_lists::Resource_lists& x, + ::xercesc::DOMErrorHandler& eh, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + // Serialize to xercesc::XMLFormatTarget. + // + + void + serializeResource_lists (::xercesc::XMLFormatTarget& ft, + const ::resource_lists::Resource_lists& x, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + void + serializeResource_lists (::xercesc::XMLFormatTarget& ft, + const ::resource_lists::Resource_lists& x, + ::xml_schema::ErrorHandler& eh, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + void + serializeResource_lists (::xercesc::XMLFormatTarget& ft, + const ::resource_lists::Resource_lists& x, + ::xercesc::DOMErrorHandler& eh, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + const ::std::string& e = "UTF-8", + ::xml_schema::Flags f = 0); + + // Serialize to an existing xercesc::DOMDocument. + // + + void + serializeResource_lists (::xercesc::DOMDocument& d, + const ::resource_lists::Resource_lists& x, + ::xml_schema::Flags f = 0); + + // Serialize to a new xercesc::DOMDocument. + // + + ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > + serializeResource_lists (const ::resource_lists::Resource_lists& x, + const ::xml_schema::NamespaceInfomap& m = ::xml_schema::NamespaceInfomap (), + ::xml_schema::Flags f = 0); + + void + operator<< (::xercesc::DOMElement&, const Display_nameType&); + + void + operator<< (::xercesc::DOMElement&, const List&); + + void + operator<< (::xercesc::DOMElement&, const Display_name&); + + void + operator<< (::xercesc::DOMElement&, const Resource_lists&); +} + +#include + +// Begin epilogue. +// +// +// End epilogue. + +#endif // XML_RESOURCE_LISTS_H