60.3.1
by Tiago Salem Herrmann
add initial multi party call support |
1 |
/**
|
2 |
* Copyright (C) 2013 Canonical, Ltd.
|
|
3 |
*
|
|
4 |
* This program is free software: you can redistribute it and/or modify it under
|
|
5 |
* the terms of the GNU Lesser General Public License version 3, as published by
|
|
6 |
* the Free Software Foundation.
|
|
7 |
*
|
|
8 |
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
9 |
* ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
|
|
10 |
* SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
11 |
* Lesser General Public License for more details.
|
|
12 |
*
|
|
13 |
* You should have received a copy of the GNU Lesser General Public License
|
|
14 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
15 |
*
|
|
16 |
* Authors: Tiago Salem Herrmann <tiago.herrmann@canonical.com>
|
|
17 |
*/
|
|
18 |
||
19 |
#ifndef OFONOCONFERENCECALLCHANNEL_H
|
|
20 |
#define OFONOCONFERENCECALLCHANNEL_H
|
|
21 |
||
22 |
#include <QObject> |
|
23 |
||
24 |
#include <TelepathyQt/Constants> |
|
25 |
#include <TelepathyQt/BaseChannel> |
|
26 |
#include <TelepathyQt/BaseCall> |
|
27 |
#include <TelepathyQt/Types> |
|
28 |
||
29 |
#include <ofono-qt/ofonovoicecall.h> |
|
30 |
||
31 |
#include "connection.h" |
|
91.3.2
by Tiago Salem Herrmann
move SpeakerInterface to AudioOutputsInterface |
32 |
#include "audiooutputsiface.h" |
60.3.1
by Tiago Salem Herrmann
add initial multi party call support |
33 |
|
34 |
class oFonoConnection; |
|
35 |
||
36 |
class oFonoConferenceCallChannel : public QObject |
|
37 |
{
|
|
38 |
Q_OBJECT
|
|
39 |
public: |
|
40 |
oFonoConferenceCallChannel(oFonoConnection *conn, QObject *parent = 0); |
|
41 |
~oFonoConferenceCallChannel(); |
|
42 |
||
43 |
void onHangup(uint reason, const QString &detailedReason, const QString &message, Tp::DBusError* error); |
|
44 |
void onMuteStateChanged(const Tp::LocalMuteState &state, Tp::DBusError *error); |
|
45 |
void onHoldStateChanged(const Tp::LocalHoldState &state, const Tp::LocalHoldStateReason &reason, Tp::DBusError *error); |
|
46 |
void onDTMFStartTone(uchar event, Tp::DBusError *error); |
|
47 |
void onDTMFStopTone(Tp::DBusError *error); |
|
91.3.2
by Tiago Salem Herrmann
move SpeakerInterface to AudioOutputsInterface |
48 |
void onSetActiveAudioOutput(const QString &id, Tp::DBusError *error); |
60.3.1
by Tiago Salem Herrmann
add initial multi party call support |
49 |
void onMerge(const QDBusObjectPath &channel, Tp::DBusError *error); |
50 |
Tp::BaseChannelPtr baseChannel(); |
|
60.3.4
by Tiago Salem Herrmann
handle conference call status (active/on hold) |
51 |
void setConferenceActive(bool active); |
60.3.1
by Tiago Salem Herrmann
add initial multi party call support |
52 |
|
53 |
private Q_SLOTS: |
|
54 |
void onDtmfComplete(bool success); |
|
55 |
void sendNextDtmf(); |
|
56 |
void init(); |
|
57 |
||
58 |
void onOfonoMuteChanged(bool mute); |
|
60.3.5
by Tiago Salem Herrmann
add tests for conference calls |
59 |
void onChannelMerged(const QDBusObjectPath &path); |
60 |
void onChannelSplitted(const QDBusObjectPath &path); |
|
60.3.1
by Tiago Salem Herrmann
add initial multi party call support |
61 |
|
62 |
private: |
|
63 |
QString mObjPath; |
|
64 |
QString mPreviousState; |
|
65 |
bool mIncoming; |
|
66 |
bool mRequestedHangup; |
|
67 |
oFonoConnection *mConnection; |
|
60.3.5
by Tiago Salem Herrmann
add tests for conference calls |
68 |
QList<QDBusObjectPath> mCallChannels; |
60.3.1
by Tiago Salem Herrmann
add initial multi party call support |
69 |
Tp::BaseChannelPtr mBaseChannel; |
70 |
Tp::BaseChannelHoldInterfacePtr mHoldIface; |
|
71 |
Tp::BaseChannelConferenceInterfacePtr mConferenceIface; |
|
72 |
Tp::BaseChannelMergeableConferenceInterfacePtr mMergeableIface; |
|
73 |
Tp::BaseCallMuteInterfacePtr mMuteIface; |
|
91.3.2
by Tiago Salem Herrmann
move SpeakerInterface to AudioOutputsInterface |
74 |
BaseChannelAudioOutputsInterfacePtr mAudioOutputsIface; |
60.3.1
by Tiago Salem Herrmann
add initial multi party call support |
75 |
Tp::BaseChannelCallTypePtr mCallChannel; |
76 |
Tp::BaseCallContentDTMFInterfacePtr mDTMFIface; |
|
105.1.3
by Tiago Salem Herrmann
fix dtmf on conference channels |
77 |
Tp::BaseCallContentPtr mCallContent; |
60.3.1
by Tiago Salem Herrmann
add initial multi party call support |
78 |
bool mDtmfLock; |
79 |
QStringList mDtmfPendingStrings; |
|
80 |
};
|
|
81 |
||
82 |
#endif // OFONOCONFERENCECALLCHANNEL_H |