2 * This file is part of ofono-qt
4 * Copyright (C) 2010-2011 Nokia Corporation and/or its subsidiary(-ies).
6 * Contact: Alexander Kanavin <alex.kanavin@gmail.com>
8 * Portions of this file are Copyright (C) 2011 Intel Corporation
9 * Contact: Shane Bryan <shane.bryan@linux.intel.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * version 2.1 as published by the Free Software Foundation.
15 * This library is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27 #ifndef OFONOVOICECALLMANAGER_H
28 #define OFONOVOICECALLMANAGER_H
30 #include <QtCore/QObject>
31 #include <QStringList>
33 #include <QDBusObjectPath>
35 #include "ofonomodeminterface.h"
36 #include "libofono-qt_global.h"
38 struct OfonoVoiceCallManagerStruct {
40 QVariantMap properties;
42 typedef QList<OfonoVoiceCallManagerStruct> OfonoVoiceCallManagerList;
44 Q_DECLARE_METATYPE(OfonoVoiceCallManagerStruct)
45 Q_DECLARE_METATYPE(OfonoVoiceCallManagerList)
47 //! This class is used to access oFono voice call manager API
49 * The API is documented in
50 * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/voicecallmanager-api.txt
52 class OFONO_QT_EXPORT OfonoVoiceCallManager : public OfonoModemInterface
56 Q_PROPERTY(QStringList emergencyNumbers READ emergencyNumbers NOTIFY emergencyNumbersChanged)
59 OfonoVoiceCallManager(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, QObject *parent=0);
60 ~OfonoVoiceCallManager();
63 QStringList emergencyNumbers() const;
65 Q_INVOKABLE QStringList getCalls() const;
68 void dial(const QString &number, const QString &callerid_hide);
70 void sendTones(const QString &tonestring);
73 void releaseAndAnswer();
75 void privateChat(const QString &path);
76 void createMultiparty();
77 void hangupMultiparty();
80 void emergencyNumbersChanged(const QStringList &numbers);
81 void callAdded(const QString &call);
82 void callRemoved(const QString &call);
83 void dialComplete(const bool status);
84 void hangupAllComplete(const bool status);
85 void sendTonesComplete(const bool status);
86 void transferComplete(const bool status);
87 void swapCallsComplete(const bool status);
88 void releaseAndAnswerComplete(const bool status);
89 void holdAndAnswerComplete(const bool status);
90 void privateChatComplete(const bool status, const QStringList& calls);
91 void createMultipartyComplete(const bool status, const QStringList& calls);
92 void hangupMultipartyComplete(const bool status);
94 void barringActive(const QString &type);
95 void forwarded(const QString &type);
98 void validityChanged(bool);
99 void pathChanged(const QString& path);
100 void propertyChanged(const QString &property, const QVariant &value);
101 void callAddedChanged(const QDBusObjectPath &call, const QVariantMap &properties);
102 void callRemovedChanged(const QDBusObjectPath &call);
104 void dialErr(const QDBusError &error);
105 void hangupAllResp();
106 void hangupAllErr(const QDBusError &error);
107 void sendTonesResp();
108 void sendTonesErr(const QDBusError &error);
110 void transferErr(const QDBusError &error);
111 void swapCallsResp();
112 void swapCallsErr(const QDBusError &error);
113 void releaseAndAnswerResp();
114 void releaseAndAnswerErr(const QDBusError &error);
115 void holdAndAnswerResp();
116 void holdAndAnswerErr(const QDBusError &error);
117 void privateChatResp(const QList<QDBusObjectPath> &paths);
118 void privateChatErr(const QDBusError &error);
119 void createMultipartyResp(const QList<QDBusObjectPath> &paths);
120 void createMultipartyErr(const QDBusError &error);
121 void hangupMultipartyResp();
122 void hangupMultipartyErr(const QDBusError &error);
125 QStringList getCallList();
126 void connectDbusSignals(const QString& path);
128 QStringList m_calllist;
131 #endif /* !OFONOVOICECALLMANAGER_H */