2
* Copyright (C) 2009 Barracuda Networks, Inc.
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
39
class AvCallManagerPrivate;
41
class AvCall : public QObject
53
AvCall(const AvCall &from);
56
XMPP::Jid jid() const;
59
void connectToJid(const XMPP::Jid &jid, Mode mode, int kbps = -1);
60
void accept(Mode mode, int kbps = -1);
63
void setIncomingVideo(PsiMedia::VideoWidget *widget);
65
QString errorString() const;
67
// if we use deleteLater() on a call, then it won't detach from the
68
// manager until the deletion resolves. use unlink() to immediately
69
// detach, and then call deleteLater().
77
friend class AvCallPrivate;
78
friend class AvCallManager;
79
friend class AvCallManagerPrivate;
85
class AvCallManager : public QObject
90
AvCallManager(PsiAccount *pa);
93
AvCall *createOutgoing();
94
AvCall *takeIncoming();
97
static bool isSupported();
98
static bool isVideoSupported();
100
void setSelfAddress(const QHostAddress &addr);
101
void setStunHost(const QString &host, int port);
103
static void setBasePort(int port);
104
static void setExternalAddress(const QString &host);
105
static void setAudioOutDevice(const QString &id);
106
static void setAudioInDevice(const QString &id);
107
static void setVideoInDevice(const QString &id);
110
void incomingReady();
113
friend class AvCallManagerPrivate;
115
friend class AvCallPrivate;
117
AvCallManagerPrivate *d;