QXmpp: QXmppJingleData.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
QXmppJingleData.h
1// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
2// SPDX-FileCopyrightText: 2022 Melvin Keskin <melvo@olomono.de>
3// SPDX-FileCopyrightText: 2023 Tibor Csötönyi <work@taibsu.de>
4//
5// SPDX-License-Identifier: LGPL-2.1-or-later
6
7#ifndef QXMPPJINGLEIQ_H
8#define QXMPPJINGLEIQ_H
9
10#include "QXmppConstants_p.h"
11#include "QXmppIq.h"
12
13#include <variant>
14
15#include <QHostAddress>
16
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;
30
31 class QXMPP_EXPORT QXmppSdpParameter
32{
33public:
34 QXmppSdpParameter();
35
36 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppSdpParameter)
37
38 QString name() const;
39 void setName(const QString &name);
40
41 QString value() const;
42 void setValue(const QString &value);
43
45 void parse(const QDomElement &element);
46 void toXml(QXmlStreamWriter *writer) const;
48
49 static bool isSdpParameter(const QDomElement &element);
50
51private:
52 QSharedDataPointer<QXmppSdpParameterPrivate> d;
53};
54
55 class QXMPP_EXPORT QXmppJingleRtpCryptoElement
56{
57public:
58 QXmppJingleRtpCryptoElement();
59
60 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppJingleRtpCryptoElement)
61
62 uint32_t tag() const;
63 void setTag(uint32_t tag);
64
65 QString cryptoSuite() const;
66 void setCryptoSuite(const QString &cryptoSuite);
67
68 QString keyParams() const;
69 void setKeyParams(const QString &keyParams);
70
71 QString sessionParams() const;
72 void setSessionParams(const QString &sessionParams);
73
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;
79
80 static bool isJingleRtpCryptoElement(const QDomElement &element);
81
82private:
83 QSharedDataPointer<QXmppJingleRtpCryptoElementPrivate> d;
84};
85
86 class QXMPP_EXPORT QXmppJingleRtpEncryption
87{
88public:
89 QXmppJingleRtpEncryption();
90
91 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppJingleRtpEncryption)
92
93 bool isRequired() const;
94 void setRequired(bool isRequired);
95
96 QVector<QXmppJingleRtpCryptoElement> cryptoElements() const;
97 void setCryptoElements(const QVector<QXmppJingleRtpCryptoElement> &cryptoElements);
98
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;
104
105 static bool isJingleRtpEncryption(const QDomElement &element);
106
107private:
108 QSharedDataPointer<QXmppJingleRtpEncryptionPrivate> d;
109};
110
111 class QXMPP_EXPORT QXmppJingleRtpFeedbackProperty
112{
113public:
114 QXmppJingleRtpFeedbackProperty();
115 QXmppJingleRtpFeedbackProperty(const QString &type, const QString &subtype = {});
116 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppJingleRtpFeedbackProperty)
117
118 QString type() const;
119 void setType(const QString &type);
120
121 QString subtype() const;
122 void setSubtype(const QString &subtype);
123
124 QVector<QXmppSdpParameter> parameters() const;
125 void setParameters(const QVector<QXmppSdpParameter> &parameters);
126
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;
132
133 static bool isJingleRtpFeedbackProperty(const QDomElement &element);
134
135private:
136 QSharedDataPointer<QXmppJingleRtpFeedbackPropertyPrivate> d;
137};
138
139 class QXMPP_EXPORT QXmppJingleRtpFeedbackInterval
140{
141public:
142 QXmppJingleRtpFeedbackInterval();
143
144 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppJingleRtpFeedbackInterval)
145
146 uint64_t value() const;
147 void setValue(uint64_t value);
148
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;
154
155 static bool isJingleRtpFeedbackInterval(const QDomElement &element);
156
157private:
158 uint64_t m_value;
159};
160
161 class QXMPP_EXPORT QXmppJingleRtpHeaderExtensionProperty
162{
163public:
164 enum Senders {
166 Both,
168 Initiator,
170 Responder
171 };
172
173 QXmppJingleRtpHeaderExtensionProperty();
174 QXmppJingleRtpHeaderExtensionProperty(const QString &uri, uint32_t id);
175 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppJingleRtpHeaderExtensionProperty)
176
177 uint32_t id() const;
178 void setId(uint32_t id);
179
180 QString uri() const;
181 void setUri(const QString &uri);
182
183 Senders senders() const;
184 void setSenders(Senders senders);
185
186 QVector<QXmppSdpParameter> parameters() const;
187 void setParameters(const QVector<QXmppSdpParameter> &parameters);
188
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;
194
195 static bool isJingleRtpHeaderExtensionProperty(const QDomElement &element);
196
197private:
198 QSharedDataPointer<QXmppJingleRtpHeaderExtensionPropertyPrivate> d;
199};
200
205 class QXMPP_EXPORT QXmppJinglePayloadType
206{
207public:
208 QXmppJinglePayloadType();
209 QXmppJinglePayloadType(const QXmppJinglePayloadType &other);
210 ~QXmppJinglePayloadType();
211
212 unsigned char channels() const;
213 void setChannels(unsigned char channels);
214
215 unsigned int clockrate() const;
216 void setClockrate(unsigned int clockrate);
217
218 unsigned char id() const;
219 void setId(unsigned char id);
220
221 unsigned int maxptime() const;
222 void setMaxptime(unsigned int maxptime);
223
224 QString name() const;
225 void setName(const QString &name);
226
227 QMap<QString, QString> parameters() const;
228 void setParameters(const QMap<QString, QString> &parameters);
229
230 unsigned int ptime() const;
231 void setPtime(unsigned int ptime);
232
233 QVector<QXmppJingleRtpFeedbackProperty> rtpFeedbackProperties() const;
234 void setRtpFeedbackProperties(const QVector<QXmppJingleRtpFeedbackProperty> &rtpFeedbackProperties);
235
236 QVector<QXmppJingleRtpFeedbackInterval> rtpFeedbackIntervals() const;
237 void setRtpFeedbackIntervals(const QVector<QXmppJingleRtpFeedbackInterval> &rtpFeedbackIntervals);
238
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;
244
245 QXmppJinglePayloadType &operator=(const QXmppJinglePayloadType &other);
246 bool operator==(const QXmppJinglePayloadType &other) const;
247
248private:
249 QSharedDataPointer<QXmppJinglePayloadTypePrivate> d;
250};
251
252 class QXMPP_EXPORT QXmppJingleRtpDescription
253{
254public:
255 QXmppJingleRtpDescription();
256 QXmppJingleRtpDescription(const QString &media, quint32 ssrc = 0, const QList<QXmppJinglePayloadType> &payloadTypes = {});
257 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppJingleRtpDescription)
258
259 QString media() const;
260 void setMedia(const QString &media);
261
262 quint32 ssrc() const;
263 void setSsrc(quint32 ssrc);
264
265 void addPayloadType(const QXmppJinglePayloadType &payload);
266 const QList<QXmppJinglePayloadType> &payloadTypes() const;
267 void setPayloadTypes(const QList<QXmppJinglePayloadType> &payloadTypes);
268
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;
274
275private:
276 QSharedDataPointer<QXmppJingleRtpDescriptionPrivate> d;
277};
278
279#if QXMPP_DEPRECATED_SINCE(1, 11)
280using QXmppJingleDescription [[deprecated]] = QXmppJingleRtpDescription;
281#endif
282
287 class QXMPP_EXPORT QXmppJingleCandidate
288{
289public:
291 enum Type {
292 HostType,
293 PeerReflexiveType,
295 ServerReflexiveType,
297 RelayedType
299 };
300
301 QXmppJingleCandidate();
302 QXmppJingleCandidate(const QXmppJingleCandidate &other);
303 QXmppJingleCandidate(QXmppJingleCandidate &&);
304 ~QXmppJingleCandidate();
305
306 QXmppJingleCandidate &operator=(const QXmppJingleCandidate &other);
307 QXmppJingleCandidate &operator=(QXmppJingleCandidate &&);
308
309 int component() const;
310 void setComponent(int component);
311
312 QString foundation() const;
313 void setFoundation(const QString &foundation);
314
315 int generation() const;
316 void setGeneration(int generation);
317
318 QHostAddress host() const;
319 void setHost(const QHostAddress &host);
320
321 QString id() const;
322 void setId(const QString &id);
323
324 int network() const;
325 void setNetwork(int network);
326
327 quint16 port() const;
328 void setPort(quint16 port);
329
330 int priority() const;
331 void setPriority(int priority);
332
333 QString protocol() const;
334 void setProtocol(const QString &protocol);
335
336 QXmppJingleCandidate::Type type() const;
337 void setType(QXmppJingleCandidate::Type);
338
339 bool isNull() const;
340
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;
346
347private:
348 QSharedDataPointer<QXmppJingleCandidatePrivate> d;
349};
350
351 class QXMPP_EXPORT QXmppJingleReason
352{
353public:
355 enum Type {
356 None,
360 AlternativeSession,
362 Busy,
364 Cancel,
366 ConnectivityError,
368 Decline,
371 Expired,
373 FailedApplication,
375 FailedTransport,
377 GeneralError,
379 Gone,
382 IncompatibleParameters,
384 MediaError,
386 SecurityError,
389 Success,
391 Timeout,
393 UnsupportedApplications,
395 UnsupportedTransports
396 };
397
400 enum RtpErrorCondition {
402 NoErrorCondition,
404 InvalidCrypto,
406 CryptoRequired
407 };
408
409 QXmppJingleReason();
410 QXmppJingleReason(Type, const QString &, std::optional<RtpErrorCondition>);
411 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppJingleReason)
412
413 QString text() const;
414 void setText(const QString &text);
415
416 Type type() const;
417 void setType(Type type);
418
419 RtpErrorCondition rtpErrorCondition() const;
420 void setRtpErrorCondition(RtpErrorCondition rtpErrorCondition);
421
423 static constexpr std::tuple XmlTag = { u"reason", QXmpp::Private::ns_jingle };
424 void parse(const QDomElement &element);
425 void toXml(QXmlStreamWriter *writer) const;
427
428private:
429 QSharedDataPointer<QXmppJingleIqReasonPrivate> d;
430};
431
438 class QXMPP_EXPORT QXmppJingleIq : public QXmppIq
439{
440public:
442 enum Action {
443 ContentAccept,
444 ContentAdd,
445 ContentModify,
446 ContentReject,
447 ContentRemove,
448 DescriptionInfo,
449 SecurityInfo,
450 SessionAccept,
451 SessionInfo,
452 SessionInitiate,
453 SessionTerminate,
454 TransportAccept,
455 TransportInfo,
456 TransportReject,
457 TransportReplace,
458 };
459
460 enum Creator {
462 Initiator,
464 Responder
465 };
466
467 struct RtpSessionStateActive { };
468 struct RtpSessionStateHold { };
469 struct RtpSessionStateUnhold { };
470 struct RtpSessionStateMuting {
473 bool isMute;
475 Creator creator;
477 QString name;
478 };
479 struct RtpSessionStateRinging { };
480
481 using RtpSessionState = std::variant<RtpSessionStateActive, RtpSessionStateHold, RtpSessionStateUnhold, RtpSessionStateMuting, RtpSessionStateRinging>;
482
484 using Reason = QXmppJingleReason;
485
491 class QXMPP_EXPORT Content
492 {
493 public:
494 Content();
495 Content(const QXmppJingleIq::Content &other);
496 Content(QXmppJingleIq::Content &&);
497 ~Content();
498
499 Content &operator=(const Content &other);
500 Content &operator=(Content &&);
501
502 QString creator() const;
503 void setCreator(const QString &creator);
504
505 QString name() const;
506 void setName(const QString &name);
507
508 QString senders() const;
509 void setSenders(const QString &senders);
510
511 // XEP-0167: Jingle RTP Sessions
512 QXmppJingleRtpDescription description() const;
513 void setDescription(const QXmppJingleRtpDescription &description);
514
515#if QXMPP_DEPRECATED_SINCE(1, 6)
516 QString descriptionMedia() const;
517 void setDescriptionMedia(const QString &media);
518
519 quint32 descriptionSsrc() const;
520 void setDescriptionSsrc(quint32 ssrc);
521
522 void addPayloadType(const QXmppJinglePayloadType &payload);
523 QList<QXmppJinglePayloadType> payloadTypes() const;
524 void setPayloadTypes(const QList<QXmppJinglePayloadType> &payloadTypes);
525#endif
526
527 bool isRtpMultiplexingSupported() const;
528 void setRtpMultiplexingSupported(bool isRtpMultiplexingSupported);
529
530 std::optional<QXmppJingleRtpEncryption> rtpEncryption() const;
531 void setRtpEncryption(const std::optional<QXmppJingleRtpEncryption> &rtpEncryption);
532
533 void addTransportCandidate(const QXmppJingleCandidate &candidate);
534 QList<QXmppJingleCandidate> transportCandidates() const;
535 void setTransportCandidates(const QList<QXmppJingleCandidate> &candidates);
536
537 QString transportUser() const;
538 void setTransportUser(const QString &user);
539
540 QString transportPassword() const;
541 void setTransportPassword(const QString &password);
542
543 QVector<QXmppJingleRtpFeedbackProperty> rtpFeedbackProperties() const;
544 void setRtpFeedbackProperties(const QVector<QXmppJingleRtpFeedbackProperty> &rtpFeedbackProperties);
545
546 QVector<QXmppJingleRtpFeedbackInterval> rtpFeedbackIntervals() const;
547 void setRtpFeedbackIntervals(const QVector<QXmppJingleRtpFeedbackInterval> &rtpFeedbackIntervals);
548
549 QVector<QXmppJingleRtpHeaderExtensionProperty> rtpHeaderExtensionProperties() const;
550 void setRtpHeaderExtensionProperties(const QVector<QXmppJingleRtpHeaderExtensionProperty> &rtpHeaderExtensionProperties);
551
552 bool isRtpHeaderExtensionMixingAllowed() const;
553 void setRtpHeaderExtensionMixingAllowed(bool isRtpHeaderExtensionMixingAllowed);
554
555 // XEP-0320: Use of DTLS-SRTP in Jingle Sessions
556 QByteArray transportFingerprint() const;
557 void setTransportFingerprint(const QByteArray &fingerprint);
558
559 QString transportFingerprintHash() const;
560 void setTransportFingerprintHash(const QString &hash);
561
562 QString transportFingerprintSetup() const;
563 void setTransportFingerprintSetup(const QString &setup);
564
566 static constexpr std::tuple XmlTag = { u"content", QXmpp::Private::ns_jingle };
567 void parse(const QDomElement &element);
568 void toXml(QXmlStreamWriter *writer) const;
569
570 bool parseSdp(const QString &sdp);
571 QString toSdp() const;
573
574 private:
575 QSharedDataPointer<QXmppJingleIqContentPrivate> d;
576 };
577
578 QXmppJingleIq();
579 QXmppJingleIq(const QXmppJingleIq &other);
580 QXmppJingleIq(QXmppJingleIq &&);
581 ~QXmppJingleIq() override;
582
583 QXmppJingleIq &operator=(const QXmppJingleIq &other);
584 QXmppJingleIq &operator=(QXmppJingleIq &&);
585
586 Action action() const;
587 void setAction(Action action);
588
589 void addContent(const Content &content);
590 QList<Content> contents() const;
591 void setContents(const QList<Content> &contents);
592
593 QString initiator() const;
594 void setInitiator(const QString &initiator);
595
596 std::optional<QXmppJingleReason> actionReason() const;
597 void setActionReason(const std::optional<QXmppJingleReason> &);
598
599#if QXMPP_DEPRECATED_SINCE(1, 11)
600 [[deprecated("Use actionReason() instead.")]]
601 QXmppJingleReason &reason();
602 [[deprecated("Use actionReason() instead.")]]
603 const QXmppJingleReason &reason() const;
604#endif
605
606 QString responder() const;
607 void setResponder(const QString &responder);
608
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);
614#endif
615
616 QString sid() const;
617 void setSid(const QString &sid);
618
619 QString mujiGroupChatJid() const;
620 void setMujiGroupChatJid(const QString &mujiGroupChatJid);
621
622 std::optional<RtpSessionState> rtpSessionState() const;
623 void setRtpSessionState(const std::optional<RtpSessionState> &rtpSessionState);
624
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);
630
631protected:
633 void parseElementFromChild(const QDomElement &element) override;
634 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
636
637private:
638 QSharedDataPointer<QXmppJingleIqPrivate> d;
639};
640
641 class QXMPP_EXPORT QXmppJingleMessageInitiationElement
642{
643public:
644 enum class Type {
645 None,
646 Propose,
647 Ringing,
648 Proceed,
649 Reject,
650 Retract,
651 Finish
652 };
653
654 QXmppJingleMessageInitiationElement();
655 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppJingleMessageInitiationElement)
656
657 Type type() const;
658 void setType(Type type);
659
660 QString id() const;
661 void setId(const QString &id);
662
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);
667
668 std::optional<QXmppJingleReason> reason() const;
669 void setReason(std::optional<QXmppJingleReason> reason);
670
671 bool containsTieBreak() const;
672 void setContainsTieBreak(bool containsTieBreak);
673
674 QString migratedTo() const;
675 void setMigratedTo(const QString &migratedTo);
676
678 void parse(const QDomElement &element);
679 void toXml(QXmlStreamWriter *writer) const;
681
682 static bool isJingleMessageInitiationElement(const QDomElement &);
683
684private:
685 QSharedDataPointer<QXmppJingleMessageInitiationElementPrivate> d;
686};
687
688 class QXMPP_EXPORT QXmppCallInviteElement
689{
690public:
691 enum class Type {
692 None,
693 Invite,
694 Retract,
695 Accept,
696 Reject,
697 Left
698 };
699
700 struct Jingle {
701 QString sid;
702 std::optional<QString> jid;
703
704 bool operator==(const Jingle &other) const { return other.sid == sid && other.jid == jid; }
705
706 void parse(const QDomElement &element);
707 void toXml(QXmlStreamWriter *writer) const;
708 };
709
710 struct External {
711 QString uri;
712
713 bool operator==(const External &other) const { return other.uri == uri; }
714
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;
718 };
719
720 QXmppCallInviteElement();
721 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppCallInviteElement)
722
723 Type type() const;
724 void setType(Type type);
725
726 QString id() const;
727 void setId(const QString &id);
728
729 bool audio() const;
730 void setAudio(bool audio);
731
732 bool video() const;
733 void setVideo(bool video);
734
735 std::optional<Jingle> jingle() const;
736 void setJingle(std::optional<Jingle> jingle);
737
738 std::optional<QVector<External>> external() const;
739 void setExternal(std::optional<QVector<External>> external);
740
742 void parse(const QDomElement &element);
743 void toXml(QXmlStreamWriter *writer) const;
745
746 static bool isCallInviteElement(const QDomElement &);
747
748private:
749 QSharedDataPointer<QXmppCallInviteElementPrivate> d;
750};
751
752Q_DECLARE_METATYPE(QXmppJingleReason::RtpErrorCondition)
753
754#endif
QXmppCallInviteElement::Type
Type
Definition QXmppJingleData.h:691
QXmppCallInviteElement::QXmppCallInviteElement
QXmppCallInviteElement()
Constructs a Call Invite element.
Definition QXmppJingleData.cpp:2970
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppJingleCandidate
The QXmppJingleCandidate class represents a transport candidate as specified by XEP-0176: Jingle ICE-...
Definition QXmppJingleData.h:288
QXmppJingleCandidate::setFoundation
void setFoundation(const QString &foundation)
Definition QXmppJingleData.cpp:1493
QXmppJingleCandidate::network
int network() const
Returns the network index (starting at 0) the candidate is on.
Definition QXmppJingleData.cpp:1547
QXmppJingleCandidate::QXmppJingleCandidate
QXmppJingleCandidate(QXmppJingleCandidate &&)
Move-constructor.
QXmppJingleCandidate::setId
void setId(const QString &id)
Sets the candidate's unique identifier.
Definition QXmppJingleData.cpp:1541
QXmppJingleCandidate::generation
int generation() const
Definition QXmppJingleData.cpp:1503
QXmppJingleCandidate::type
QXmppJingleCandidate::Type type() const
Returns the candidate type (e.g. "host").
Definition QXmppJingleData.cpp:1595
QXmppJingleCandidate::priority
int priority() const
Returns the candidate's priority.
Definition QXmppJingleData.cpp:1571
QXmppJingleCandidate::operator=
QXmppJingleCandidate & operator=(const QXmppJingleCandidate &other)
Assignment operator.
QXmppJingleCandidate::operator=
QXmppJingleCandidate & operator=(QXmppJingleCandidate &&)
Move-assignment operator.
QXmppJingleCandidate::setPort
void setPort(quint16 port)
Sets the candidate's port number.
Definition QXmppJingleData.cpp:1565
QXmppJingleCandidate::QXmppJingleCandidate
QXmppJingleCandidate(const QXmppJingleCandidate &other)
Copy-constructor.
QXmppJingleCandidate::setProtocol
void setProtocol(const QString &protocol)
Sets the candidate's protocol (e.g. "udp").
Definition QXmppJingleData.cpp:1589
QXmppJingleCandidate::isNull
bool isNull() const
Returns true if the host address or port are empty.
Definition QXmppJingleData.cpp:1607
QXmppJingleCandidate::Type
Type
This enum is used to describe a candidate's type.
Definition QXmppJingleData.h:291
QXmppJingleCandidate::HostType
@ HostType
Host candidate, a local address/port.
Definition QXmppJingleData.h:292
QXmppJingleCandidate::PeerReflexiveType
@ PeerReflexiveType
Definition QXmppJingleData.h:293
QXmppJingleCandidate::RelayedType
@ RelayedType
Definition QXmppJingleData.h:297
QXmppJingleCandidate::ServerReflexiveType
@ ServerReflexiveType
Definition QXmppJingleData.h:295
QXmppJingleCandidate::setGeneration
void setGeneration(int generation)
Definition QXmppJingleData.cpp:1515
QXmppJingleCandidate::setType
void setType(QXmppJingleCandidate::Type)
Sets the candidate type (e.g. "host").
Definition QXmppJingleData.cpp:1601
QXmppJingleCandidate::setComponent
void setComponent(int component)
Sets the candidates's component ID.
Definition QXmppJingleData.cpp:1471
QXmppJingleCandidate::host
QHostAddress host() const
Definition QXmppJingleData.cpp:1523
QXmppJingleCandidate::protocol
QString protocol() const
Returns the candidate's protocol (e.g. "udp").
Definition QXmppJingleData.cpp:1583
QXmppJingleCandidate::QXmppJingleCandidate
QXmppJingleCandidate()
Definition QXmppJingleData.cpp:1449
QXmppJingleCandidate::setHost
void setHost(const QHostAddress &host)
Sets the candidate's host address.
Definition QXmppJingleData.cpp:1529
QXmppJingleCandidate::component
int component() const
Returns the candidate's component ID.
Definition QXmppJingleData.cpp:1465
QXmppJingleCandidate::port
quint16 port() const
Returns the candidate's port number.
Definition QXmppJingleData.cpp:1559
QXmppJingleCandidate::setPriority
void setPriority(int priority)
Sets the candidate's priority.
Definition QXmppJingleData.cpp:1577
QXmppJingleCandidate::foundation
QString foundation() const
Definition QXmppJingleData.cpp:1481
QXmppJingleCandidate::setNetwork
void setNetwork(int network)
Sets the network index (starting at 0) the candidate is on.
Definition QXmppJingleData.cpp:1553
QXmppJingleCandidate::id
QString id() const
Returns the candidate's unique identifier.
Definition QXmppJingleData.cpp:1535
QXmppJingleIq
The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166:...
Definition QXmppJingleData.h:439
QXmppJingleIq::responder
QString responder() const
Returns the session responder.
Definition QXmppJingleData.cpp:1229
QXmppJingleIq::setSid
void setSid(const QString &sid)
Sets the session ID.
Definition QXmppJingleData.cpp:1279
QXmppJingleIq::setRinging
void setRinging(bool ringing)
Definition QXmppJingleData.cpp:1263
QXmppJingleIq::addContent
void addContent(const Content &content)
Definition QXmppJingleData.cpp:1145
QXmppJingleIq::operator=
QXmppJingleIq & operator=(const QXmppJingleIq &other)
Assignment operator.
QXmppJingleIq::setContents
void setContents(const QList< Content > &contents)
Definition QXmppJingleData.cpp:1165
QXmppJingleIq::setResponder
void setResponder(const QString &responder)
Sets the session responder.
Definition QXmppJingleData.cpp:1235
QXmppJingleIq::RtpSessionState
std::variant< RtpSessionStateActive, RtpSessionStateHold, RtpSessionStateUnhold, RtpSessionStateMuting, RtpSessionStateRinging > RtpSessionState
Definition QXmppJingleData.h:481
QXmppJingleIq::operator=
QXmppJingleIq & operator=(QXmppJingleIq &&)
Move-assignment operator.
QXmppJingleIq::action
Action action() const
Definition QXmppJingleData.cpp:1126
QXmppJingleIq::setActionReason
void setActionReason(const std::optional< QXmppJingleReason > &)
Definition QXmppJingleData.cpp:1200
QXmppJingleIq::QXmppJingleIq
QXmppJingleIq(QXmppJingleIq &&)
Move-constructor.
QXmppJingleIq::sid
QString sid() const
Returns the session ID.
Definition QXmppJingleData.cpp:1273
QXmppJingleIq::setAction
void setAction(Action action)
Definition QXmppJingleData.cpp:1135
QXmppJingleIq::rtpSessionState
std::optional< RtpSessionState > rtpSessionState() const
Definition QXmppJingleData.cpp:1316
QXmppJingleIq::contents
QList< Content > contents() const
Definition QXmppJingleData.cpp:1155
QXmppJingleIq::mujiGroupChatJid
QString mujiGroupChatJid() const
Definition QXmppJingleData.cpp:1291
QXmppJingleIq::actionReason
std::optional< QXmppJingleReason > actionReason() const
Definition QXmppJingleData.cpp:1187
QXmppJingleIq::ringing
bool ringing() const
Definition QXmppJingleData.cpp:1246
QXmppJingleIq::Action
Action
This enum is used to describe a Jingle action.
Definition QXmppJingleData.h:442
QXmppJingleIq::Creator
Creator
Definition QXmppJingleData.h:460
QXmppJingleIq::Initiator
@ Initiator
The initiator generated the content type.
Definition QXmppJingleData.h:462
QXmppJingleIq::Responder
@ Responder
The responder generated the content type.
Definition QXmppJingleData.h:464
QXmppJingleIq::initiator
QString initiator() const
Returns the session initiator.
Definition QXmppJingleData.cpp:1171
QXmppJingleIq::Reason
QXmppJingleReason Reason
Alias to QXmppJingleReason for compatibility.
Definition QXmppJingleData.h:484
QXmppJingleIq::setInitiator
void setInitiator(const QString &initiator)
Sets the session initiator.
Definition QXmppJingleData.cpp:1177
QXmppJingleIq::QXmppJingleIq
QXmppJingleIq()
Constructs a QXmppJingleIq.
Definition QXmppJingleData.cpp:1106
QXmppJingleIq::QXmppJingleIq
QXmppJingleIq(const QXmppJingleIq &other)
Copy-constructor.
QXmppJingleIq::setMujiGroupChatJid
void setMujiGroupChatJid(const QString &mujiGroupChatJid)
Definition QXmppJingleData.cpp:1303
QXmppJingleIq::setRtpSessionState
void setRtpSessionState(const std::optional< RtpSessionState > &rtpSessionState)
Definition QXmppJingleData.cpp:1332
QXmppJingleIq::reason
QXmppJingleReason & reason()
Definition QXmppJingleData.cpp:1213
QXmppJingleMessageInitiationElement
The QXmppJingleMessageInitiationElement class represents a Jingle Message Initiation element as speci...
Definition QXmppJingleData.h:642
QXmppJingleMessageInitiationElement::QXmppJingleMessageInitiationElement
QXmppJingleMessageInitiationElement()
Constructs a Jingle Message Initiation element.
Definition QXmppJingleData.cpp:2743
QXmppJingleMessageInitiationElement::Type
Type
Definition QXmppJingleData.h:644
QXmppJinglePayloadType
The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessi...
Definition QXmppJingleData.h:206
QXmppJinglePayloadType::setRtpFeedbackIntervals
void setRtpFeedbackIntervals(const QVector< QXmppJingleRtpFeedbackInterval > &rtpFeedbackIntervals)
Definition QXmppJingleData.cpp:1807
QXmppJinglePayloadType::id
unsigned char id() const
Returns the payload type identifier.
Definition QXmppJingleData.cpp:1708
QXmppJinglePayloadType::setClockrate
void setClockrate(unsigned int clockrate)
Sets the clockrate in Hz, i.e. the number of samples per second.
Definition QXmppJingleData.cpp:1702
QXmppJinglePayloadType::channels
unsigned char channels() const
Returns the number of channels (e.g. 1 for mono, 2 for stereo).
Definition QXmppJingleData.cpp:1684
QXmppJinglePayloadType::ptime
unsigned int ptime() const
Returns the packet time in milliseconds (20 by default).
Definition QXmppJingleData.cpp:1757
QXmppJinglePayloadType::setParameters
void setParameters(const QMap< QString, QString > &parameters)
Sets the payload parameters.
Definition QXmppJingleData.cpp:1751
QXmppJinglePayloadType::maxptime
unsigned int maxptime() const
Returns the maximum packet time in milliseconds.
Definition QXmppJingleData.cpp:1721
QXmppJinglePayloadType::setId
void setId(unsigned char id)
Sets the payload type identifier.
Definition QXmppJingleData.cpp:1714
QXmppJinglePayloadType::setPtime
void setPtime(unsigned int ptime)
Sets the packet time in milliseconds (20 by default).
Definition QXmppJingleData.cpp:1763
QXmppJinglePayloadType::operator=
QXmppJinglePayloadType & operator=(const QXmppJinglePayloadType &other)
Definition QXmppJingleData.cpp:1860
QXmppJinglePayloadType::setMaxptime
void setMaxptime(unsigned int maxptime)
Sets the maximum packet type in milliseconds.
Definition QXmppJingleData.cpp:1727
QXmppJinglePayloadType::operator==
bool operator==(const QXmppJinglePayloadType &other) const
Definition QXmppJingleData.cpp:1870
QXmppJinglePayloadType::setRtpFeedbackProperties
void setRtpFeedbackProperties(const QVector< QXmppJingleRtpFeedbackProperty > &rtpFeedbackProperties)
Definition QXmppJingleData.cpp:1787
QXmppJinglePayloadType::rtpFeedbackProperties
QVector< QXmppJingleRtpFeedbackProperty > rtpFeedbackProperties() const
Definition QXmppJingleData.cpp:1775
QXmppJinglePayloadType::setChannels
void setChannels(unsigned char channels)
Sets the number of channels (e.g. 1 for mono, 2 for stereo).
Definition QXmppJingleData.cpp:1690
QXmppJinglePayloadType::parameters
QMap< QString, QString > parameters() const
Returns the payload parameters.
Definition QXmppJingleData.cpp:1745
QXmppJinglePayloadType::name
QString name() const
Returns the payload type name.
Definition QXmppJingleData.cpp:1733
QXmppJinglePayloadType::setName
void setName(const QString &name)
Sets the payload type name.
Definition QXmppJingleData.cpp:1739
QXmppJinglePayloadType::clockrate
unsigned int clockrate() const
Returns the clockrate in Hz, i.e. the number of samples per second.
Definition QXmppJingleData.cpp:1696
QXmppJinglePayloadType::rtpFeedbackIntervals
QVector< QXmppJingleRtpFeedbackInterval > rtpFeedbackIntervals() const
Definition QXmppJingleData.cpp:1797
QXmppJingleReason
Definition QXmppJingleData.h:352
QXmppJingleReason::QXmppJingleReason
QXmppJingleReason()
Constructs an empty QXmppJingleReason.
Definition QXmppJingleData.cpp:985
QXmppJingleReason::Type
Type
This enum is used to describe a reason's type.
Definition QXmppJingleData.h:355
QXmppJingleReason::Gone
@ Gone
The entity is going offline or is no longer available.
Definition QXmppJingleData.h:379
QXmppJingleReason::IncompatibleParameters
@ IncompatibleParameters
Definition QXmppJingleData.h:382
QXmppJingleReason::Busy
@ Busy
The party is busy and cannot accept a session.
Definition QXmppJingleData.h:362
QXmppJingleReason::Decline
@ Decline
The party wishes to formally decline the session.
Definition QXmppJingleData.h:368
QXmppJingleReason::Success
@ Success
Definition QXmppJingleData.h:389
QXmppJingleReason::Expired
@ Expired
Definition QXmppJingleData.h:371
QXmppJingleReason::Timeout
@ Timeout
A request has not been answered so the sender is timing out the request.
Definition QXmppJingleData.h:391
QXmppJingleReason::GeneralError
@ GeneralError
The action is related to a non-specific application error.
Definition QXmppJingleData.h:377
QXmppJingleReason::FailedApplication
@ FailedApplication
The party has been unable to initialize processing related to the application type.
Definition QXmppJingleData.h:373
QXmppJingleReason::ConnectivityError
@ ConnectivityError
The action is related to connectivity problems.
Definition QXmppJingleData.h:366
QXmppJingleReason::FailedTransport
@ FailedTransport
The party has been unable to establish connectivity for the transport method.
Definition QXmppJingleData.h:375
QXmppJingleReason::Cancel
@ Cancel
The initiator wishes to formally cancel the session initiation request.
Definition QXmppJingleData.h:364
QXmppJingleReason::MediaError
@ MediaError
The action is related to media processing problems.
Definition QXmppJingleData.h:384
QXmppJingleReason::AlternativeSession
@ AlternativeSession
Definition QXmppJingleData.h:360
QXmppJingleReason::UnsupportedApplications
@ UnsupportedApplications
The party supports none of the offered application types.
Definition QXmppJingleData.h:393
QXmppJingleReason::SecurityError
@ SecurityError
The action is related to a violation of local security policies.
Definition QXmppJingleData.h:386
QXmppJingleReason::UnsupportedTransports
@ UnsupportedTransports
The party supports none of the offered transport methods.
Definition QXmppJingleData.h:395
QXmppJingleReason::RtpErrorCondition
RtpErrorCondition
Definition QXmppJingleData.h:400
QXmppJingleReason::InvalidCrypto
@ InvalidCrypto
The encryption offer is rejected.
Definition QXmppJingleData.h:404
QXmppJingleReason::NoErrorCondition
@ NoErrorCondition
There is no error condition.
Definition QXmppJingleData.h:402
QXmppJingleReason::CryptoRequired
@ CryptoRequired
Encryption is required but not offered.
Definition QXmppJingleData.h:406
QXmppJingleRtpCryptoElement::isJingleRtpCryptoElement
static bool isJingleRtpCryptoElement(const QDomElement &element)
Definition QXmppJingleData.cpp:2235
QXmppJingleRtpCryptoElement::setSessionParams
void setSessionParams(const QString &sessionParams)
Definition QXmppJingleData.cpp:2200
QXmppJingleRtpCryptoElement::cryptoSuite
QString cryptoSuite() const
Definition QXmppJingleData.cpp:2149
QXmppJingleRtpCryptoElement::QXmppJingleRtpCryptoElement
QXmppJingleRtpCryptoElement()
Definition QXmppJingleData.cpp:2116
QXmppJingleRtpCryptoElement::tag
uint32_t tag() const
Definition QXmppJingleData.cpp:2128
QXmppJingleRtpCryptoElement::keyParams
QString keyParams() const
Definition QXmppJingleData.cpp:2170
QXmppJingleRtpCryptoElement::sessionParams
QString sessionParams() const
Definition QXmppJingleData.cpp:2190
QXmppJingleRtpCryptoElement::setCryptoSuite
void setCryptoSuite(const QString &cryptoSuite)
Definition QXmppJingleData.cpp:2160
QXmppJingleRtpCryptoElement::setTag
void setTag(uint32_t tag)
Definition QXmppJingleData.cpp:2138
QXmppJingleRtpCryptoElement::setKeyParams
void setKeyParams(const QString &keyParams)
Definition QXmppJingleData.cpp:2180
QXmppJingleRtpDescription
Represents a description for XEP-0167: Jingle RTP Sessions, including media type, streaming source,...
Definition QXmppJingleData.h:253
QXmppJingleRtpDescription::setPayloadTypes
void setPayloadTypes(const QList< QXmppJinglePayloadType > &payloadTypes)
Definition QXmppJingleData.cpp:1972
QXmppJingleRtpDescription::ssrc
quint32 ssrc() const
Definition QXmppJingleData.cpp:1940
QXmppJingleRtpDescription::media
QString media() const
Definition QXmppJingleData.cpp:1924
QXmppJingleRtpDescription::payloadTypes
const QList< QXmppJinglePayloadType > & payloadTypes() const
Definition QXmppJingleData.cpp:1964
QXmppJingleRtpDescription::setMedia
void setMedia(const QString &media)
Definition QXmppJingleData.cpp:1932
QXmppJingleRtpDescription::addPayloadType
void addPayloadType(const QXmppJinglePayloadType &payload)
Definition QXmppJingleData.cpp:1956
QXmppJingleRtpDescription::setSsrc
void setSsrc(quint32 ssrc)
Definition QXmppJingleData.cpp:1948
QXmppJingleRtpEncryption::setRequired
void setRequired(bool isRequired)
Definition QXmppJingleData.cpp:2281
QXmppJingleRtpEncryption::cryptoElements
QVector< QXmppJingleRtpCryptoElement > cryptoElements() const
Definition QXmppJingleData.cpp:2291
QXmppJingleRtpEncryption::isJingleRtpEncryption
static bool isJingleRtpEncryption(const QDomElement &element)
Definition QXmppJingleData.cpp:2332
QXmppJingleRtpEncryption::QXmppJingleRtpEncryption
QXmppJingleRtpEncryption()
Definition QXmppJingleData.cpp:2259
QXmppJingleRtpEncryption::setCryptoElements
void setCryptoElements(const QVector< QXmppJingleRtpCryptoElement > &cryptoElements)
Definition QXmppJingleData.cpp:2301
QXmppJingleRtpEncryption::isRequired
bool isRequired() const
Definition QXmppJingleData.cpp:2271
QXmppJingleRtpFeedbackInterval::isJingleRtpFeedbackInterval
static bool isJingleRtpFeedbackInterval(const QDomElement &element)
Definition QXmppJingleData.cpp:2535
QXmppJingleRtpFeedbackInterval::QXmppJingleRtpFeedbackInterval
QXmppJingleRtpFeedbackInterval()
Definition QXmppJingleData.cpp:2487
QXmppJingleRtpFeedbackInterval::value
uint64_t value() const
Definition QXmppJingleData.cpp:2498
QXmppJingleRtpFeedbackInterval::setValue
void setValue(uint64_t value)
Definition QXmppJingleData.cpp:2508
QXmppJingleRtpFeedbackProperty::parameters
QVector< QXmppSdpParameter > parameters() const
Definition QXmppJingleData.cpp:2423
QXmppJingleRtpFeedbackProperty::setType
void setType(const QString &type)
Definition QXmppJingleData.cpp:2390
QXmppJingleRtpFeedbackProperty::setParameters
void setParameters(const QVector< QXmppSdpParameter > &parameters)
Definition QXmppJingleData.cpp:2437
QXmppJingleRtpFeedbackProperty::isJingleRtpFeedbackProperty
static bool isJingleRtpFeedbackProperty(const QDomElement &element)
Definition QXmppJingleData.cpp:2469
QXmppJingleRtpFeedbackProperty::type
QString type() const
Definition QXmppJingleData.cpp:2380
QXmppJingleRtpFeedbackProperty::setSubtype
void setSubtype(const QString &subtype)
Definition QXmppJingleData.cpp:2413
QXmppJingleRtpFeedbackProperty::subtype
QString subtype() const
Definition QXmppJingleData.cpp:2400
QXmppJingleRtpFeedbackProperty::QXmppJingleRtpFeedbackProperty
QXmppJingleRtpFeedbackProperty()
Default constructor.
Definition QXmppJingleData.cpp:2356
QXmppJingleRtpHeaderExtensionProperty
The QXmppJingleRtpHeaderExtensionProperty class represents the XEP-0294: Jingle RTP Header Extensions...
Definition QXmppJingleData.h:162
QXmppJingleRtpHeaderExtensionProperty::Senders
Senders
Definition QXmppJingleData.h:164
QXmppJingleRtpHeaderExtensionProperty::Responder
@ Responder
Only the responder is allowed.
Definition QXmppJingleData.h:170
QXmppJingleRtpHeaderExtensionProperty::Initiator
@ Initiator
Only the initiator is allowed.
Definition QXmppJingleData.h:168
QXmppJingleRtpHeaderExtensionProperty::Both
@ Both
The initiator and the sender are allowed.
Definition QXmppJingleData.h:166
QXmppJingleRtpHeaderExtensionProperty::QXmppJingleRtpHeaderExtensionProperty
QXmppJingleRtpHeaderExtensionProperty()
Default constructor.
Definition QXmppJingleData.cpp:2566
QXmppNonza::parse
virtual void parse(const QDomElement &)=0
QXmppNonza::toXml
virtual void toXml(QXmlStreamWriter *writer) const =0
QXmppSdpParameter::value
QString value() const
Definition QXmppJingleData.cpp:2047
QXmppSdpParameter::QXmppSdpParameter
QXmppSdpParameter()
Definition QXmppJingleData.cpp:2015
QXmppSdpParameter::setName
void setName(const QString &name)
Definition QXmppJingleData.cpp:2037
QXmppSdpParameter::setValue
void setValue(const QString &value)
Definition QXmppJingleData.cpp:2061
QXmppSdpParameter::name
QString name() const
Definition QXmppJingleData.cpp:2027
QXmppSdpParameter::isSdpParameter
static bool isSdpParameter(const QDomElement &element)
Definition QXmppJingleData.cpp:2090
QXmppJingleIq::RtpSessionStateActive
Definition QXmppJingleData.h:467
QXmppJingleIq::RtpSessionStateHold
Definition QXmppJingleData.h:468
QXmppJingleIq::RtpSessionStateMuting
Definition QXmppJingleData.h:470
QXmppJingleIq::RtpSessionStateMuting::name
QString name
Session to be muted (e.g., only audio or video).
Definition QXmppJingleData.h:477
QXmppJingleIq::RtpSessionStateMuting::isMute
bool isMute
Definition QXmppJingleData.h:473
QXmppJingleIq::RtpSessionStateMuting::creator
Creator creator
Creator of the corresponding session.
Definition QXmppJingleData.h:475
QXmppJingleIq::RtpSessionStateRinging
Definition QXmppJingleData.h:479
QXmppJingleIq::RtpSessionStateUnhold
Definition QXmppJingleData.h:469