5#ifndef QXMPPCALLINVITEMANAGER_H
6#define QXMPPCALLINVITEMANAGER_H
8#include "QXmppClientExtension.h"
10#include "QXmppJingleIq.h"
11#include "QXmppMessageHandler.h"
12#include "QXmppSendResult.h"
16class QXmppCallInvitePrivate;
17class QXmppCallInviteManagerPrivate;
27 using Result = std::variant<Rejected, Retracted, Left, QXmppError>;
38 Q_SIGNAL
void accepted(
const QString &
id,
const QString &callPartnerResource);
45 std::optional<QXmppCallInviteElement::Jingle> jingle = std::nullopt,
46 std::optional<QVector<QXmppCallInviteElement::External>> external = std::nullopt);
49 void setId(
const QString &
id);
50 void setCallPartnerJid(
const QString &callPartnerJid);
51 QString callPartnerJid()
const;
52 bool isAccepted()
const;
53 void setIsAccepted(
bool isAccepted);
55 std::unique_ptr<QXmppCallInvitePrivate> d;
58 friend class tst_QXmppCallInviteManager;
71 QStringList discoveryFeatures()
const override;
75 const QString &callPartnerJid,
78 std::optional<QXmppCallInviteElement::Jingle> jingle = std::nullopt,
79 std::optional<QVector<QXmppCallInviteElement::External>> external = std::nullopt);
81 Q_SIGNAL
void invited(
const std::shared_ptr<QXmppCallInvite> &callInvite,
const QString &
id);
91 const QString &callPartnerJid);
93 void clear(
const std::shared_ptr<QXmppCallInvite> &callInvite);
98 bool handleExistingCallInvite(
99 const std::shared_ptr<QXmppCallInvite> &existingCallInvite,
101 const QString &callPartnerResource);
103 bool handleInviteCallInviteElement(
const QXmppCallInviteElement &callInviteElement,
const QString &callPartnerJid);
105 std::shared_ptr<QXmppCallInvite> addCallInvite(
const QString &callPartnerJid);
106 const QVector<std::shared_ptr<QXmppCallInvite>> &callInvites()
const;
109 std::unique_ptr<QXmppCallInviteManagerPrivate> d;
111 friend class QXmppCallInvitePrivate;
112 friend class tst_QXmppCallInviteManager;
115Q_DECLARE_METATYPE(std::shared_ptr<QXmppCallInvite>)
The QXmppCallInviteElement class represents a Call Invite element as specified by XEP-0482: Call Invi...
Definition: QXmppJingleData.h:649
The QXmppCallInviteManager class makes it possible to retrieve Call Invite elements as defined by XEP...
Definition: QXmppCallInviteManager.h:62
Q_SIGNAL void invited(const std::shared_ptr< QXmppCallInvite > &callInvite, const QString &id)
std::variant< std::shared_ptr< QXmppCallInvite >, QXmppError > ProposeResult
Definition: QXmppCallInviteManager.h:65
The QXmppCallInvite class holds information about the Call Invite element in the current context.
Definition: QXmppCallInviteManager.h:20
std::variant< Rejected, Retracted, Left, QXmppError > Result
Definition: QXmppCallInviteManager.h:27
Q_SIGNAL void accepted(const QString &id, const QString &callPartnerResource)
Q_SIGNAL void closed(const QXmppCallInvite::Result &result)
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:32
Definition: QXmppMessageHandler.h:16
The QXmppMessage class represents an XMPP message.
Definition: QXmppMessage.h:64
Definition: QXmppTask.h:62
Definition: QXmppError.h:17