Loading...
Searching...
No Matches
QXmppCall.h
// SPDX-FileCopyrightText: 2019 Jeremy Lainé <jeremy.laine@m4x.org>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPCALL_H
#define QXMPPCALL_H
#include "QXmppCallStream.h"
#include "QXmppClientExtension.h"
#include "QXmppLogger.h"
#include <QMetaType>
#include <QObject>
class QHostAddress;
class QXmppCallPrivate;
class QXmppCallManager;
class QXmppCallManagerPrivate;
class QXMPP_EXPORT QXmppCall : public QXmppLoggable
{
Q_OBJECT
Q_PROPERTY(Direction direction READ direction CONSTANT)
Q_PROPERTY(QString jid READ jid CONSTANT)
Q_PROPERTY(State state READ state NOTIFY stateChanged)
public:
enum Direction {
IncomingDirection,
OutgoingDirection
};
Q_ENUM(Direction)
enum State {
ConnectingState = 0,
ActiveState = 1,
DisconnectingState = 2,
FinishedState = 3
};
Q_ENUM(State)
~QXmppCall();
QXmppCall::Direction direction() const;
QString jid() const;
QString sid() const;
QXmppCall::State state() const;
GstElement *pipeline() const;
QXmppCallStream *audioStream() const;
QXmppCallStream *videoStream() const;
Q_SIGNAL void connected();
Q_SIGNAL void finished();
Q_SIGNAL void ringing();
Q_SIGNAL void stateChanged(QXmppCall::State state);
Q_SIGNAL void streamCreated(QXmppCallStream *stream);
Q_SLOT void accept();
Q_SLOT void hangup();
Q_SLOT void addVideo();
private:
Q_SLOT void localCandidatesChanged();
Q_SLOT void terminated();
QXmppCall(const QString &jid, QXmppCall::Direction direction, QXmppCallManager *parent);
const std::unique_ptr<QXmppCallPrivate> d;
friend class QXmppCallManager;
friend class QXmppCallManagerPrivate;
friend class QXmppCallPrivate;
};
Q_DECLARE_METATYPE(QXmppCall::State)
#endif
QXmppCallManager
The QXmppCallManager class provides support for making and receiving voice calls.
Definition QXmppCallManager.h:46
QXmppCallStream
Definition QXmppCallStream.h:23
QXmppCall
Definition QXmppCall.h:21
QXmppCall::ringing
Q_SIGNAL void ringing()
This signal is emitted when the remote party is ringing.
QXmppCall::Direction
Direction
This enum is used to describe the direction of a call.
Definition QXmppCall.h:32
QXmppCall::IncomingDirection
@ IncomingDirection
The call is incoming.
Definition QXmppCall.h:33
QXmppCall::streamCreated
Q_SIGNAL void streamCreated(QXmppCallStream *stream)
This signal is emitted when a stream is created.
QXmppCall::finished
Q_SIGNAL void finished()
This signal is emitted when a call is finished.
QXmppCall::State
State
This enum is used to describe the state of a call.
Definition QXmppCall.h:39
QXmppCall::connected
Q_SIGNAL void connected()
This signal is emitted when a call is connected.
QXmppCall::stateChanged
Q_SIGNAL void stateChanged(QXmppCall::State state)
This signal is emitted when the call state changes.
QXmppLoggable
The QXmppLoggable class represents a source of logging messages.
Definition QXmppLogger.h:110