aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppJingleIq.h
diff options
context:
space:
mode:
authorMelvin Keskin <melvo@olomono.de>2022-10-01 18:07:16 +0200
committerGitHub <noreply@github.com>2022-10-01 18:07:16 +0200
commit58dfd25a6477fda887e8040e174190eb7929381d (patch)
tree365ace4d90b893d0fe85ded465b2f601b4a3574d /src/base/QXmppJingleIq.h
parentd757ce3bf70058a7b4a0570b6b440de30b692b21 (diff)
downloadqxmpp-58dfd25a6477fda887e8040e174190eb7929381d.tar.gz
Implement XEP-0167: Jingle RTP Sessions Informational Messages (#460)
Diffstat (limited to 'src/base/QXmppJingleIq.h')
-rw-r--r--src/base/QXmppJingleIq.h46
1 files changed, 45 insertions, 1 deletions
diff --git a/src/base/QXmppJingleIq.h b/src/base/QXmppJingleIq.h
index 61b16461..02ecc9a5 100644
--- a/src/base/QXmppJingleIq.h
+++ b/src/base/QXmppJingleIq.h
@@ -8,6 +8,8 @@
#include "QXmppIq.h"
+#include <variant>
+
#include <QHostAddress>
class QXmppJingleCandidatePrivate;
@@ -237,6 +239,42 @@ public:
TransportReplace
};
+ enum Creator {
+ /// The initiator generated the content type.
+ Initiator,
+ /// The responder generated the content type.
+ Responder
+ };
+
+ struct RtpSessionStateActive
+ {
+ };
+
+ struct RtpSessionStateHold
+ {
+ };
+
+ struct RtpSessionStateUnhold
+ {
+ };
+
+ struct RtpSessionStateMuting
+ {
+ /// True when temporarily not sending media to the other party but continuing to accept
+ /// media from it, false for ending mute state
+ bool isMute = true;
+ /// Creator of the corresponding session
+ Creator creator;
+ /// Session to be muted (e.g., only audio or video)
+ QString name;
+ };
+
+ struct RtpSessionStateRinging
+ {
+ };
+
+ using RtpSessionState = std::variant<RtpSessionStateActive, RtpSessionStateHold, RtpSessionStateUnhold, RtpSessionStateMuting, RtpSessionStateRinging>;
+
/// \internal
///
/// The QXmppJingleIq::Content class represents the "content" element of a
@@ -386,9 +424,12 @@ public:
QString responder() const;
void setResponder(const QString &responder);
- // XEP-0167: Jingle RTP Sessions
+#if QXMPP_DEPRECATED_SINCE(1, 5)
+ QT_DEPRECATED_X("Use QXmpp::rtpSessionState() instead")
bool ringing() const;
+ QT_DEPRECATED_X("Use QXmpp::setRtpSessionState() instead")
void setRinging(bool ringing);
+#endif
QString sid() const;
void setSid(const QString &sid);
@@ -396,6 +437,9 @@ public:
QString mujiGroupChatJid() const;
void setMujiGroupChatJid(const QString &mujiGroupChatJid);
+ std::optional<RtpSessionState> rtpSessionState() const;
+ void setRtpSessionState(const std::optional<RtpSessionState> &rtpSessionState);
+
/// \cond
static bool isJingleIq(const QDomElement &element);
/// \endcond