QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
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:
51 ~QXmppCallManager() override;
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 setClient(QXmppClient *client) override;
80
81private Q_SLOTS:
82 void _q_callDestroyed(QObject *object);
83 void _q_disconnected();
84 void _q_iqReceived(const QXmppIq &iq);
85 void _q_jingleIqReceived(const QXmppJingleIq &iq);
86 void _q_presenceReceived(const QXmppPresence &presence);
87
88private:
89 QXmppCallManagerPrivate *d;
90 friend class QXmppCall;
91 friend class QXmppCallPrivate;
92 friend class QXmppCallManagerPrivate;
93};
94
95#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)
Definition QXmppCall.h:21
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:33
virtual void setClient(QXmppClient *client)
Definition QXmppClientExtension.cpp:88
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:22
virtual bool handleStanza(const QDomElement &stanza)
You need to implement this method to process incoming XMPP stanzas.
Definition QXmppClientExtension.cpp:51
The QXmppClient class is the main class for using QXmpp.
Definition QXmppClient.h:84
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 QXmppJingleIq.h:245
The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166:...
Definition QXmppJingleIq.h:317
The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessi...
Definition QXmppJingleIq.h:195
The QXmppPresence class represents an XMPP presence stanza.
Definition QXmppPresence.h:21