QXmpp Version: 1.10.0
QXmppCallManager.h
1// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPCALLMANAGER_H
6#define QXMPPCALLMANAGER_H
7
8#include "QXmppCall.h"
9#include "QXmppClientExtension.h"
10#include "QXmppLogger.h"
11
12#include <QIODevice>
13#include <QMetaType>
14#include <QObject>
15
16class QHostAddress;
17class QXmppCallManagerPrivate;
18class QXmppIq;
20class QXmppJingleIq;
22class QXmppPresence;
23
44
45class QXMPP_EXPORT QXmppCallManager : public QXmppClientExtension
46{
47 Q_OBJECT
48
49public:
52 void setStunServers(const QList<QPair<QHostAddress, quint16>> &servers);
53 void setStunServer(const QHostAddress &host, quint16 port = 3478);
54 void setTurnServer(const QHostAddress &host, quint16 port = 3478);
55 void setTurnUser(const QString &user);
56 void setTurnPassword(const QString &password);
57
59 QStringList discoveryFeatures() const override;
60 bool handleStanza(const QDomElement &element) override;
62
63Q_SIGNALS:
69
72
73public Q_SLOTS:
74 QXmppCall *call(const QString &jid);
75
76protected:
78 void onRegistered(QXmppClient *client) override;
79 void onUnregistered(QXmppClient *client) override;
81
82private Q_SLOTS:
83 void _q_callDestroyed(QObject *object);
84 void _q_disconnected();
85 void _q_iqReceived(const QXmppIq &iq);
86 void _q_jingleIqReceived(const QXmppJingleIq &iq);
87 void _q_presenceReceived(const QXmppPresence &presence);
88
89private:
90 const std::unique_ptr<QXmppCallManagerPrivate> d;
91 friend class QXmppCall;
92 friend class QXmppCallPrivate;
93 friend class QXmppCallManagerPrivate;
94};
95
96#endif
The QXmppCallManager class provides support for making and receiving voice calls.
Definition: QXmppCallManager.h:46
void callStarted(QXmppCall *call)
This signal is emitted when a call (incoming or outgoing) is started.
void callReceived(QXmppCall *call)
~QXmppCallManager() override
Definition: QXmppCall.h:21
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:32
virtual QStringList discoveryFeatures() const
Definition: QXmppClientExtension.cpp:22
virtual void onUnregistered(QXmppClient *client)
Definition: QXmppClientExtension.cpp:95
virtual void onRegistered(QXmppClient *client)
Definition: QXmppClientExtension.cpp:85
virtual bool handleStanza(const QDomElement &stanza)
You need to implement this method to process incoming XMPP stanzas.
Definition: client/compat/removed_api.cpp:26
Main class for starting and managing connections to XMPP servers.
Definition: QXmppClient.h:62
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:278
The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166:...
Definition: QXmppJingleData.h:409
The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessi...
Definition: QXmppJingleData.h:200
The QXmppPresence class represents an XMPP presence stanza.
Definition: QXmppPresence.h:22