10#include "QXmppConstants_p.h"
15#include <QHostAddress>
17class QXmppJingleCandidatePrivate;
18class QXmppJingleRtpDescriptionPrivate;
19class QXmppJingleIqContentPrivate;
20class QXmppJingleIqReasonPrivate;
21class QXmppJingleIqPrivate;
22class QXmppJinglePayloadTypePrivate;
23class QXmppJingleRtpCryptoElementPrivate;
24class QXmppJingleRtpEncryptionPrivate;
25class QXmppJingleRtpFeedbackPropertyPrivate;
26class QXmppJingleRtpHeaderExtensionPropertyPrivate;
27class QXmppSdpParameterPrivate;
28class QXmppJingleMessageInitiationElementPrivate;
29class QXmppCallInviteElementPrivate;
39 void setName(
const QString &name);
41 QString value()
const;
42 void setValue(
const QString &value);
45 void parse(
const QDomElement &element);
46 void toXml(QXmlStreamWriter *writer)
const;
49 static bool isSdpParameter(
const QDomElement &element);
52 QSharedDataPointer<QXmppSdpParameterPrivate> d;
63 void setTag(uint32_t tag);
65 QString cryptoSuite()
const;
66 void setCryptoSuite(
const QString &cryptoSuite);
68 QString keyParams()
const;
69 void setKeyParams(
const QString &keyParams);
71 QString sessionParams()
const;
72 void setSessionParams(
const QString &sessionParams);
75 static constexpr std::tuple XmlTag = { u
"crypto", QXmpp::Private::ns_jingle_rtp };
76 void parse(
const QDomElement &element);
77 void toXml(QXmlStreamWriter *writer)
const;
80 static bool isJingleRtpCryptoElement(
const QDomElement &element);
83 QSharedDataPointer<QXmppJingleRtpCryptoElementPrivate> d;
93 bool isRequired()
const;
94 void setRequired(
bool isRequired);
96 QVector<QXmppJingleRtpCryptoElement> cryptoElements()
const;
97 void setCryptoElements(
const QVector<QXmppJingleRtpCryptoElement> &cryptoElements);
100 static constexpr std::tuple XmlTag = { u
"encryption", QXmpp::Private::ns_jingle_rtp };
101 void parse(
const QDomElement &element);
102 void toXml(QXmlStreamWriter *writer)
const;
105 static bool isJingleRtpEncryption(
const QDomElement &element);
108 QSharedDataPointer<QXmppJingleRtpEncryptionPrivate> d;
118 QString type()
const;
119 void setType(
const QString &type);
121 QString subtype()
const;
122 void setSubtype(
const QString &subtype);
124 QVector<QXmppSdpParameter> parameters()
const;
125 void setParameters(
const QVector<QXmppSdpParameter> ¶meters);
128 static constexpr std::tuple XmlTag = { u
"rtcp-fb", QXmpp::Private::ns_jingle_rtcp_fb };
129 void parse(
const QDomElement &element);
130 void toXml(QXmlStreamWriter *writer)
const;
133 static bool isJingleRtpFeedbackProperty(
const QDomElement &element);
136 QSharedDataPointer<QXmppJingleRtpFeedbackPropertyPrivate> d;
146 uint64_t value()
const;
147 void setValue(uint64_t value);
150 static constexpr std::tuple XmlTag = { u
"rtcp-fb-trr-int", QXmpp::Private::ns_jingle_rtcp_fb };
151 void parse(
const QDomElement &element);
152 void toXml(QXmlStreamWriter *writer)
const;
155 static bool isJingleRtpFeedbackInterval(
const QDomElement &element);
178 void setId(uint32_t
id);
181 void setUri(
const QString &uri);
183 Senders senders()
const;
184 void setSenders(Senders senders);
186 QVector<QXmppSdpParameter> parameters()
const;
187 void setParameters(
const QVector<QXmppSdpParameter> ¶meters);
190 static constexpr std::tuple XmlTag = { u
"rtp-hdrext", QXmpp::Private::ns_jingle_rtp_hdrext };
191 void parse(
const QDomElement &element);
192 void toXml(QXmlStreamWriter *writer)
const;
195 static bool isJingleRtpHeaderExtensionProperty(
const QDomElement &element);
198 QSharedDataPointer<QXmppJingleRtpHeaderExtensionPropertyPrivate> d;
212 unsigned char channels()
const;
213 void setChannels(
unsigned char channels);
215 unsigned int clockrate()
const;
216 void setClockrate(
unsigned int clockrate);
218 unsigned char id()
const;
219 void setId(
unsigned char id);
221 unsigned int maxptime()
const;
222 void setMaxptime(
unsigned int maxptime);
224 QString name()
const;
225 void setName(
const QString &name);
227 QMap<QString, QString> parameters()
const;
228 void setParameters(
const QMap<QString, QString> ¶meters);
230 unsigned int ptime()
const;
231 void setPtime(
unsigned int ptime);
233 QVector<QXmppJingleRtpFeedbackProperty> rtpFeedbackProperties()
const;
234 void setRtpFeedbackProperties(
const QVector<QXmppJingleRtpFeedbackProperty> &rtpFeedbackProperties);
236 QVector<QXmppJingleRtpFeedbackInterval> rtpFeedbackIntervals()
const;
237 void setRtpFeedbackIntervals(
const QVector<QXmppJingleRtpFeedbackInterval> &rtpFeedbackIntervals);
240 static constexpr std::tuple XmlTag = { u
"payload-type", QXmpp::Private::ns_jingle_rtp };
241 void parse(
const QDomElement &element);
242 void toXml(QXmlStreamWriter *writer)
const;
249 QSharedDataPointer<QXmppJinglePayloadTypePrivate> d;
256 QXmppJingleRtpDescription(
const QString &media, quint32 ssrc = 0,
const QList<QXmppJinglePayloadType> &payloadTypes = {});
259 QString media()
const;
260 void setMedia(
const QString &media);
262 quint32 ssrc()
const;
263 void setSsrc(quint32 ssrc);
266 const QList<QXmppJinglePayloadType> &payloadTypes()
const;
267 void setPayloadTypes(
const QList<QXmppJinglePayloadType> &payloadTypes);
270 static constexpr std::tuple XmlTag = { u
"description", QXmpp::Private::ns_jingle_rtp };
271 void parse(
const QDomElement &element);
272 void toXml(QXmlStreamWriter *writer)
const;
276 QSharedDataPointer<QXmppJingleRtpDescriptionPrivate> d;
279#if QXMPP_DEPRECATED_SINCE(1, 11)
309 int component()
const;
310 void setComponent(
int component);
312 QString foundation()
const;
313 void setFoundation(
const QString &foundation);
315 int generation()
const;
316 void setGeneration(
int generation);
318 QHostAddress host()
const;
319 void setHost(
const QHostAddress &host);
322 void setId(
const QString &
id);
325 void setNetwork(
int network);
327 quint16 port()
const;
328 void setPort(quint16 port);
330 int priority()
const;
331 void setPriority(
int priority);
333 QString protocol()
const;
334 void setProtocol(
const QString &protocol);
342 static constexpr std::tuple XmlTag = { u
"candidate", QXmpp::Private::ns_jingle_ice_udp };
343 void parse(
const QDomElement &element);
344 void toXml(QXmlStreamWriter *writer)
const;
348 QSharedDataPointer<QXmppJingleCandidatePrivate> d;
395 UnsupportedTransports
413 QString text()
const;
414 void setText(
const QString &text);
417 void setType(Type type);
419 RtpErrorCondition rtpErrorCondition()
const;
420 void setRtpErrorCondition(RtpErrorCondition rtpErrorCondition);
423 static constexpr std::tuple XmlTag = { u
"reason", QXmpp::Private::ns_jingle };
424 void parse(
const QDomElement &element);
425 void toXml(QXmlStreamWriter *writer)
const;
429 QSharedDataPointer<QXmppJingleIqReasonPrivate> d;
481 using RtpSessionState = std::variant<RtpSessionStateActive, RtpSessionStateHold, RtpSessionStateUnhold, RtpSessionStateMuting, RtpSessionStateRinging>;
491 class QXMPP_EXPORT Content
495 Content(
const QXmppJingleIq::Content &other);
496 Content(QXmppJingleIq::Content &&);
499 Content &operator=(
const Content &other);
500 Content &operator=(Content &&);
502 QString creator()
const;
503 void setCreator(
const QString &creator);
505 QString name()
const;
506 void setName(
const QString &name);
508 QString senders()
const;
509 void setSenders(
const QString &senders);
515#if QXMPP_DEPRECATED_SINCE(1, 6)
516 QString descriptionMedia()
const;
517 void setDescriptionMedia(
const QString &media);
519 quint32 descriptionSsrc()
const;
520 void setDescriptionSsrc(quint32 ssrc);
523 QList<QXmppJinglePayloadType> payloadTypes()
const;
524 void setPayloadTypes(
const QList<QXmppJinglePayloadType> &payloadTypes);
527 bool isRtpMultiplexingSupported()
const;
528 void setRtpMultiplexingSupported(
bool isRtpMultiplexingSupported);
530 std::optional<QXmppJingleRtpEncryption> rtpEncryption()
const;
531 void setRtpEncryption(
const std::optional<QXmppJingleRtpEncryption> &rtpEncryption);
534 QList<QXmppJingleCandidate> transportCandidates()
const;
535 void setTransportCandidates(
const QList<QXmppJingleCandidate> &candidates);
537 QString transportUser()
const;
538 void setTransportUser(
const QString &user);
540 QString transportPassword()
const;
541 void setTransportPassword(
const QString &password);
543 QVector<QXmppJingleRtpFeedbackProperty> rtpFeedbackProperties()
const;
544 void setRtpFeedbackProperties(
const QVector<QXmppJingleRtpFeedbackProperty> &rtpFeedbackProperties);
546 QVector<QXmppJingleRtpFeedbackInterval> rtpFeedbackIntervals()
const;
547 void setRtpFeedbackIntervals(
const QVector<QXmppJingleRtpFeedbackInterval> &rtpFeedbackIntervals);
549 QVector<QXmppJingleRtpHeaderExtensionProperty> rtpHeaderExtensionProperties()
const;
550 void setRtpHeaderExtensionProperties(
const QVector<QXmppJingleRtpHeaderExtensionProperty> &rtpHeaderExtensionProperties);
552 bool isRtpHeaderExtensionMixingAllowed()
const;
553 void setRtpHeaderExtensionMixingAllowed(
bool isRtpHeaderExtensionMixingAllowed);
556 QByteArray transportFingerprint()
const;
557 void setTransportFingerprint(
const QByteArray &fingerprint);
559 QString transportFingerprintHash()
const;
560 void setTransportFingerprintHash(
const QString &hash);
562 QString transportFingerprintSetup()
const;
563 void setTransportFingerprintSetup(
const QString &setup);
566 static constexpr std::tuple XmlTag = { u
"content", QXmpp::Private::ns_jingle };
567 void parse(
const QDomElement &element);
568 void toXml(QXmlStreamWriter *writer)
const;
570 bool parseSdp(
const QString &sdp);
571 QString toSdp()
const;
575 QSharedDataPointer<QXmppJingleIqContentPrivate> d;
587 void setAction(
Action action);
589 void addContent(
const Content &content);
590 QList<Content> contents()
const;
591 void setContents(
const QList<Content> &contents);
593 QString initiator()
const;
594 void setInitiator(
const QString &initiator);
596 std::optional<QXmppJingleReason> actionReason()
const;
597 void setActionReason(
const std::optional<QXmppJingleReason> &);
599#if QXMPP_DEPRECATED_SINCE(1, 11)
600 [[deprecated(
"Use actionReason() instead.")]]
602 [[deprecated(
"Use actionReason() instead.")]]
606 QString responder()
const;
607 void setResponder(
const QString &responder);
609#if QXMPP_DEPRECATED_SINCE(1, 5)
610 QT_DEPRECATED_X(
"Use QXmpp::rtpSessionState() instead")
611 bool ringing() const;
612 QT_DEPRECATED_X("Use
QXmpp::setRtpSessionState() instead")
613 void setRinging(
bool ringing);
617 void setSid(
const QString &sid);
619 QString mujiGroupChatJid()
const;
620 void setMujiGroupChatJid(
const QString &mujiGroupChatJid);
622 std::optional<RtpSessionState> rtpSessionState()
const;
623 void setRtpSessionState(
const std::optional<RtpSessionState> &rtpSessionState);
626 static constexpr std::tuple<QStringView, QStringView> PayloadXmlTag = { u
"jingle", QXmpp::Private::ns_jingle };
627 [[deprecated(
"Use QXmpp::isIqType()")]]
628 static bool isJingleIq(
const QDomElement &element);
633 void parseElementFromChild(
const QDomElement &element)
override;
634 void toXmlElementFromChild(QXmlStreamWriter *writer)
const override;
638 QSharedDataPointer<QXmppJingleIqPrivate> d;
658 void setType(Type type);
661 void setId(
const QString &
id);
663 std::optional<QXmppJingleRtpDescription> description()
const;
664 void setDescription(std::optional<QXmppJingleRtpDescription> description);
665 QList<QXmppJingleRtpDescription> descriptions()
const;
666 void setDescriptions(
const QList<QXmppJingleRtpDescription> &descriptions);
668 std::optional<QXmppJingleReason> reason()
const;
669 void setReason(std::optional<QXmppJingleReason> reason);
671 bool containsTieBreak()
const;
672 void setContainsTieBreak(
bool containsTieBreak);
674 QString migratedTo()
const;
675 void setMigratedTo(
const QString &migratedTo);
678 void parse(
const QDomElement &element);
679 void toXml(QXmlStreamWriter *writer)
const;
682 static bool isJingleMessageInitiationElement(
const QDomElement &);
685 QSharedDataPointer<QXmppJingleMessageInitiationElementPrivate> d;
702 std::optional<QString> jid;
704 bool operator==(
const Jingle &other)
const {
return other.sid == sid && other.jid == jid; }
706 void parse(
const QDomElement &element);
707 void toXml(QXmlStreamWriter *writer)
const;
713 bool operator==(
const External &other)
const {
return other.uri == uri; }
715 static constexpr std::tuple XmlTag = { u
"external", QXmpp::Private::ns_call_invites };
716 void parse(
const QDomElement &el);
717 void toXml(QXmlStreamWriter *writer)
const;
724 void setType(Type type);
727 void setId(
const QString &
id);
730 void setAudio(
bool audio);
733 void setVideo(
bool video);
735 std::optional<Jingle> jingle()
const;
736 void setJingle(std::optional<Jingle> jingle);
738 std::optional<QVector<External>> external()
const;
739 void setExternal(std::optional<QVector<External>> external);
742 void parse(
const QDomElement &element);
743 void toXml(QXmlStreamWriter *writer)
const;
746 static bool isCallInviteElement(
const QDomElement &);
749 QSharedDataPointer<QXmppCallInviteElementPrivate> d;
The QXmppCallInviteElement class represents a Call Invite element as specified by XEP-0482: Call Invi...
Definition QXmppJingleData.h:689
Type
Definition QXmppJingleData.h:691
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23
The QXmppJingleCandidate class represents a transport candidate as specified by XEP-0176: Jingle ICE-...
Definition QXmppJingleData.h:288
QXmppJingleCandidate(QXmppJingleCandidate &&)
Move-constructor.
QXmppJingleCandidate & operator=(const QXmppJingleCandidate &other)
Assignment operator.
QXmppJingleCandidate & operator=(QXmppJingleCandidate &&)
Move-assignment operator.
QXmppJingleCandidate(const QXmppJingleCandidate &other)
Copy-constructor.
Type
This enum is used to describe a candidate's type.
Definition QXmppJingleData.h:291
@ HostType
Host candidate, a local address/port.
Definition QXmppJingleData.h:292
The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166:...
Definition QXmppJingleData.h:439
QXmppJingleIq & operator=(const QXmppJingleIq &other)
Assignment operator.
QXmppJingleIq & operator=(QXmppJingleIq &&)
Move-assignment operator.
QXmppJingleIq(QXmppJingleIq &&)
Move-constructor.
Action
This enum is used to describe a Jingle action.
Definition QXmppJingleData.h:442
Creator
Definition QXmppJingleData.h:460
@ Initiator
The initiator generated the content type.
Definition QXmppJingleData.h:462
QXmppJingleIq(const QXmppJingleIq &other)
Copy-constructor.
std::variant< RtpSessionStateActive, RtpSessionStateHold, RtpSessionStateUnhold, RtpSessionStateMuting, RtpSessionStateRinging > RtpSessionState
Definition QXmppJingleData.h:481
The QXmppJingleMessageInitiationElement class represents a Jingle Message Initiation element as speci...
Definition QXmppJingleData.h:642
Type
Definition QXmppJingleData.h:644
The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessi...
Definition QXmppJingleData.h:206
Definition QXmppJingleData.h:352
Type
This enum is used to describe a reason's type.
Definition QXmppJingleData.h:355
@ Gone
The entity is going offline or is no longer available.
Definition QXmppJingleData.h:379
@ IncompatibleParameters
Definition QXmppJingleData.h:382
@ Busy
The party is busy and cannot accept a session.
Definition QXmppJingleData.h:362
@ Decline
The party wishes to formally decline the session.
Definition QXmppJingleData.h:368
@ Success
Definition QXmppJingleData.h:389
@ Expired
Definition QXmppJingleData.h:371
@ Timeout
A request has not been answered so the sender is timing out the request.
Definition QXmppJingleData.h:391
@ GeneralError
The action is related to a non-specific application error.
Definition QXmppJingleData.h:377
@ FailedApplication
The party has been unable to initialize processing related to the application type.
Definition QXmppJingleData.h:373
@ ConnectivityError
The action is related to connectivity problems.
Definition QXmppJingleData.h:366
@ FailedTransport
The party has been unable to establish connectivity for the transport method.
Definition QXmppJingleData.h:375
@ Cancel
The initiator wishes to formally cancel the session initiation request.
Definition QXmppJingleData.h:364
@ MediaError
The action is related to media processing problems.
Definition QXmppJingleData.h:384
@ AlternativeSession
Definition QXmppJingleData.h:360
@ UnsupportedApplications
The party supports none of the offered application types.
Definition QXmppJingleData.h:393
@ SecurityError
The action is related to a violation of local security policies.
Definition QXmppJingleData.h:386
RtpErrorCondition
Definition QXmppJingleData.h:400
@ InvalidCrypto
The encryption offer is rejected.
Definition QXmppJingleData.h:404
@ NoErrorCondition
There is no error condition.
Definition QXmppJingleData.h:402
The QXmppJingleRtpCryptoElement class represents the XEP-0167: Jingle RTP Sessions "crypto" element u...
Definition QXmppJingleData.h:56
Represents a description for XEP-0167: Jingle RTP Sessions, including media type, streaming source,...
Definition QXmppJingleData.h:253
The QXmppJingleRtpEncryption class represents the XEP-0167: Jingle RTP Sessions "encryption" element ...
Definition QXmppJingleData.h:87
The QXmppJingleRtpFeedbackInterval class represents the XEP-0293: Jingle RTP Feedback Negotiation "rt...
Definition QXmppJingleData.h:140
The QXmppJingleRtpFeedbackProperty class represents the XEP-0293: Jingle RTP Feedback Negotiation "rt...
Definition QXmppJingleData.h:112
The QXmppSdpParameter class represents a Session Description Protocol (SDP) parameter specified by RF...
Definition QXmppJingleData.h:32
Definition Algorithms.h:14
Definition QXmppJingleData.h:467
Definition QXmppJingleData.h:468
Definition QXmppJingleData.h:470
QString name
Session to be muted (e.g., only audio or video)
Definition QXmppJingleData.h:477
bool isMute
Definition QXmppJingleData.h:473
Creator creator
Creator of the corresponding session.
Definition QXmppJingleData.h:475
Definition QXmppJingleData.h:479
Definition QXmppJingleData.h:469