Use xsd for imdn xml handling.

This commit is contained in:
Ghislain MARY 2018-04-17 11:43:12 +02:00
parent 41259c585a
commit 9c4cd6cd60
19 changed files with 6942 additions and 274 deletions

View file

@ -164,6 +164,8 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
utils/payload-type-handler.h
variant/variant.h
xml/conference-info.h
xml/imdn.h
xml/linphone-imdn.h
xml/resource-lists.h
xml/xml.h
)
@ -286,6 +288,8 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
utils/utils.cpp
variant/variant.cpp
xml/conference-info.cpp
xml/imdn.cpp
xml/linphone-imdn.cpp
xml/resource-lists.cpp
xml/xml.cpp
)

View file

@ -23,6 +23,8 @@
#include "chat/chat-room/chat-room-p.h"
#include "core/core.h"
#include "logger/logger.h"
#include "xml/imdn.h"
#include "xml/linphone-imdn.h"
#include "imdn.h"
@ -32,8 +34,6 @@ using namespace std;
LINPHONE_BEGIN_NAMESPACE
const string Imdn::imdnPrefix = "/imdn:imdn";
// -----------------------------------------------------------------------------
Imdn::Imdn (ChatRoom *chatRoom) : chatRoom(chatRoom) {}
@ -74,184 +74,75 @@ void Imdn::notifyDisplay (const shared_ptr<ChatMessage> &message) {
// -----------------------------------------------------------------------------
string Imdn::createXml (const string &id, time_t time, Imdn::Type imdnType, LinphoneReason reason) {
xmlBufferPtr buf;
xmlTextWriterPtr writer;
int err;
string content;
char *datetime = nullptr;
// Check that the chat message has a message id.
if (id.empty())
return content;
buf = xmlBufferCreate();
if (buf == nullptr) {
lError() << "Error creating the XML buffer";
return content;
}
writer = xmlNewTextWriterMemory(buf, 0);
if (writer == nullptr) {
lError() << "Error creating the XML writer";
return content;
}
datetime = linphone_timestamp_to_rfc3339_string(time);
err = xmlTextWriterStartDocument(writer, "1.0", "UTF-8", nullptr);
if (err >= 0) {
err = xmlTextWriterStartElementNS(writer, nullptr, (const xmlChar *)"imdn",
(const xmlChar *)"urn:ietf:params:xml:ns:imdn");
}
if ((err >= 0) && (reason != LinphoneReasonNone)) {
err = xmlTextWriterWriteAttributeNS(writer, (const xmlChar *)"xmlns", (const xmlChar *)"linphoneimdn", nullptr, (const xmlChar *)"http://www.linphone.org/xsds/imdn.xsd");
}
if (err >= 0) {
err = xmlTextWriterWriteElement(writer, (const xmlChar *)"message-id", (const xmlChar *)id.c_str());
}
if (err >= 0) {
err = xmlTextWriterWriteElement(writer, (const xmlChar *)"datetime", (const xmlChar *)datetime);
}
if (err >= 0) {
if (imdnType == Imdn::Type::Delivery) {
err = xmlTextWriterStartElement(writer, (const xmlChar *)"delivery-notification");
} else {
err = xmlTextWriterStartElement(writer, (const xmlChar *)"display-notification");
}
}
if (err >= 0) {
err = xmlTextWriterStartElement(writer, (const xmlChar *)"status");
}
if (err >= 0) {
if (reason == LinphoneReasonNone) {
if (imdnType == Imdn::Type::Delivery) {
err = xmlTextWriterStartElement(writer, (const xmlChar *)"delivered");
} else {
err = xmlTextWriterStartElement(writer, (const xmlChar *)"displayed");
}
} else {
err = xmlTextWriterStartElement(writer, (const xmlChar *)"error");
}
}
if (err >= 0) {
// Close the "delivered", "displayed" or "error" element.
err = xmlTextWriterEndElement(writer);
}
if ((err >= 0) && (reason != LinphoneReasonNone)) {
err = xmlTextWriterStartElementNS(writer, (const xmlChar *)"linphoneimdn", (const xmlChar *)"reason", nullptr);
if (err >= 0) {
char codestr[16];
snprintf(codestr, 16, "%d", linphone_reason_to_error_code(reason));
err = xmlTextWriterWriteAttribute(writer, (const xmlChar *)"code", (const xmlChar *)codestr);
}
if (err >= 0) {
err = xmlTextWriterWriteString(writer, (const xmlChar *)linphone_reason_to_string(reason));
}
if (err >= 0) {
err = xmlTextWriterEndElement(writer);
}
}
if (err >= 0) {
// Close the "status" element.
err = xmlTextWriterEndElement(writer);
}
if (err >= 0) {
// Close the "delivery-notification" or "display-notification" element.
err = xmlTextWriterEndElement(writer);
}
if (err >= 0) {
// Close the "imdn" element.
err = xmlTextWriterEndElement(writer);
}
if (err >= 0) {
err = xmlTextWriterEndDocument(writer);
}
if (err > 0) {
// xmlTextWriterEndDocument returns the size of the content.
content = string((char *)buf->content);
}
xmlFreeTextWriter(writer);
xmlBufferFree(buf);
string Imdn::createXml (const string &id, time_t timestamp, Imdn::Type imdnType, LinphoneReason reason) {
char *datetime = linphone_timestamp_to_rfc3339_string(timestamp);
Xsd::Imdn::Imdn imdn(id, datetime);
ms_free(datetime);
return content;
if (imdnType == Imdn::Type::Delivery) {
Xsd::Imdn::Status status;
if (reason == LinphoneReasonNone) {
auto delivered = Xsd::Imdn::Delivered();
status.setDelivered(delivered);
} else {
auto failed = Xsd::Imdn::Failed();
status.setFailed(failed);
Xsd::LinphoneImdn::ImdnReason imdnReason(linphone_reason_to_string(reason));
imdnReason.setCode(linphone_reason_to_error_code(reason));
status.setReason(imdnReason);
}
Xsd::Imdn::DeliveryNotification deliveryNotification(status);
imdn.setDeliveryNotification(deliveryNotification);
} else if (imdnType == Imdn::Type::Display) {
Xsd::Imdn::Status1 status;
auto displayed = Xsd::Imdn::Displayed();
status.setDisplayed(displayed);
Xsd::Imdn::DisplayNotification displayNotification(status);
imdn.setDisplayNotification(displayNotification);
}
stringstream ss;
Xsd::XmlSchema::NamespaceInfomap map;
map[""].name = "urn:ietf:params:xml:ns:imdn";
map["imdn"].name = "http://www.linphone.org/xsds/imdn.xsd";
Xsd::Imdn::serializeImdn(ss, imdn, map);
return ss.str();
}
void Imdn::parse (const shared_ptr<ChatMessage> &chatMessage) {
xmlparsing_context_t *xmlCtx = linphone_xmlparsing_context_new();
xmlSetGenericErrorFunc(xmlCtx, linphone_xmlparsing_genericxml_error);
xmlCtx->doc = xmlReadDoc((const unsigned char *)chatMessage->getPrivate()->getText().c_str(), 0, nullptr, 0);
if (xmlCtx->doc)
parse(chatMessage, xmlCtx);
else
lWarning() << "Wrongly formatted IMDN XML: " << xmlCtx->errorBuffer;
linphone_xmlparsing_context_destroy(xmlCtx);
shared_ptr<AbstractChatRoom> cr = chatMessage->getChatRoom();
for (const auto &content : chatMessage->getPrivate()->getContents()) {
istringstream data(content->getBodyAsString());
unique_ptr<Xsd::Imdn::Imdn> imdn(Xsd::Imdn::parseImdn(data, Xsd::XmlSchema::Flags::dont_validate));
if (!imdn)
continue;
shared_ptr<ChatMessage> cm = cr->findChatMessage(imdn->getMessageId());
if (!cm) {
lWarning() << "Received IMDN for unknown message " << imdn->getMessageId();
} else {
auto policy = linphone_core_get_im_notif_policy(cr->getCore()->getCCore());
time_t imdnTime = chatMessage->getTime();
const IdentityAddress &participantAddress = chatMessage->getFromAddress().getAddressWithoutGruu();
auto &deliveryNotification = imdn->getDeliveryNotification();
auto &displayNotification = imdn->getDisplayNotification();
if (deliveryNotification.present()) {
auto &status = deliveryNotification.get().getStatus();
if (status.getDelivered().present() && linphone_im_notif_policy_get_recv_imdn_delivered(policy))
cm->getPrivate()->setParticipantState(participantAddress, ChatMessage::State::DeliveredToUser, imdnTime);
else if ((status.getFailed().present() || status.getError().present())
&& linphone_im_notif_policy_get_recv_imdn_delivered(policy)
)
cm->getPrivate()->setParticipantState(participantAddress, ChatMessage::State::NotDelivered, imdnTime);
} else if (displayNotification.present()) {
auto &status = displayNotification.get().getStatus();
if (status.getDisplayed().present() && linphone_im_notif_policy_get_recv_imdn_displayed(policy))
cm->getPrivate()->setParticipantState(participantAddress, ChatMessage::State::Displayed, imdnTime);
}
}
}
}
// -----------------------------------------------------------------------------
void Imdn::parse (const shared_ptr<ChatMessage> &imdnMessage, xmlparsing_context_t *xmlCtx) {
char xpathStr[MAX_XPATH_LENGTH];
char *messageIdStr = nullptr;
char *datetimeStr = nullptr;
if (linphone_create_xml_xpath_context(xmlCtx) < 0)
return;
xmlXPathRegisterNs(xmlCtx->xpath_ctx, (const xmlChar *)"imdn", (const xmlChar *)"urn:ietf:params:xml:ns:imdn");
xmlXPathObjectPtr imdnObject = linphone_get_xml_xpath_object_for_node_list(xmlCtx, imdnPrefix.c_str());
if (imdnObject) {
if (imdnObject->nodesetval && (imdnObject->nodesetval->nodeNr >= 1)) {
snprintf(xpathStr, sizeof(xpathStr), "%s[1]/imdn:message-id", imdnPrefix.c_str());
messageIdStr = linphone_get_xml_text_content(xmlCtx, xpathStr);
snprintf(xpathStr, sizeof(xpathStr), "%s[1]/imdn:datetime", imdnPrefix.c_str());
datetimeStr = linphone_get_xml_text_content(xmlCtx, xpathStr);
}
xmlXPathFreeObject(imdnObject);
}
if (messageIdStr && datetimeStr) {
shared_ptr<AbstractChatRoom> cr = imdnMessage->getChatRoom();
shared_ptr<ChatMessage> cm = cr->findChatMessage(messageIdStr);
const IdentityAddress &participantAddress = imdnMessage->getFromAddress().getAddressWithoutGruu();
if (!cm) {
lWarning() << "Received IMDN for unknown message " << messageIdStr;
} else {
time_t imdnTime = imdnMessage->getTime();
LinphoneImNotifPolicy *policy = linphone_core_get_im_notif_policy(cr->getCore()->getCCore());
snprintf(xpathStr, sizeof(xpathStr), "%s[1]/imdn:delivery-notification/imdn:status", imdnPrefix.c_str());
xmlXPathObjectPtr deliveryStatusObject = linphone_get_xml_xpath_object_for_node_list(xmlCtx, xpathStr);
snprintf(xpathStr, sizeof(xpathStr), "%s[1]/imdn:display-notification/imdn:status", imdnPrefix.c_str());
xmlXPathObjectPtr displayStatusObject = linphone_get_xml_xpath_object_for_node_list(xmlCtx, xpathStr);
if (deliveryStatusObject && linphone_im_notif_policy_get_recv_imdn_delivered(policy)) {
if (deliveryStatusObject->nodesetval && (deliveryStatusObject->nodesetval->nodeNr >= 1)) {
xmlNodePtr node = deliveryStatusObject->nodesetval->nodeTab[0];
if (node->children && node->children->name) {
if (strcmp((const char *)node->children->name, "delivered") == 0) {
cm->getPrivate()->setParticipantState(participantAddress, ChatMessage::State::DeliveredToUser, imdnTime);
} else if (strcmp((const char *)node->children->name, "error") == 0) {
cm->getPrivate()->setParticipantState(participantAddress, ChatMessage::State::NotDelivered, imdnTime);
}
}
}
xmlXPathFreeObject(deliveryStatusObject);
}
if (displayStatusObject && linphone_im_notif_policy_get_recv_imdn_displayed(policy)) {
if (displayStatusObject->nodesetval && (displayStatusObject->nodesetval->nodeNr >= 1)) {
xmlNodePtr node = displayStatusObject->nodesetval->nodeTab[0];
if (node->children && node->children->name) {
if (strcmp((const char *)node->children->name, "displayed") == 0) {
cm->getPrivate()->setParticipantState(participantAddress, ChatMessage::State::Displayed, imdnTime);
}
}
}
xmlXPathFreeObject(displayStatusObject);
}
}
}
if (messageIdStr)
linphone_free_xml_text_content(messageIdStr);
if (datetimeStr)
linphone_free_xml_text_content(datetimeStr);
}
int Imdn::timerExpired (void *data, unsigned int revents) {
Imdn *d = reinterpret_cast<Imdn *>(data);
d->stopTimer();

View file

@ -57,7 +57,6 @@ public:
static void parse (const std::shared_ptr<ChatMessage> &chatMessage);
private:
static void parse (const std::shared_ptr<ChatMessage> &chatMessage, xmlparsing_context_t *xmlCtx);
static int timerExpired (void *data, unsigned int revents);
void send ();
@ -65,8 +64,6 @@ private:
void stopTimer ();
private:
static const std::string imdnPrefix;
ChatRoom *chatRoom = nullptr;
std::list<const std::shared_ptr<ChatMessage>> deliveredMessages;
std::list<const std::shared_ptr<ChatMessage>> displayedMessages;

View file

@ -36,9 +36,10 @@
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
//
// End prologue.
@ -54,7 +55,7 @@ namespace LinphonePrivate
namespace ConferenceInfo
{
// ConferenceType
//
//
const ConferenceType::ConferenceDescriptionOptional& ConferenceType::
getConferenceDescription () const
@ -376,7 +377,7 @@ namespace LinphonePrivate
// StateType
//
//
StateType::
StateType (Value v)
@ -413,7 +414,7 @@ namespace LinphonePrivate
StateType& StateType::
operator= (Value v)
{
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
::LinphonePrivate::Xsd::XmlSchema::String (_xsd_StateType_literals_[v]);
return *this;
@ -421,7 +422,7 @@ namespace LinphonePrivate
// ConferenceDescriptionType
//
//
const ConferenceDescriptionType::DisplayTextOptional& ConferenceDescriptionType::
getDisplayText () const
@ -707,7 +708,7 @@ namespace LinphonePrivate
// HostType
//
//
const HostType::DisplayTextOptional& HostType::
getDisplayText () const
@ -849,7 +850,7 @@ namespace LinphonePrivate
// ConferenceStateType
//
//
const ConferenceStateType::UserCountOptional& ConferenceStateType::
getUserCount () const
@ -973,7 +974,7 @@ namespace LinphonePrivate
// ConferenceMediaType
//
//
const ConferenceMediaType::EntrySequence& ConferenceMediaType::
getEntry () const
@ -1025,7 +1026,7 @@ namespace LinphonePrivate
// ConferenceMediumType
//
//
const ConferenceMediumType::DisplayTextOptional& ConferenceMediumType::
getDisplayText () const
@ -1197,7 +1198,7 @@ namespace LinphonePrivate
// UrisType
//
//
const UrisType::EntrySequence& UrisType::
getEntry () const
@ -1285,7 +1286,7 @@ namespace LinphonePrivate
// UriType
//
//
const UriType::UriType1& UriType::
getUri () const
@ -1481,7 +1482,7 @@ namespace LinphonePrivate
}
// UsersType
//
//
const UsersType::UserSequence& UsersType::
getUser () const
@ -1587,7 +1588,7 @@ namespace LinphonePrivate
// UserType
//
//
const UserType::DisplayTextOptional& UserType::
getDisplayText () const
@ -1873,7 +1874,7 @@ namespace LinphonePrivate
// UserRolesType
//
//
const UserRolesType::EntrySequence& UserRolesType::
getEntry () const
@ -1949,7 +1950,7 @@ namespace LinphonePrivate
}
// EndpointType
//
//
const EndpointType::DisplayTextOptional& EndpointType::
getDisplayText () const
@ -2325,7 +2326,7 @@ namespace LinphonePrivate
// EndpointStatusType
//
//
EndpointStatusType::
EndpointStatusType (Value v)
@ -2362,7 +2363,7 @@ namespace LinphonePrivate
EndpointStatusType& EndpointStatusType::
operator= (Value v)
{
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
::LinphonePrivate::Xsd::XmlSchema::String (_xsd_EndpointStatusType_literals_[v]);
return *this;
@ -2370,7 +2371,7 @@ namespace LinphonePrivate
// JoiningType
//
//
JoiningType::
JoiningType (Value v)
@ -2407,7 +2408,7 @@ namespace LinphonePrivate
JoiningType& JoiningType::
operator= (Value v)
{
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
::LinphonePrivate::Xsd::XmlSchema::String (_xsd_JoiningType_literals_[v]);
return *this;
@ -2415,7 +2416,7 @@ namespace LinphonePrivate
// DisconnectionType
//
//
DisconnectionType::
DisconnectionType (Value v)
@ -2452,7 +2453,7 @@ namespace LinphonePrivate
DisconnectionType& DisconnectionType::
operator= (Value v)
{
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
::LinphonePrivate::Xsd::XmlSchema::String (_xsd_DisconnectionType_literals_[v]);
return *this;
@ -2460,7 +2461,7 @@ namespace LinphonePrivate
// ExecutionType
//
//
const ExecutionType::WhenOptional& ExecutionType::
getWhen () const
@ -2584,7 +2585,7 @@ namespace LinphonePrivate
// CallType
//
//
const CallType::SipOptional& CallType::
getSip () const
@ -2666,7 +2667,7 @@ namespace LinphonePrivate
// SipDialogIdType
//
//
const SipDialogIdType::DisplayTextOptional& SipDialogIdType::
getDisplayText () const
@ -2838,7 +2839,7 @@ namespace LinphonePrivate
// MediaType
//
//
const MediaType::DisplayTextOptional& MediaType::
getDisplayText () const
@ -3070,7 +3071,7 @@ namespace LinphonePrivate
// MediaStatusType
//
//
MediaStatusType::
MediaStatusType (Value v)
@ -3107,7 +3108,7 @@ namespace LinphonePrivate
MediaStatusType& MediaStatusType::
operator= (Value v)
{
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
::LinphonePrivate::Xsd::XmlSchema::String (_xsd_MediaStatusType_literals_[v]);
return *this;
@ -3115,7 +3116,7 @@ namespace LinphonePrivate
// SidebarsByValType
//
//
const SidebarsByValType::EntrySequence& SidebarsByValType::
getEntry () const
@ -3208,6 +3209,15 @@ namespace LinphonePrivate
#include <xsd/cxx/xml/dom/parsing-source.hxx>
#include <xsd/cxx/tree/type-factory-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::type_factory_plate< 0, char >
type_factory_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
@ -6779,6 +6789,15 @@ namespace LinphonePrivate
#include <ostream>
#include <xsd/cxx/tree/std-ostream-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::std_ostream_plate< 0, char >
std_ostream_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
@ -7563,6 +7582,15 @@ namespace LinphonePrivate
#include <xsd/cxx/tree/error-handler.hxx>
#include <xsd/cxx/xml/dom/serialization-source.hxx>
#include <xsd/cxx/tree/type-serializer-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::type_serializer_plate< 0, char >
type_serializer_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
@ -9304,8 +9332,12 @@ namespace LinphonePrivate
// Begin epilogue.
//
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif
//
// End epilogue.

View file

@ -51,9 +51,10 @@
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
//
// End prologue.
@ -240,6 +241,8 @@ namespace LinphonePrivate
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::no_type_info< char > NoTypeInfo;
typedef ::xsd::cxx::tree::not_derived< char > NotDerived;
typedef ::xsd::cxx::tree::serialization< char > Serialization;
// Error handler callback interface.
@ -573,7 +576,7 @@ namespace LinphonePrivate
ConferenceType&
operator= (const ConferenceType& x);
virtual
virtual
~ConferenceType ();
// Implementation.
@ -882,7 +885,7 @@ namespace LinphonePrivate
ConferenceDescriptionType&
operator= (const ConferenceDescriptionType& x);
virtual
virtual
~ConferenceDescriptionType ();
// Implementation.
@ -1030,7 +1033,7 @@ namespace LinphonePrivate
HostType&
operator= (const HostType& x);
virtual
virtual
~HostType ();
// Implementation.
@ -1164,7 +1167,7 @@ namespace LinphonePrivate
ConferenceStateType&
operator= (const ConferenceStateType& x);
virtual
virtual
~ConferenceStateType ();
// Implementation.
@ -1246,7 +1249,7 @@ namespace LinphonePrivate
ConferenceMediaType&
operator= (const ConferenceMediaType& x);
virtual
virtual
~ConferenceMediaType ();
// Implementation.
@ -1406,7 +1409,7 @@ namespace LinphonePrivate
ConferenceMediumType&
operator= (const ConferenceMediumType& x);
virtual
virtual
~ConferenceMediumType ();
// Implementation.
@ -1512,7 +1515,7 @@ namespace LinphonePrivate
UrisType&
operator= (const UrisType& x);
virtual
virtual
~UrisType ();
// Implementation.
@ -1674,7 +1677,7 @@ namespace LinphonePrivate
UriType&
operator= (const UriType& x);
virtual
virtual
~UriType ();
// Implementation.
@ -1730,7 +1733,7 @@ namespace LinphonePrivate
_clone (::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
::LinphonePrivate::Xsd::XmlSchema::Container* c = 0) const;
virtual
virtual
~KeywordsType ();
};
@ -1834,7 +1837,7 @@ namespace LinphonePrivate
UsersType&
operator= (const UsersType& x);
virtual
virtual
~UsersType ();
// Implementation.
@ -2080,7 +2083,7 @@ namespace LinphonePrivate
UserType&
operator= (const UserType& x);
virtual
virtual
~UserType ();
// Implementation.
@ -2168,7 +2171,7 @@ namespace LinphonePrivate
UserRolesType&
operator= (const UserRolesType& x);
virtual
virtual
~UserRolesType ();
// Implementation.
@ -2220,7 +2223,7 @@ namespace LinphonePrivate
_clone (::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
::LinphonePrivate::Xsd::XmlSchema::Container* c = 0) const;
virtual
virtual
~UserLanguagesType ();
};
@ -2513,7 +2516,7 @@ namespace LinphonePrivate
EndpointType&
operator= (const EndpointType& x);
virtual
virtual
~EndpointType ();
// Implementation.
@ -2828,7 +2831,7 @@ namespace LinphonePrivate
ExecutionType&
operator= (const ExecutionType& x);
virtual
virtual
~ExecutionType ();
// Implementation.
@ -2928,7 +2931,7 @@ namespace LinphonePrivate
CallType&
operator= (const CallType& x);
virtual
virtual
~CallType ();
// Implementation.
@ -3089,7 +3092,7 @@ namespace LinphonePrivate
SipDialogIdType&
operator= (const SipDialogIdType& x);
virtual
virtual
~SipDialogIdType ();
// Implementation.
@ -3295,7 +3298,7 @@ namespace LinphonePrivate
MediaType&
operator= (const MediaType& x);
virtual
virtual
~MediaType ();
// Implementation.
@ -3461,7 +3464,7 @@ namespace LinphonePrivate
SidebarsByValType&
operator= (const SidebarsByValType& x);
virtual
virtual
~SidebarsByValType ();
// Implementation.
@ -3708,14 +3711,14 @@ namespace LinphonePrivate
void
serializeConferenceInfo (::std::ostream& os,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
serializeConferenceInfo (::std::ostream& os,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
@ -3723,7 +3726,7 @@ namespace LinphonePrivate
void
serializeConferenceInfo (::std::ostream& os,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
::xercesc::DOMErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
@ -3734,14 +3737,14 @@ namespace LinphonePrivate
void
serializeConferenceInfo (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
serializeConferenceInfo (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
@ -3749,7 +3752,7 @@ namespace LinphonePrivate
void
serializeConferenceInfo (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
::xercesc::DOMErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
@ -3767,7 +3770,7 @@ namespace LinphonePrivate
//
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument >
serializeConferenceInfo (const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
serializeConferenceInfo (const ::LinphonePrivate::Xsd::ConferenceInfo::ConferenceType& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
@ -3899,6 +3902,9 @@ namespace LinphonePrivate
// Begin epilogue.
//
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif

View file

@ -1,3 +1,6 @@
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif

View file

@ -51,6 +51,7 @@ def generate(name):
"--generate-serialization",
"--generate-ostream",
"--generate-detach",
"--generate-polymorphic",
"--std", "c++11",
"--type-naming", "java",
"--function-naming", "java",
@ -62,6 +63,7 @@ def generate(name):
"--show-sloc",
"--prologue-file", prologue_file,
"--epilogue-file", epilogue_file,
"--root-element-first",
"--type-regex", "%(?:[^ ]* )?([^,-]+)-([^,-]+)-([^,-]+)-?([^,-]*)%\\u$1\\u$2\\u$3\\u$4%",
"--type-regex", "%(?:[^ ]* )?([^,-]+)-([^,-]+)-?([^,-]*)%\\u$1\\u$2\\u$3%",
"--type-regex", "%(?:[^ ]* )?([^,-]+)-?([^,-]*)%\\u$1\\u$2%",
@ -90,6 +92,8 @@ def generate(name):
"--serializer-regex", "%([^-]+)-?([^-]*)%serialize\\u$1\\u$2%",
"--namespace-map", "http://www.w3.org/2001/XMLSchema=LinphonePrivate::Xsd::XmlSchema",
"--namespace-map", "urn:ietf:params:xml:ns:conference-info=LinphonePrivate::Xsd::ConferenceInfo",
"--namespace-map", "urn:ietf:params:xml:ns:imdn=LinphonePrivate::Xsd::Imdn",
"--namespace-map", "http://www.linphone.org/xsds/imdn.xsd=LinphonePrivate::Xsd::LinphoneImdn",
"--namespace-map", "urn:ietf:params:xml:ns:resource-lists=LinphonePrivate::Xsd::ResourceLists",
source_file
], shell=False)
@ -100,6 +104,8 @@ def generate(name):
def main(argv = None):
generate("xml")
generate("conference-info")
generate("imdn")
generate("linphone-imdn")
generate("resource-lists")
if __name__ == "__main__":

3440
src/xml/imdn.cpp Normal file

File diff suppressed because it is too large Load diff

1730
src/xml/imdn.h Normal file

File diff suppressed because it is too large Load diff

158
src/xml/imdn.xsd Normal file
View file

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="urn:ietf:params:xml:ns:imdn"
xmlns:ns1="urn:ietf:params:xml:ns:imdn"
xmlns:ns2="http://www.linphone.org/xsds/imdn.xsd">
<xs:import namespace="http://www.linphone.org/xsds/imdn.xsd" schemaLocation="linphone-imdn.xsd"/>
<xs:element name="imdn">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns1:message-id"/>
<xs:element ref="ns1:datetime"/>
<xs:sequence minOccurs="0">
<xs:element ref="ns1:recipient-uri"/>
<xs:element ref="ns1:original-recipient-uri"/>
<xs:element minOccurs="0" ref="ns1:subject"/>
</xs:sequence>
<xs:choice minOccurs="0">
<xs:element ref="ns1:delivery-notification"/>
<xs:element ref="ns1:display-notification"/>
<xs:element ref="ns1:processing-notification"/>
</xs:choice>
<xs:group ref="ns1:imdnExtension"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="message-id" type="xs:token"/>
<xs:element name="datetime" type="xs:string"/>
<xs:element name="recipient-uri" type="xs:anyURI"/>
<xs:element name="original-recipient-uri" type="xs:anyURI"/>
<xs:element name="subject" type="xs:string"/>
<xs:element name="delivery-notification">
<xs:complexType>
<xs:sequence>
<xs:element name="status">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="ns1:delivered"/>
<xs:element ref="ns1:failed"/>
<xs:element ref="ns1:forbidden"/>
<xs:element ref="ns1:error"/>
</xs:choice>
<xs:group ref="ns1:deliveryExtension"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="delivered">
<xs:complexType/>
</xs:element>
<xs:element name="failed">
<xs:complexType/>
</xs:element>
<xs:element name="display-notification">
<xs:complexType>
<xs:sequence>
<xs:element name="status">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="ns1:displayed"/>
<xs:element ref="ns1:forbidden"/>
<xs:element ref="ns1:error"/>
</xs:choice>
<xs:group ref="ns1:displayExtension"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="displayed">
<xs:complexType/>
</xs:element>
<xs:element name="processing-notification">
<xs:complexType>
<xs:sequence>
<xs:element name="status">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="ns1:processed"/>
<xs:element ref="ns1:stored"/>
<xs:element ref="ns1:forbidden"/>
<xs:element ref="ns1:error"/>
</xs:choice>
<xs:group ref="ns1:processingExtension"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="processed">
<xs:complexType/>
</xs:element>
<xs:element name="stored">
<xs:complexType/>
</xs:element>
<xs:element name="forbidden">
<xs:complexType/>
</xs:element>
<xs:element name="error">
<xs:complexType/>
</xs:element>
<!--
<imdn> extension point for the extension schemas to add
new definitions with the combine="interleave" pattern.
Extension schemas should add proper cardinalities. For
example, the <zeroOrMore> cardinality should be used if
the extension is to allow multiple elements, and the
<optional> cardinality should be used if the extension
is to allow a single optional element.
-->
<xs:group name="imdnExtension">
<xs:sequence>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="ns1:anyIMDN"/>
</xs:sequence>
</xs:group>
<!-- delivery-notification <status> extension point -->
<xs:group name="deliveryExtension">
<!--<xs:sequence>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="ns1:anyIMDN"/>
</xs:sequence>-->
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" ref="ns2:reason"/>
</xs:sequence>
</xs:group>
<!-- display-notification <status> extension point -->
<xs:group name="displayExtension">
<xs:sequence>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="ns1:anyIMDN"/>
</xs:sequence>
</xs:group>
<!-- processing-notification <status> extension point -->
<xs:group name="processingExtension">
<xs:sequence>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="ns1:anyIMDN"/>
</xs:sequence>
</xs:group>
<!--
wildcard definition for complex elements (of mixed type)
unqualified or qualified in the imdn namespace.
Extension schemas MUST redefine this or the
individual, previous definitions that use this definition.
In other words, the extension schema MUST reduce the
allowable content in order to maintain deterministic
and unambiguous schemas with the interleave pattern.
-->
<xs:group name="anyIMDN">
<xs:sequence>
<xs:any namespace="##other" processContents="skip"/>
</xs:sequence>
</xs:group>
</xs:schema>

717
src/xml/linphone-imdn.cpp Normal file
View file

@ -0,0 +1,717 @@
// 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.
//
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
//
// End prologue.
#include <xsd/cxx/pre.hxx>
#include "linphone-imdn.h"
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
// ImdnReason
//
const ImdnReason::CodeType& ImdnReason::
getCode () const
{
return this->code_.get ();
}
ImdnReason::CodeType& ImdnReason::
getCode ()
{
return this->code_.get ();
}
void ImdnReason::
setCode (const CodeType& x)
{
this->code_.set (x);
}
ImdnReason::CodeType ImdnReason::
getCodeDefaultValue ()
{
return CodeType (200);
}
}
}
}
#include <xsd/cxx/xml/dom/wildcard-source.hxx>
#include <xsd/cxx/xml/dom/parsing-source.hxx>
#include <xsd/cxx/tree/type-factory-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::type_factory_plate< 0, char >
type_factory_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
// ImdnReason
//
ImdnReason::
ImdnReason ()
: ::LinphonePrivate::Xsd::XmlSchema::String (),
code_ (getCodeDefaultValue (), this)
{
}
ImdnReason::
ImdnReason (const char* _xsd_String_base)
: ::LinphonePrivate::Xsd::XmlSchema::String (_xsd_String_base),
code_ (getCodeDefaultValue (), this)
{
}
ImdnReason::
ImdnReason (const ::std::string& _xsd_String_base)
: ::LinphonePrivate::Xsd::XmlSchema::String (_xsd_String_base),
code_ (getCodeDefaultValue (), this)
{
}
ImdnReason::
ImdnReason (const ::LinphonePrivate::Xsd::XmlSchema::String& _xsd_String_base)
: ::LinphonePrivate::Xsd::XmlSchema::String (_xsd_String_base),
code_ (getCodeDefaultValue (), this)
{
}
ImdnReason::
ImdnReason (const ImdnReason& x,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
::LinphonePrivate::Xsd::XmlSchema::Container* c)
: ::LinphonePrivate::Xsd::XmlSchema::String (x, f, c),
code_ (x.code_, f, this)
{
}
ImdnReason::
ImdnReason (const ::xercesc::DOMElement& e,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
::LinphonePrivate::Xsd::XmlSchema::Container* c)
: ::LinphonePrivate::Xsd::XmlSchema::String (e, f | ::LinphonePrivate::Xsd::XmlSchema::Flags::base, c),
code_ (this)
{
if ((f & ::LinphonePrivate::Xsd::XmlSchema::Flags::base) == 0)
{
::xsd::cxx::xml::dom::parser< char > p (e, false, false, true);
this->parse (p, f);
}
}
void ImdnReason::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::LinphonePrivate::Xsd::XmlSchema::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 () == "code" && n.namespace_ ().empty ())
{
this->code_.set (CodeTraits::create (i, f, this));
continue;
}
}
if (!code_.present ())
{
this->code_.set (getCodeDefaultValue ());
}
}
ImdnReason* ImdnReason::
_clone (::LinphonePrivate::Xsd::XmlSchema::Flags f,
::LinphonePrivate::Xsd::XmlSchema::Container* c) const
{
return new class ImdnReason (*this, f, c);
}
ImdnReason& ImdnReason::
operator= (const ImdnReason& x)
{
if (this != &x)
{
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) = x;
this->code_ = x.code_;
}
return *this;
}
ImdnReason::
~ImdnReason ()
{
}
}
}
}
#include <ostream>
#include <xsd/cxx/tree/std-ostream-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::std_ostream_plate< 0, char >
std_ostream_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
::std::ostream&
operator<< (::std::ostream& o, const ImdnReason& i)
{
o << static_cast< const ::LinphonePrivate::Xsd::XmlSchema::String& > (i);
o << ::std::endl << "code: " << i.getCode ();
return o;
}
}
}
}
#include <istream>
#include <xsd/cxx/xml/sax/std-input-source.hxx>
#include <xsd/cxx/tree/error-handler.hxx>
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (const ::std::string& u,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::xml::auto_initializer i (
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::dont_initialize) == 0,
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom) == 0);
::xsd::cxx::tree::error_handler< char > h;
::LinphonePrivate::Xsd::XmlSchema::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< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > (
::LinphonePrivate::Xsd::LinphoneImdn::parseReason (
std::move (d), f | ::LinphonePrivate::Xsd::XmlSchema::Flags::own_dom, p));
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (const ::std::string& u,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& h,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::xml::auto_initializer i (
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::dont_initialize) == 0,
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom) == 0);
::LinphonePrivate::Xsd::XmlSchema::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< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > (
::LinphonePrivate::Xsd::LinphoneImdn::parseReason (
std::move (d), f | ::LinphonePrivate::Xsd::XmlSchema::Flags::own_dom, p));
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (const ::std::string& u,
::xercesc::DOMErrorHandler& h,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::LinphonePrivate::Xsd::XmlSchema::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< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > (
::LinphonePrivate::Xsd::LinphoneImdn::parseReason (
std::move (d), f | ::LinphonePrivate::Xsd::XmlSchema::Flags::own_dom, p));
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::xml::auto_initializer i (
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::dont_initialize) == 0,
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom) == 0);
::xsd::cxx::xml::sax::std_input_source isrc (is);
return ::LinphonePrivate::Xsd::LinphoneImdn::parseReason (isrc, f, p);
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& h,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::xml::auto_initializer i (
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::dont_initialize) == 0,
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom) == 0);
::xsd::cxx::xml::sax::std_input_source isrc (is);
return ::LinphonePrivate::Xsd::LinphoneImdn::parseReason (isrc, h, f, p);
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
::xercesc::DOMErrorHandler& h,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::xml::sax::std_input_source isrc (is);
return ::LinphonePrivate::Xsd::LinphoneImdn::parseReason (isrc, h, f, p);
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
const ::std::string& sid,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::xml::auto_initializer i (
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::dont_initialize) == 0,
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom) == 0);
::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
return ::LinphonePrivate::Xsd::LinphoneImdn::parseReason (isrc, f, p);
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
const ::std::string& sid,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& h,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::xml::auto_initializer i (
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::dont_initialize) == 0,
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom) == 0);
::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
return ::LinphonePrivate::Xsd::LinphoneImdn::parseReason (isrc, h, f, p);
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
const ::std::string& sid,
::xercesc::DOMErrorHandler& h,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
return ::LinphonePrivate::Xsd::LinphoneImdn::parseReason (isrc, h, f, p);
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::xercesc::InputSource& i,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::xsd::cxx::tree::error_handler< char > h;
::LinphonePrivate::Xsd::XmlSchema::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< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > (
::LinphonePrivate::Xsd::LinphoneImdn::parseReason (
std::move (d), f | ::LinphonePrivate::Xsd::XmlSchema::Flags::own_dom, p));
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::xercesc::InputSource& i,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& h,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::LinphonePrivate::Xsd::XmlSchema::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< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > (
::LinphonePrivate::Xsd::LinphoneImdn::parseReason (
std::move (d), f | ::LinphonePrivate::Xsd::XmlSchema::Flags::own_dom, p));
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::xercesc::InputSource& i,
::xercesc::DOMErrorHandler& h,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
::LinphonePrivate::Xsd::XmlSchema::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< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > (
::LinphonePrivate::Xsd::LinphoneImdn::parseReason (
std::move (d), f | ::LinphonePrivate::Xsd::XmlSchema::Flags::own_dom, p));
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (const ::xercesc::DOMDocument& doc,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p)
{
if (f & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom)
{
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d (
static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (true)));
return ::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > (
::LinphonePrivate::Xsd::LinphoneImdn::parseReason (
std::move (d), f | ::LinphonePrivate::Xsd::XmlSchema::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 () == "reason" &&
n.namespace_ () == "http://www.linphone.org/xsds/imdn.xsd")
{
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > r (
::xsd::cxx::tree::traits< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason, char >::create (
e, f, 0));
return r;
}
throw ::xsd::cxx::tree::unexpected_element < char > (
n.name (),
n.namespace_ (),
"reason",
"http://www.linphone.org/xsds/imdn.xsd");
}
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d,
::LinphonePrivate::Xsd::XmlSchema::Flags f,
const ::LinphonePrivate::Xsd::XmlSchema::Properties&)
{
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > c (
((f & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom) &&
!(f & ::LinphonePrivate::Xsd::XmlSchema::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 & ::LinphonePrivate::Xsd::XmlSchema::Flags::keep_dom)
doc.setUserData (::LinphonePrivate::Xsd::XmlSchema::dom::treeNodeKey,
(c.get () ? &c : &d),
0);
if (n.name () == "reason" &&
n.namespace_ () == "http://www.linphone.org/xsds/imdn.xsd")
{
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason > r (
::xsd::cxx::tree::traits< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason, char >::create (
e, f, 0));
return r;
}
throw ::xsd::cxx::tree::unexpected_element < char > (
n.name (),
n.namespace_ (),
"reason",
"http://www.linphone.org/xsds/imdn.xsd");
}
}
}
}
#include <ostream>
#include <xsd/cxx/tree/error-handler.hxx>
#include <xsd/cxx/xml/dom/serialization-source.hxx>
#include <xsd/cxx/tree/type-serializer-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::type_serializer_plate< 0, char >
type_serializer_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
void
serializeReason (::std::ostream& o,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& s,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m,
const ::std::string& e,
::LinphonePrivate::Xsd::XmlSchema::Flags f)
{
::xsd::cxx::xml::auto_initializer i (
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::dont_initialize) == 0);
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d (
::LinphonePrivate::Xsd::LinphoneImdn::serializeReason (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
serializeReason (::std::ostream& o,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& s,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& h,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m,
const ::std::string& e,
::LinphonePrivate::Xsd::XmlSchema::Flags f)
{
::xsd::cxx::xml::auto_initializer i (
(f & ::LinphonePrivate::Xsd::XmlSchema::Flags::dont_initialize) == 0);
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d (
::LinphonePrivate::Xsd::LinphoneImdn::serializeReason (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
serializeReason (::std::ostream& o,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& s,
::xercesc::DOMErrorHandler& h,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m,
const ::std::string& e,
::LinphonePrivate::Xsd::XmlSchema::Flags f)
{
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d (
::LinphonePrivate::Xsd::LinphoneImdn::serializeReason (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
serializeReason (::xercesc::XMLFormatTarget& t,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& s,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m,
const ::std::string& e,
::LinphonePrivate::Xsd::XmlSchema::Flags f)
{
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d (
::LinphonePrivate::Xsd::LinphoneImdn::serializeReason (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
serializeReason (::xercesc::XMLFormatTarget& t,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& s,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& h,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m,
const ::std::string& e,
::LinphonePrivate::Xsd::XmlSchema::Flags f)
{
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d (
::LinphonePrivate::Xsd::LinphoneImdn::serializeReason (s, m, f));
if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
{
throw ::xsd::cxx::tree::serialization< char > ();
}
}
void
serializeReason (::xercesc::XMLFormatTarget& t,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& s,
::xercesc::DOMErrorHandler& h,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m,
const ::std::string& e,
::LinphonePrivate::Xsd::XmlSchema::Flags f)
{
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d (
::LinphonePrivate::Xsd::LinphoneImdn::serializeReason (s, m, f));
if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
{
throw ::xsd::cxx::tree::serialization< char > ();
}
}
void
serializeReason (::xercesc::DOMDocument& d,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& s,
::LinphonePrivate::Xsd::XmlSchema::Flags)
{
::xercesc::DOMElement& e (*d.getDocumentElement ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (e));
if (n.name () == "reason" &&
n.namespace_ () == "http://www.linphone.org/xsds/imdn.xsd")
{
e << s;
}
else
{
throw ::xsd::cxx::tree::unexpected_element < char > (
n.name (),
n.namespace_ (),
"reason",
"http://www.linphone.org/xsds/imdn.xsd");
}
}
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument >
serializeReason (const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& s,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m,
::LinphonePrivate::Xsd::XmlSchema::Flags f)
{
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d (
::xsd::cxx::xml::dom::serialize< char > (
"reason",
"http://www.linphone.org/xsds/imdn.xsd",
m, f));
::LinphonePrivate::Xsd::LinphoneImdn::serializeReason (*d, s, f);
return d;
}
void
operator<< (::xercesc::DOMElement& e, const ImdnReason& i)
{
e << static_cast< const ::LinphonePrivate::Xsd::XmlSchema::String& > (i);
// code
//
{
::xercesc::DOMAttr& a (
::xsd::cxx::xml::dom::create_attribute (
"code",
e));
a << i.getCode ();
}
}
}
}
}
#include <xsd/cxx/post.hxx>
// Begin epilogue.
//
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif
//
// End epilogue.

592
src/xml/linphone-imdn.h Normal file
View file

@ -0,0 +1,592 @@
// 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_LINPHONE_IMDN_H
#define XML_LINPHONE_IMDN_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.
//
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
//
// End prologue.
#include <xsd/cxx/config.hxx>
#if (XSD_INT_VERSION != 4000000L)
#error XSD runtime version mismatch
#endif
#include <xsd/cxx/pre.hxx>
#include <xsd/cxx/xml/char-utf8.hxx>
#include <xsd/cxx/tree/exceptions.hxx>
#include <xsd/cxx/tree/elements.hxx>
#include <xsd/cxx/tree/types.hxx>
#include <xsd/cxx/xml/error-handler.hxx>
#include <xsd/cxx/xml/dom/auto-ptr.hxx>
#include <xsd/cxx/tree/parsing.hxx>
#include <xsd/cxx/tree/parsing/byte.hxx>
#include <xsd/cxx/tree/parsing/unsigned-byte.hxx>
#include <xsd/cxx/tree/parsing/short.hxx>
#include <xsd/cxx/tree/parsing/unsigned-short.hxx>
#include <xsd/cxx/tree/parsing/int.hxx>
#include <xsd/cxx/tree/parsing/unsigned-int.hxx>
#include <xsd/cxx/tree/parsing/long.hxx>
#include <xsd/cxx/tree/parsing/unsigned-long.hxx>
#include <xsd/cxx/tree/parsing/boolean.hxx>
#include <xsd/cxx/tree/parsing/float.hxx>
#include <xsd/cxx/tree/parsing/double.hxx>
#include <xsd/cxx/tree/parsing/decimal.hxx>
#include <xsd/cxx/xml/dom/serialization-header.hxx>
#include <xsd/cxx/tree/serialization.hxx>
#include <xsd/cxx/tree/serialization/byte.hxx>
#include <xsd/cxx/tree/serialization/unsigned-byte.hxx>
#include <xsd/cxx/tree/serialization/short.hxx>
#include <xsd/cxx/tree/serialization/unsigned-short.hxx>
#include <xsd/cxx/tree/serialization/int.hxx>
#include <xsd/cxx/tree/serialization/unsigned-int.hxx>
#include <xsd/cxx/tree/serialization/long.hxx>
#include <xsd/cxx/tree/serialization/unsigned-long.hxx>
#include <xsd/cxx/tree/serialization/boolean.hxx>
#include <xsd/cxx/tree/serialization/float.hxx>
#include <xsd/cxx/tree/serialization/double.hxx>
#include <xsd/cxx/tree/serialization/decimal.hxx>
#include <xsd/cxx/tree/std-ostream-operators.hxx>
namespace LinphonePrivate
{
namespace Xsd
{
namespace XmlSchema
{
// 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::no_type_info< char > NoTypeInfo;
typedef ::xsd::cxx::tree::not_derived< char > NotDerived;
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__LINPHONEPRIVATE__XSD__XMLSCHEMA
#define XSD_CXX_TREE_TREE_NODE_KEY__LINPHONEPRIVATE__XSD__XMLSCHEMA
// 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 LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
class ImdnReason;
}
}
}
#include <memory> // ::std::unique_ptr
#include <limits> // std::numeric_limits
#include <algorithm> // std::binary_search
#include <utility> // std::move
#include <xsd/cxx/xml/char-utf8.hxx>
#include <xsd/cxx/tree/exceptions.hxx>
#include <xsd/cxx/tree/elements.hxx>
#include <xsd/cxx/tree/containers.hxx>
#include <xsd/cxx/tree/list.hxx>
#include <xsd/cxx/xml/dom/parsing-header.hxx>
#include <xsd/cxx/tree/containers-wildcard.hxx>
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
class ImdnReason: public ::LinphonePrivate::Xsd::XmlSchema::String
{
public:
// code
//
typedef ::LinphonePrivate::Xsd::XmlSchema::Int CodeType;
typedef ::xsd::cxx::tree::traits< CodeType, char > CodeTraits;
const CodeType&
getCode () const;
CodeType&
getCode ();
void
setCode (const CodeType& x);
static CodeType
getCodeDefaultValue ();
// Constructors.
//
ImdnReason ();
ImdnReason (const char*);
ImdnReason (const ::std::string&);
ImdnReason (const ::LinphonePrivate::Xsd::XmlSchema::String&);
ImdnReason (const ::xercesc::DOMElement& e,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
::LinphonePrivate::Xsd::XmlSchema::Container* c = 0);
ImdnReason (const ImdnReason& x,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
::LinphonePrivate::Xsd::XmlSchema::Container* c = 0);
virtual ImdnReason*
_clone (::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
::LinphonePrivate::Xsd::XmlSchema::Container* c = 0) const;
ImdnReason&
operator= (const ImdnReason& x);
virtual
~ImdnReason ();
// Implementation.
//
protected:
void
parse (::xsd::cxx::xml::dom::parser< char >&,
::LinphonePrivate::Xsd::XmlSchema::Flags);
protected:
::xsd::cxx::tree::one< CodeType > code_;
};
}
}
}
#include <iosfwd>
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
::std::ostream&
operator<< (::std::ostream&, const ImdnReason&);
}
}
}
#include <iosfwd>
#include <xercesc/sax/InputSource.hpp>
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMErrorHandler.hpp>
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
// Parse a URI or a local file.
//
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (const ::std::string& uri,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (const ::std::string& uri,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (const ::std::string& uri,
::xercesc::DOMErrorHandler& eh,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
// Parse std::istream.
//
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
::xercesc::DOMErrorHandler& eh,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
const ::std::string& id,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
const ::std::string& id,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::std::istream& is,
const ::std::string& id,
::xercesc::DOMErrorHandler& eh,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
// Parse xercesc::InputSource.
//
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::xercesc::InputSource& is,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::xercesc::InputSource& is,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::xercesc::InputSource& is,
::xercesc::DOMErrorHandler& eh,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
// Parse xercesc::DOMDocument.
//
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (const ::xercesc::DOMDocument& d,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
::std::unique_ptr< ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason >
parseReason (::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument > d,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
const ::LinphonePrivate::Xsd::XmlSchema::Properties& p = ::LinphonePrivate::Xsd::XmlSchema::Properties ());
}
}
}
#include <iosfwd>
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMErrorHandler.hpp>
#include <xercesc/framework/XMLFormatter.hpp>
#include <xsd/cxx/xml/dom/auto-ptr.hxx>
namespace LinphonePrivate
{
namespace Xsd
{
namespace LinphoneImdn
{
// Serialize to std::ostream.
//
void
serializeReason (::std::ostream& os,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
serializeReason (::std::ostream& os,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& x,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
serializeReason (::std::ostream& os,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& x,
::xercesc::DOMErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
// Serialize to xercesc::XMLFormatTarget.
//
void
serializeReason (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
serializeReason (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& x,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
serializeReason (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& x,
::xercesc::DOMErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
// Serialize to an existing xercesc::DOMDocument.
//
void
serializeReason (::xercesc::DOMDocument& d,
const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& x,
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
// Serialize to a new xercesc::DOMDocument.
//
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument >
serializeReason (const ::LinphonePrivate::Xsd::LinphoneImdn::ImdnReason& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
operator<< (::xercesc::DOMElement&, const ImdnReason&);
}
}
}
#include <xsd/cxx/post.hxx>
// Begin epilogue.
//
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif
//
// End epilogue.
#endif // XML_LINPHONE_IMDN_H

15
src/xml/linphone-imdn.xsd Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.linphone.org/xsds/imdn.xsd"
xmlns:tns="http://www.linphone.org/xsds/imdn.xsd"
elementFormDefault="qualified">
<xs:element name="reason" type="tns:ImdnReason"/>
<xs:complexType name="ImdnReason">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="code" type="xs:int" use="optional" default="200"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>

View file

@ -1,7 +1,8 @@
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#ifndef __ANDROID__
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#endif

View file

@ -36,9 +36,10 @@
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
//
// End prologue.
@ -54,7 +55,7 @@ namespace LinphonePrivate
namespace ResourceLists
{
// ListType
//
//
const ListType::DisplayNameOptional& ListType::
getDisplayName () const
@ -238,7 +239,7 @@ namespace LinphonePrivate
// EntryType
//
//
const EntryType::DisplayNameOptional& EntryType::
getDisplayName () const
@ -350,7 +351,7 @@ namespace LinphonePrivate
// EntryRefType
//
//
const EntryRefType::DisplayNameOptional& EntryRefType::
getDisplayName () const
@ -462,7 +463,7 @@ namespace LinphonePrivate
// ExternalType
//
//
const ExternalType::DisplayNameOptional& ExternalType::
getDisplayName () const
@ -574,7 +575,7 @@ namespace LinphonePrivate
// DisplayNameType
//
//
const DisplayNameType::LangOptional& DisplayNameType::
getLang () const
@ -608,15 +609,15 @@ namespace LinphonePrivate
// List
//
//
// DisplayName
//
//
// ResourceLists
//
//
const ResourceLists::ListSequence& ResourceLists::
getList () const
@ -643,6 +644,15 @@ namespace LinphonePrivate
#include <xsd/cxx/xml/dom/parsing-source.hxx>
#include <xsd/cxx/tree/type-factory-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::type_factory_plate< 0, char >
type_factory_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
@ -1558,6 +1568,15 @@ namespace LinphonePrivate
#include <ostream>
#include <xsd/cxx/tree/std-ostream-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::std_ostream_plate< 0, char >
std_ostream_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
@ -1976,6 +1995,15 @@ namespace LinphonePrivate
#include <xsd/cxx/tree/error-handler.hxx>
#include <xsd/cxx/xml/dom/serialization-source.hxx>
#include <xsd/cxx/tree/type-serializer-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::type_serializer_plate< 0, char >
type_serializer_plate_init;
}
namespace LinphonePrivate
{
namespace Xsd
@ -2483,8 +2511,12 @@ namespace LinphonePrivate
// Begin epilogue.
//
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif
//
// End epilogue.

View file

@ -51,9 +51,10 @@
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
//
// End prologue.
@ -240,6 +241,8 @@ namespace LinphonePrivate
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::no_type_info< char > NoTypeInfo;
typedef ::xsd::cxx::tree::not_derived< char > NotDerived;
typedef ::xsd::cxx::tree::serialization< char > Serialization;
// Error handler callback interface.
@ -480,7 +483,7 @@ namespace LinphonePrivate
ListType&
operator= (const ListType& x);
virtual
virtual
~ListType ();
// Implementation.
@ -604,7 +607,7 @@ namespace LinphonePrivate
EntryType&
operator= (const EntryType& x);
virtual
virtual
~EntryType ();
// Implementation.
@ -724,7 +727,7 @@ namespace LinphonePrivate
EntryRefType&
operator= (const EntryRefType& x);
virtual
virtual
~EntryRefType ();
// Implementation.
@ -845,7 +848,7 @@ namespace LinphonePrivate
ExternalType&
operator= (const ExternalType& x);
virtual
virtual
~ExternalType ();
// Implementation.
@ -913,7 +916,7 @@ namespace LinphonePrivate
DisplayNameType&
operator= (const DisplayNameType& x);
virtual
virtual
~DisplayNameType ();
// Implementation.
@ -946,7 +949,7 @@ namespace LinphonePrivate
_clone (::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
::LinphonePrivate::Xsd::XmlSchema::Container* c = 0) const;
virtual
virtual
~List ();
};
@ -975,7 +978,7 @@ namespace LinphonePrivate
_clone (::LinphonePrivate::Xsd::XmlSchema::Flags f = 0,
::LinphonePrivate::Xsd::XmlSchema::Container* c = 0) const;
virtual
virtual
~DisplayName ();
};
@ -1018,7 +1021,7 @@ namespace LinphonePrivate
ResourceLists&
operator= (const ResourceLists& x);
virtual
virtual
~ResourceLists ();
// Implementation.
@ -1209,14 +1212,14 @@ namespace LinphonePrivate
void
serializeResourceLists (::std::ostream& os,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
serializeResourceLists (::std::ostream& os,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
@ -1224,7 +1227,7 @@ namespace LinphonePrivate
void
serializeResourceLists (::std::ostream& os,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
::xercesc::DOMErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
@ -1235,14 +1238,14 @@ namespace LinphonePrivate
void
serializeResourceLists (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
void
serializeResourceLists (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
::LinphonePrivate::Xsd::XmlSchema::ErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
@ -1250,7 +1253,7 @@ namespace LinphonePrivate
void
serializeResourceLists (::xercesc::XMLFormatTarget& ft,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
::xercesc::DOMErrorHandler& eh,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
const ::std::string& e = "UTF-8",
@ -1268,7 +1271,7 @@ namespace LinphonePrivate
//
::LinphonePrivate::Xsd::XmlSchema::dom::unique_ptr< ::xercesc::DOMDocument >
serializeResourceLists (const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
serializeResourceLists (const ::LinphonePrivate::Xsd::ResourceLists::ResourceLists& x,
const ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap& m = ::LinphonePrivate::Xsd::XmlSchema::NamespaceInfomap (),
::LinphonePrivate::Xsd::XmlSchema::Flags f = 0);
@ -1291,6 +1294,9 @@ namespace LinphonePrivate
// Begin epilogue.
//
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif

View file

@ -36,9 +36,10 @@
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
//
// End prologue.
@ -73,7 +74,7 @@ namespace namespace_
}
// Space
//
//
Space::
Space (Value v)
@ -110,7 +111,7 @@ namespace namespace_
Space& Space::
operator= (Value v)
{
static_cast< ::LinphonePrivate::Xsd::XmlSchema::Ncname& > (*this) =
static_cast< ::LinphonePrivate::Xsd::XmlSchema::Ncname& > (*this) =
::LinphonePrivate::Xsd::XmlSchema::Ncname (_xsd_Space_literals_[v]);
return *this;
@ -118,7 +119,7 @@ namespace namespace_
// Lang_member
//
//
Lang_member::
Lang_member (Value v)
@ -155,7 +156,7 @@ namespace namespace_
Lang_member& Lang_member::
operator= (Value v)
{
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
static_cast< ::LinphonePrivate::Xsd::XmlSchema::String& > (*this) =
::LinphonePrivate::Xsd::XmlSchema::String (_xsd_Lang_member_literals_[v]);
return *this;
@ -166,6 +167,15 @@ namespace namespace_
#include <xsd/cxx/xml/dom/parsing-source.hxx>
#include <xsd/cxx/tree/type-factory-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::type_factory_plate< 0, char >
type_factory_plate_init;
}
namespace namespace_
{
// Lang
@ -344,6 +354,15 @@ namespace namespace_
#include <ostream>
#include <xsd/cxx/tree/std-ostream-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::std_ostream_plate< 0, char >
std_ostream_plate_init;
}
namespace namespace_
{
::std::ostream&
@ -389,6 +408,15 @@ namespace namespace_
#include <xsd/cxx/tree/error-handler.hxx>
#include <xsd/cxx/xml/dom/serialization-source.hxx>
#include <xsd/cxx/tree/type-serializer-map.hxx>
namespace _xsd
{
static
const ::xsd::cxx::tree::type_serializer_plate< 0, char >
type_serializer_plate_init;
}
namespace namespace_
{
void
@ -453,8 +481,12 @@ namespace namespace_
// Begin epilogue.
//
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif
//
// End epilogue.

View file

@ -51,9 +51,10 @@
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
//
// End prologue.
@ -240,6 +241,8 @@ namespace LinphonePrivate
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::no_type_info< char > NoTypeInfo;
typedef ::xsd::cxx::tree::not_derived< char > NotDerived;
typedef ::xsd::cxx::tree::serialization< char > Serialization;
// Error handler callback interface.
@ -510,6 +513,9 @@ namespace namespace_
// Begin epilogue.
//
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#pragma GCC diagnostic pop
#endif
#if __clang__ || __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif

View file

@ -3077,8 +3077,8 @@ static void imdn_for_group_chat_room (void) {
// Chloe begins composing a message
const char *chloeTextMessage = "Hello";
LinphoneChatMessage *chloeMessage = _send_message(chloeCr, chloeTextMessage);
BC_ASSERT_TRUE(wait_for_list(coresList, &marie->stat.number_of_LinphoneMessageReceived, initialMarieStats.number_of_LinphoneMessageReceived + 1, 10000));
BC_ASSERT_TRUE(wait_for_list(coresList, &pauline->stat.number_of_LinphoneMessageReceived, initialPaulineStats.number_of_LinphoneMessageReceived + 1, 10000));
BC_ASSERT_TRUE(wait_for_list(coresList, &marie->stat.number_of_LinphoneMessageReceived, initialMarieStats.number_of_LinphoneMessageReceived + 1, 3000));
BC_ASSERT_TRUE(wait_for_list(coresList, &pauline->stat.number_of_LinphoneMessageReceived, initialPaulineStats.number_of_LinphoneMessageReceived + 1, 3000));
LinphoneChatMessage *marieLastMsg = marie->stat.last_received_chat_message;
if (!BC_ASSERT_PTR_NOT_NULL(marieLastMsg))
goto end;
@ -3088,7 +3088,7 @@ static void imdn_for_group_chat_room (void) {
linphone_address_unref(chloeAddr);
// Check that the message has been delivered to Marie and Pauline
BC_ASSERT_TRUE(wait_for_list(coresList, &chloe->stat.number_of_LinphoneMessageDeliveredToUser, initialChloeStats.number_of_LinphoneMessageDeliveredToUser + 1, 1000));
BC_ASSERT_TRUE(wait_for_list(coresList, &chloe->stat.number_of_LinphoneMessageDeliveredToUser, initialChloeStats.number_of_LinphoneMessageDeliveredToUser + 1, 3000));
BC_ASSERT_PTR_NULL(linphone_chat_message_get_participants_that_have_displayed(chloeMessage));
bctbx_list_t *participantsThatReceivedChloeMessage = linphone_chat_message_get_participants_that_have_received(chloeMessage);
if (BC_ASSERT_PTR_NOT_NULL(participantsThatReceivedChloeMessage)) {
@ -3105,7 +3105,7 @@ static void imdn_for_group_chat_room (void) {
// Marie marks the message as read, check that the state is not yet displayed on Chloe's side
linphone_chat_room_mark_as_read(marieCr);
BC_ASSERT_FALSE(wait_for_list(coresList, &chloe->stat.number_of_LinphoneMessageDisplayed, initialChloeStats.number_of_LinphoneMessageDisplayed + 1, 1000));
BC_ASSERT_FALSE(wait_for_list(coresList, &chloe->stat.number_of_LinphoneMessageDisplayed, initialChloeStats.number_of_LinphoneMessageDisplayed + 1, 3000));
bctbx_list_t *participantsThatDisplayedChloeMessage = linphone_chat_message_get_participants_that_have_displayed(chloeMessage);
if (BC_ASSERT_PTR_NOT_NULL(participantsThatDisplayedChloeMessage)) {
BC_ASSERT_EQUAL((int)bctbx_list_size(participantsThatDisplayedChloeMessage), 1, int, "%d");
@ -3120,7 +3120,7 @@ static void imdn_for_group_chat_room (void) {
// Pauline also marks the message as read, check that the state is now displayed on Chloe's side
linphone_chat_room_mark_as_read(paulineCr);
BC_ASSERT_TRUE(wait_for_list(coresList, &chloe->stat.number_of_LinphoneMessageDisplayed, initialChloeStats.number_of_LinphoneMessageDisplayed + 1, 1000));
BC_ASSERT_TRUE(wait_for_list(coresList, &chloe->stat.number_of_LinphoneMessageDisplayed, initialChloeStats.number_of_LinphoneMessageDisplayed + 1, 3000));
participantsThatDisplayedChloeMessage = linphone_chat_message_get_participants_that_have_displayed(chloeMessage);
if (BC_ASSERT_PTR_NOT_NULL(participantsThatDisplayedChloeMessage)) {
BC_ASSERT_EQUAL((int)bctbx_list_size(participantsThatDisplayedChloeMessage), 2, int, "%d");