2 * This file is part of ofono-qt
4 * Copyright (C) 2010-2011 Nokia Corporation and/or its subsidiary(-ies).
6 * Contact: Alexander Kanavin <alexander.kanavin@nokia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * version 2.1 as published by the Free Software Foundation.
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 #ifndef OFONOVOICECALLMANAGER_H
25 #define OFONOVOICECALLMANAGER_H
27 #include <QtCore/QObject>
28 #include <QStringList>
30 #include <QDBusObjectPath>
32 #include "ofonomodeminterface.h"
33 #include "libofono-qt_global.h"
35 struct OfonoVoiceCallManagerStruct {
37 QVariantMap properties;
39 typedef QList<OfonoVoiceCallManagerStruct> OfonoVoiceCallManagerList;
41 Q_DECLARE_METATYPE(OfonoVoiceCallManagerStruct)
42 Q_DECLARE_METATYPE(OfonoVoiceCallManagerList)
44 //! This class is used to access oFono voice call manager API
46 * The API is documented in
47 * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/voicecallmanager-api.txt
49 class OFONO_QT_EXPORT OfonoVoiceCallManager : public OfonoModemInterface
53 Q_PROPERTY(QStringList emergencyNumbers READ emergencyNumbers NOTIFY emergencyNumbersChanged)
56 OfonoVoiceCallManager(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, QObject *parent=0);
57 ~OfonoVoiceCallManager();
60 QStringList emergencyNumbers() const;
62 Q_INVOKABLE QStringList getCalls() const;
65 void dial(const QString &number, const QString &callerid_hide);
67 void sendTones(const QString &tonestring);
70 void releaseAndAnswer();
74 void emergencyNumbersChanged(const QStringList &numbers);
75 void callAdded(const QString &call);
76 void callRemoved(const QString &call);
77 void dialComplete(const bool status);
78 void hangupAllComplete(const bool status);
79 void sendTonesComplete(const bool status);
80 void transferComplete(const bool status);
81 void swapCallsComplete(const bool status);
82 void releaseAndAnswerComplete(const bool status);
83 void holdAndAnswerComplete(const bool status);
86 void propertyChanged(const QString &property, const QVariant &value);
87 void callAddedChanged(const QDBusObjectPath &call, const QVariantMap &properties);
88 void callRemovedChanged(const QDBusObjectPath &call);
90 void dialErr(const QDBusError &error);
92 void hangupAllErr(const QDBusError &error);
94 void sendTonesErr(const QDBusError &error);
96 void transferErr(const QDBusError &error);
98 void swapCallsErr(const QDBusError &error);
99 void releaseAndAnswerResp();
100 void releaseAndAnswerErr(const QDBusError &error);
101 void holdAndAnswerResp();
102 void holdAndAnswerErr(const QDBusError &error);
106 QStringList m_calllist;
109 #endif /* !OFONOVOICECALLMANAGER_H */