5 #ifndef QXMPPCALLINVITEMANAGER_H 6 #define QXMPPCALLINVITEMANAGER_H 8 #include "QXmppClientExtension.h" 9 #include "QXmppError.h" 10 #include "QXmppJingleIq.h" 11 #include "QXmppMessageHandler.h" 12 #include "QXmppSendResult.h" 13 #include "QXmppTask.h" 16 class QXmppCallInvitePrivate;
17 class QXmppCallInviteManagerPrivate;
33 using Result = std::variant<Rejected, Retracted, Left, QXmppError>;
43 Q_SIGNAL
void invited();
44 Q_SIGNAL
void accepted(
const QString &
id,
const QString &callPartnerResource);
45 Q_SIGNAL
void closed(
const Result &result);
51 std::optional<QXmppCallInviteElement::Jingle> jingle = std::nullopt,
52 std::optional<QVector<QXmppCallInviteElement::External>> external = std::nullopt);
55 void setId(
const QString &
id);
56 void setCallPartnerJid(
const QString &callPartnerJid);
57 QString callPartnerJid()
const;
58 bool isAccepted()
const;
59 void setIsAccepted(
bool isAccepted);
61 std::unique_ptr<QXmppCallInvitePrivate> d;
64 friend class tst_QXmppCallInviteManager;
81 const QString &callPartnerJid,
84 std::optional<QXmppCallInviteElement::Jingle> jingle = std::nullopt,
85 std::optional<QVector<QXmppCallInviteElement::External>> external = std::nullopt);
87 Q_SIGNAL
void invited(
const std::shared_ptr<QXmppCallInvite> &callInvite,
const QString &
id);
98 const QString &callPartnerJid);
100 void clear(
const std::shared_ptr<QXmppCallInvite> &callInvite);
105 bool handleExistingCallInvite(
106 const std::shared_ptr<QXmppCallInvite> &existingCallInvite,
108 const QString &callPartnerResource);
110 bool handleInviteCallInviteElement(
const QXmppCallInviteElement &callInviteElement,
const QString &callPartnerJid);
112 std::shared_ptr<QXmppCallInvite> addCallInvite(
const QString &callPartnerJid);
113 const QVector<std::shared_ptr<QXmppCallInvite>> &callInvites()
const;
116 std::unique_ptr<QXmppCallInviteManagerPrivate> d;
118 friend class QXmppCallInvitePrivate;
119 friend class tst_QXmppCallInviteManager;
122 Q_DECLARE_METATYPE(std::shared_ptr<QXmppCallInvite>)
124 #endif // QXMPPJINGLEMESSAGEINITIATIONMANAGER_H The QXmppCallInviteElement class represents a Call Invite element as specified by XEP-0482: Call Invi...
Definition: QXmppJingleData.h:661
Definition: QXmppError.h:17
The QXmppCallInvite class holds information about the Call Invite element in the current context...
Definition: QXmppCallInviteManager.h:19
virtual bool handleMessage(const QXmppMessage &)=0
Definition: QXmppStream.h:20
std::variant< std::shared_ptr< QXmppCallInvite >, QXmppError > ProposeResult
Definition: QXmppCallInviteManager.h:71
virtual QStringList discoveryFeatures() const
Definition: QXmppClientExtension.cpp:22
The QXmppMessage class represents an XMPP message.
Definition: QXmppMessage.h:37
Definition: QXmppMessageHandler.h:15
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:32
The QXmppCallInviteManager class makes it possible to retrieve Call Invite elements as defined by XEP...
Definition: QXmppCallInviteManager.h:67
std::variant< Rejected, Retracted, Left, QXmppError > Result
Definition: QXmppCallInviteManager.h:33
virtual void setClient(QXmppClient *client)
Definition: QXmppClientExtension.cpp:88
The QXmppClient class is the main class for using QXmpp.
Definition: QXmppClient.h:83