2 * hfdialer - Hands Free Voice Call Manager
3 * Copyright (c) 2012, Intel Corporation.
5 * This program is licensed under the terms and conditions of the
6 * Apache License, version 2.0. The full text of the Apache License is at
7 * http://www.apache.org/licenses/LICENSE-2.0
14 #include "voicecall_interface.h"
18 #define OFONO_SERVICE "org.ofono"
19 #define OFONO_MANAGER_PATH "/"
21 #define DEFAULT_CLIR "default"
23 class CallProxy: public org::ofono::VoiceCall
27 Q_PROPERTY(QString lineID READ lineID)
28 Q_PROPERTY(QString name READ name)
29 Q_PROPERTY(QString state READ state)
30 Q_PROPERTY(QDateTime startTime READ startTime)
31 Q_PROPERTY(int duration READ duration)
32 Q_PROPERTY(QString reason READ reason)
33 Q_PROPERTY(bool multiparty READ multiparty)
36 CallProxy(const QString &callPath);
40 QString lineID() const;
42 QString state() const;
43 QDateTime startTime() const;
45 QString reason() const;
46 bool multiparty() const;
49 // Answers the incoming call
50 // NOTE: only valid if state is incoming
53 // Deflects the incoming or waiting call to number provided.
54 // NOTE: only valid if state is incoming or waiting
55 void deflect(const QString toNumber);
57 // Hangs up the voice call
61 void callDisconnected(const QString &reason);
64 void multipartyChanged();
67 // Slots to handle asyncronous DBus replies
68 void getPropertiesFinished(QDBusPendingCallWatcher *watcher);
69 void answerFinished(QDBusPendingCallWatcher *watcher);
70 void deflectFinished(QDBusPendingCallWatcher *watcher);
71 void hangupFinished(QDBusPendingCallWatcher *watcher);
73 // Slots to handle DBus signals from ofono
74 void propertyChanged(const QString &in0, const QDBusVariant &in1);
75 void disconnectReason(const QString &in0);
77 void proceedCallAnswer();
78 void deniedCallAnswer();
81 void setStartTimeFromString(const QString &val);
84 QStringList m_properties;
88 QDateTime m_startTime;
93 Q_DISABLE_COPY(CallProxy)