QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppCallManager.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Author:
5 * Jeremy Lainé
6 *
7 * Source:
8 * https://github.com/qxmpp-project/qxmpp
9 *
10 * This file is a part of QXmpp library.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 */
23
24#ifndef QXMPPCALLMANAGER_H
25#define QXMPPCALLMANAGER_H
26
27#include "QXmppCall.h"
28#include "QXmppClientExtension.h"
29#include "QXmppLogger.h"
30
31#include <QIODevice>
32#include <QMetaType>
33#include <QObject>
34
35class QHostAddress;
36class QXmppCallManagerPrivate;
37class QXmppIq;
39class QXmppJingleIq;
41class QXmppPresence;
42
63
64class QXMPP_EXPORT QXmppCallManager : public QXmppClientExtension
65{
66 Q_OBJECT
67
68public:
70 ~QXmppCallManager() override;
71 void setStunServers(const QList<QPair<QHostAddress, quint16>> &servers);
72 void setStunServer(const QHostAddress &host, quint16 port = 3478);
73 void setTurnServer(const QHostAddress &host, quint16 port = 3478);
74 void setTurnUser(const QString &user);
75 void setTurnPassword(const QString &password);
76
78 QStringList discoveryFeatures() const override;
79 bool handleStanza(const QDomElement &element) override;
81
82Q_SIGNALS:
88
91
92public Q_SLOTS:
93 QXmppCall *call(const QString &jid);
94
95protected:
97 void setClient(QXmppClient *client) override;
99
100private Q_SLOTS:
101 void _q_callDestroyed(QObject *object);
102 void _q_disconnected();
103 void _q_iqReceived(const QXmppIq &iq);
104 void _q_jingleIqReceived(const QXmppJingleIq &iq);
105 void _q_presenceReceived(const QXmppPresence &presence);
106
107private:
108 QXmppCallManagerPrivate *d;
109 friend class QXmppCall;
110 friend class QXmppCallPrivate;
111 friend class QXmppCallManagerPrivate;
112};
113
114#endif
The QXmppCallManager class provides support for making and receiving voice calls.
Definition QXmppCallManager.h:65
void callStarted(QXmppCall *call)
This signal is emitted when a call (incoming or outgoing) is started.
void callReceived(QXmppCall *call)
The QXmppCall class represents a Voice-Over-IP call to a remote party.
Definition QXmppCall.h:44
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:47
virtual void setClient(QXmppClient *client)
Definition QXmppClientExtension.cpp:79
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:54
virtual bool handleStanza(const QDomElement &stanza)=0
You need to implement this method to process incoming XMPP stanzas.
The QXmppClient class is the main class for using QXmpp.
Definition QXmppClient.h:94
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:42
The QXmppJingleCandidate class represents a transport candidate as specified by XEP-0176: Jingle ICE-...
Definition QXmppJingleIq.h:85
The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166:...
Definition QXmppJingleIq.h:154
The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessi...
Definition QXmppJingleIq.h:41
The QXmppPresence class represents an XMPP presence stanza.
Definition QXmppPresence.h:36