QXmppCallManager.h
/*
* Copyright (C) 2008-2021 The QXmpp developers
*
* Author:
* Jeremy Lainé
*
* Source:
* https://github.com/qxmpp-project/qxmpp
*
* This file is a part of QXmpp library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
#ifndef QXMPPCALLMANAGER_H
#define QXMPPCALLMANAGER_H
#include "QXmppCall.h"
#include "QXmppClientExtension.h"
#include "QXmppLogger.h"
#include <QIODevice>
#include <QMetaType>
#include <QObject>
class QHostAddress;
class QXmppCallManagerPrivate;
class QXmppIq;
class QXmppJingleCandidate;
class QXmppJingleIq;
class QXmppJinglePayloadType;
class QXmppPresence;
class QXMPP_EXPORT QXmppCallManager : public QXmppClientExtension
{
Q_OBJECT
public:
QXmppCallManager();
~QXmppCallManager() override;
void setStunServers(const QList<QPair<QHostAddress, quint16>> &servers);
void setStunServer(const QHostAddress &host, quint16 port = 3478);
void setTurnServer(const QHostAddress &host, quint16 port = 3478);
void setTurnUser(const QString &user);
void setTurnPassword(const QString &password);
QStringList discoveryFeatures() const override;
bool handleStanza(const QDomElement &element) override;
Q_SIGNALS:
void callReceived(QXmppCall *call);
void callStarted(QXmppCall *call);
public Q_SLOTS:
QXmppCall *call(const QString &jid);
protected:
void setClient(QXmppClient *client) override;
private Q_SLOTS:
void _q_callDestroyed(QObject *object);
void _q_disconnected();
void _q_iqReceived(const QXmppIq &iq);
void _q_jingleIqReceived(const QXmppJingleIq &iq);
void _q_presenceReceived(const QXmppPresence &presence);
private:
QXmppCallManagerPrivate *d;
friend class QXmppCall;
friend class QXmppCallPrivate;
friend class QXmppCallManagerPrivate;
};
#endif
QXmppCallManager
The QXmppCallManager class provides support for making and receiving voice calls.
Definition: QXmppCallManager.h:65
QXmppCallManager::callStarted
void callStarted(QXmppCall *call)
This signal is emitted when a call (incoming or outgoing) is started.
QXmppCallManager::callReceived
void callReceived(QXmppCall *call)
QXmppCall
The QXmppCall class represents a Voice-Over-IP call to a remote party.
Definition: QXmppCall.h:44
QXmppClientExtension
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:47
QXmppClientExtension::setClient
virtual void setClient(QXmppClient *client)
Definition: QXmppClientExtension.cpp:79
QXmppClientExtension::discoveryFeatures
virtual QStringList discoveryFeatures() const
Definition: QXmppClientExtension.cpp:54
QXmppClientExtension::handleStanza
virtual bool handleStanza(const QDomElement &stanza)=0
You need to implement this method to process incoming XMPP stanzas.
QXmppClient
The QXmppClient class is the main class for using QXmpp.
Definition: QXmppClient.h:94
QXmppIq
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:42
QXmppJingleCandidate
The QXmppJingleCandidate class represents a transport candidate as specified by XEP-0176: Jingle ICE-...
Definition: QXmppJingleIq.h:85
QXmppJingleIq
The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166:...
Definition: QXmppJingleIq.h:154
QXmppJinglePayloadType
The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessi...
Definition: QXmppJingleIq.h:41
QXmppPresence
The QXmppPresence class represents an XMPP presence stanza.
Definition: QXmppPresence.h:36