QXmpp Version: 1.12.0
Loading...
Searching...
No Matches
QXmppCallManager Class Reference

The QXmppCallManager class provides support for making and receiving voice calls. More...

Inheritance diagram for QXmppCallManager:
QXmppClientExtension QXmppLoggable

Public Member Functions

 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)
bool dtlsRequired () const
void setDtlsRequired (bool)
Q_SIGNAL void callReceived (QXmppCall *call)
Q_SIGNAL void callStarted (QXmppCall *call)
 This signal is emitted when a call (incoming or outgoing) is started.
QXmppCallcall (const QString &jid)
Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList< QXmppDiscoIdentitydiscoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)
 You need to implement this method to process incoming XMPP stanzas.
virtual bool handleStanza (const QDomElement &stanza, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
 You need to implement this method to process incoming XMPP stanzas.
Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=nullptr)

Friends

class QXmppCall
class QXmppCallPrivate
class QXmppCallManagerPrivate

Additional Inherited Members

Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.
Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient () const
virtual void setClient (QXmppClient *client)
virtual void onRegistered (QXmppClient *client)
virtual void onUnregistered (QXmppClient *client)
void injectIq (const QDomElement &element, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
bool injectMessage (QXmppMessage &&message)
Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppCallManager class provides support for making and receiving voice calls.

Session initiation is performed as described by XEP-0166: Jingle, XEP-0167: Jingle RTP Sessions and XEP-0176: Jingle ICE-UDP Transport Method.

The data stream is connected using Interactive Connectivity Establishment (RFC 5245) and data is transferred using Real Time Protocol (RFC 3550) packets.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

auto *client = new QXmppClient();
auto *callManager = client->addNewExtension<QXmppCallManager>();
QXmppCallManager()
Definition QXmppCallManager.cpp:100
QXmppClient * client() const
Definition QXmppClientExtension.cpp:57

XEP-0320: Use of DTLS-SRTP in Jingle Sessions

DTLS-SRTP allows to encrypt peer-to-peer calls. Internally, a TLS handshake is done to negotiate keys for SRTP (Secure RTP). By default DTLS is not enforced, this can be done using setDtlsRequired(), though.

DTLS-SRTP by default exchanges the fingerprint via unencrypted XMPP packets. This means that the XMPP server could potentially replace the fingerprint or prevent the clients from using DTLS at all. However, the actual media connection is typically peer-to-peer, so the XMPP server does not have access to the transmitted data.

Support for DTLS-SRTP is available since QXmpp 1.11.

Warning
THIS API IS NOT FINALIZED YET

Constructor & Destructor Documentation

◆ QXmppCallManager()

QXmppCallManager::QXmppCallManager ( )

Constructs a QXmppCallManager object to handle incoming and outgoing Voice-Over-IP calls.

◆ ~QXmppCallManager()

QXmppCallManager::~QXmppCallManager ( )
overridedefault

Destroys the QXmppCallManager object.

Member Function Documentation

◆ call()

QXmppCall * QXmppCallManager::call ( const QString & jid)

Initiates a new outgoing call to the specified recipient.

Parameters
jid

◆ callReceived()

Q_SIGNAL void QXmppCallManager::callReceived ( QXmppCall * call)

This signal is emitted when a new incoming call is received.

To accept the call, invoke the call's QXmppCall::accept() method. To refuse the call, invoke the call's QXmppCall::hangup() method.

◆ dtlsRequired()

bool QXmppCallManager::dtlsRequired ( ) const

Returns whether the call manager requires encryption using XEP-0320: Use of DTLS-SRTP in Jingle Sessions for all calls.

Since
QXmpp 1.11

◆ setDtlsRequired()

void QXmppCallManager::setDtlsRequired ( bool dtlsRequired)

Sets whether the call manager requires encryption using XEP-0320: Use of DTLS-SRTP in Jingle Sessions for all calls.

Since
QXmpp 1.11

◆ setStunServer()

void QXmppCallManager::setStunServer ( const QHostAddress & host,
quint16 port = 3478 )

Sets a single STUN server to use to determine server-reflexive addresses and ports.

Note
This may only be called prior to calling bind().
Parameters
hostThe address of the STUN server.
portThe port of the STUN server.

◆ setStunServers()

void QXmppCallManager::setStunServers ( const QList< QPair< QHostAddress, quint16 > > & servers)

Sets multiple STUN servers to use to determine server-reflexive addresses and ports.

Note
This may only be called prior to calling bind().
Parameters
serversList of the STUN servers.
Since
QXmpp 1.3

◆ setTurnPassword()

void QXmppCallManager::setTurnPassword ( const QString & password)

Sets the password used for authentication with the TURN server.

Parameters
password

◆ setTurnServer()

void QXmppCallManager::setTurnServer ( const QHostAddress & host,
quint16 port = 3478 )

Sets the TURN server to use to relay packets in double-NAT configurations.

Parameters
hostThe address of the TURN server.
portThe port of the TURN server.

◆ setTurnUser()

void QXmppCallManager::setTurnUser ( const QString & user)

Sets the user used for authentication with the TURN server.

Parameters
user

The documentation for this class was generated from the following files: