9#include "QXmppStreamError.h"
16class QXmlStreamWriter;
17namespace QXmpp::Private {
21namespace QXmpp::Private {
26 static constexpr auto Values = makeValues<StreamError>({
27 { BadFormat, u
"bad-format" },
28 { BadNamespacePrefix, u
"bad-namespace-prefix" },
29 { Conflict, u
"conflict" },
30 { ConnectionTimeout, u
"connection-timeout" },
31 { HostGone, u
"host-gone" },
32 { HostUnknown, u
"host-unknown" },
33 { ImproperAddressing, u
"improper-addressing" },
34 { InternalServerError, u
"internal-server-error" },
35 { InvalidFrom, u
"invalid-from" },
36 { InvalidId, u
"invalid-id" },
37 { InvalidNamespace, u
"invalid-namespace" },
38 { InvalidXml, u
"invalid-xml" },
39 { NotAuthorized, u
"not-authorized" },
40 { NotWellFormed, u
"not-well-formed" },
41 { PolicyViolation, u
"policy-violation" },
42 { RemoteConnectionFailed, u
"remote-connection-failed" },
44 { ResourceConstraint, u
"resource-constraint" },
45 { RestrictedXml, u
"restricted-xml" },
46 { SystemShutdown, u
"system-shutdown" },
47 { UndefinedCondition, u
"undefined-condition" },
48 { UnsupportedEncoding, u
"unsupported-encoding" },
49 { UnsupportedFeature, u
"unsupported-feature" },
50 { UnsupportedStanzaType, u
"unsupported-stanza-type" },
51 { UnsupportedVersion, u
"unsupported-version" },
56struct StreamErrorElement {
61 bool operator==(
const SeeOtherHost &o)
const {
return host == o.host && port == o.port; }
64 using Condition = std::variant<StreamError, SeeOtherHost>;
66 static std::variant<StreamErrorElement, QXmppError> fromDom(
const QDomElement &);
67 void toXml(XmlWriter &)
const;
72 bool operator==(
const StreamErrorElement &o)
const {
return condition == o.condition && text == o.text; }
StreamError
Definition QXmppStreamError.h:15