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);
91 void createMultipartyComplete(const bool status);
92 void hangupMultipartyComplete(const bool status);
95 void validityChanged(bool);
96 void pathChanged(const QString& path);
97 void propertyChanged(const QString &property, const QVariant &value);
98 void callAddedChanged(const QDBusObjectPath &call, const QVariantMap &properties);
99 void callRemovedChanged(const QDBusObjectPath &call);
101 void dialErr(const QDBusError &error);
102 void hangupAllResp();
103 void hangupAllErr(const QDBusError &error);
104 void sendTonesResp();
105 void sendTonesErr(const QDBusError &error);
107 void transferErr(const QDBusError &error);
108 void swapCallsResp();
109 void swapCallsErr(const QDBusError &error);
110 void releaseAndAnswerResp();
111 void releaseAndAnswerErr(const QDBusError &error);
112 void holdAndAnswerResp();
113 void holdAndAnswerErr(const QDBusError &error);
114 void privateChatResp();
115 void privateChatErr(const QDBusError &error);
116 void createMultipartyResp();
117 void createMultipartyErr(const QDBusError &error);
118 void hangupMultipartyResp();
119 void hangupMultipartyErr(const QDBusError &error);
122 QStringList getCallList();
123 void connectDbusSignals(const QString& path);
125 QStringList m_calllist;
128 #endif /* !OFONOVOICECALLMANAGER_H */