QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppCall.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 QXMPPCALL_H
25#define QXMPPCALL_H
26
27#include "QXmppCallStream.h"
28#include "QXmppClientExtension.h"
29#include "QXmppLogger.h"
30
31#include <QMetaType>
32#include <QObject>
33
34class QHostAddress;
35class QXmppCallPrivate;
37class QXmppCallManagerPrivate;
38
42
43class QXMPP_EXPORT QXmppCall : public QXmppLoggable
44{
45 Q_OBJECT
46 Q_PROPERTY(Direction direction READ direction CONSTANT)
47 Q_PROPERTY(QString jid READ jid CONSTANT)
48 Q_PROPERTY(State state READ state NOTIFY stateChanged)
49
50public:
52 enum Direction {
54 OutgoingDirection
55 };
56 Q_ENUM(Direction)
57
58
59 enum State {
60 ConnectingState = 0,
61 ActiveState = 1,
62 DisconnectingState = 2,
63 FinishedState = 3
64 };
65 Q_ENUM(State)
66
67 ~QXmppCall();
68
69 QXmppCall::Direction direction() const;
70 QString jid() const;
71 QString sid() const;
72 QXmppCall::State state() const;
73
74 GstElement *pipeline() const;
75 QXmppCallStream *audioStream() const;
76 QXmppCallStream *videoStream() const;
77
78signals:
84 void connected();
85
90 void finished();
91
93 void ringing();
94
97
100
101public slots:
102 void accept();
103 void hangup();
104 void addVideo();
105
106private slots:
107 void localCandidatesChanged();
108 void terminated();
109
110private:
111 QXmppCall(const QString &jid, QXmppCall::Direction direction, QXmppCallManager *parent);
112
113 QXmppCallPrivate *d;
114 friend class QXmppCallManager;
115 friend class QXmppCallManagerPrivate;
116 friend class QXmppCallPrivate;
117};
118
119Q_DECLARE_METATYPE(QXmppCall::State)
120
121#endif
The QXmppCallManager class provides support for making and receiving voice calls.
Definition QXmppCallManager.h:65
The QXmppCallStream class represents an RTP stream in a VoIP call.
Definition QXmppCallStream.h:48
The QXmppCall class represents a Voice-Over-IP call to a remote party.
Definition QXmppCall.h:44
void stateChanged(QXmppCall::State state)
This signal is emitted when the call state changes.
void connected()
This signal is emitted when a call is connected.
Direction
This enum is used to describe the direction of a call.
Definition QXmppCall.h:52
@ IncomingDirection
The call is incoming.
Definition QXmppCall.h:53
void finished()
This signal is emitted when a call is finished.
State
This enum is used to describe the state of a call.
Definition QXmppCall.h:59
void streamCreated(QXmppCallStream *stream)
This signal is emitted when a stream is created.
void ringing()
This signal is emitted when the remote party is ringing.
The QXmppLoggable class represents a source of logging messages.
Definition QXmppLogger.h:124