Qt bindings for oFono cellular services  1.30
ofonovoicecallmanager.h
1 /*
2  * This file is part of ofono-qt
3  *
4  * Copyright (C) 2010-2011 Nokia Corporation and/or its subsidiary(-ies).
5  *
6  * Contact: Alexander Kanavin <alex.kanavin@gmail.com>
7  *
8  * Portions of this file are Copyright (C) 2011 Intel Corporation
9  * Contact: Shane Bryan <shane.bryan@linux.intel.com>
10  *
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.
14  *
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.
19  *
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
23  * 02110-1301 USA
24  *
25  */
26 
27 #ifndef OFONOVOICECALLMANAGER_H
28 #define OFONOVOICECALLMANAGER_H
29 
30 #include <QtCore/QObject>
31 #include <QStringList>
32 #include <QDBusError>
33 #include <QDBusObjectPath>
34 
35 #include "ofonomodeminterface.h"
36 #include "libofono-qt_global.h"
37 
39  QDBusObjectPath path;
40  QVariantMap properties;
41 };
42 typedef QList<OfonoVoiceCallManagerStruct> OfonoVoiceCallManagerList;
43 
44 Q_DECLARE_METATYPE(OfonoVoiceCallManagerStruct)
45 Q_DECLARE_METATYPE(OfonoVoiceCallManagerList)
46 
47 
52 class OFONO_QT_EXPORT OfonoVoiceCallManager : public OfonoModemInterface
53 {
54  Q_OBJECT
55 
56  Q_PROPERTY(QStringList emergencyNumbers READ emergencyNumbers NOTIFY emergencyNumbersChanged)
57 
58 public:
59  OfonoVoiceCallManager(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, QObject *parent=0);
61 
62  /* Properties */
63  QStringList emergencyNumbers() const;
64 
65  Q_INVOKABLE QStringList getCalls() const;
66 
67 public Q_SLOTS:
68  QDBusObjectPath dial(const QString &number, const QString &callerid_hide, bool &success);
69  void hangupAll();
70  void sendTones(const QString &tonestring);
71  void transfer();
72  void swapCalls();
73  void releaseAndAnswer();
74  void holdAndAnswer();
75  void privateChat(const QString &path);
76  QList<QDBusObjectPath> createMultiparty();
77  void hangupMultiparty();
78 
79 Q_SIGNALS:
80  void emergencyNumbersChanged(const QStringList &numbers);
81  void callAdded(const QString &call, const QVariantMap &values);
82  void callRemoved(const QString &call);
83  void hangupAllComplete(const bool status);
84  void sendTonesComplete(const bool status);
85  void transferComplete(const bool status);
86  void swapCallsComplete(const bool status);
87  void releaseAndAnswerComplete(const bool status);
88  void holdAndAnswerComplete(const bool status);
89  void privateChatComplete(const bool status, const QStringList& calls);
90  void createMultipartyComplete(const bool status, const QStringList& calls);
91  void hangupMultipartyComplete(const bool status);
92 
93  void barringActive(const QString &type);
94  void forwarded(const QString &type);
95 
96 private Q_SLOTS:
97  void validityChanged(bool);
98  void pathChanged(const QString& path);
99  void propertyChanged(const QString &property, const QVariant &value);
100  void callAddedChanged(const QDBusObjectPath &call, const QVariantMap &values);
101  void callRemovedChanged(const QDBusObjectPath &call);
102  void hangupAllResp();
103  void hangupAllErr(const QDBusError &error);
104  void sendTonesResp();
105  void sendTonesErr(const QDBusError &error);
106  void transferResp();
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(const QList<QDBusObjectPath> &paths);
115  void privateChatErr(const QDBusError &error);
116  void createMultipartyResp(const QList<QDBusObjectPath> &paths);
117  void createMultipartyErr(const QDBusError &error);
118  void hangupMultipartyResp();
119  void hangupMultipartyErr(const QDBusError &error);
120 
121 private:
122  QStringList getCallList();
123  void connectDbusSignals(const QString& path);
124 private:
125  QStringList m_calllist;
126 };
127 
128 #endif /* !OFONOVOICECALLMANAGER_H */
Definition: ofonovoicecallmanager.h:38
This class implements a generic modem interface object.
Definition: ofonomodeminterface.h:41
This class is used to access oFono voice call manager API.
Definition: ofonovoicecallmanager.h:52
SelectionSetting
How the modem object should select a modem.
Definition: ofonomodem.h:68