2 * This file is part of ofono-qt
4 * Copyright (C) 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
23 #ifndef OFONOVOICECALL_H
24 #define OFONOVOICECALL_H
26 #include <QtCore/QObject>
28 #include <QStringList>
31 #include "libofono-qt_global.h"
35 //! This class is used to access oFono voice call API
37 * The API is documented in
38 * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob;f=doc/voicecall-api.txt
40 class OFONO_QT_EXPORT OfonoVoiceCall : public QObject
44 Q_PROPERTY(QString path READ path)
45 Q_PROPERTY(QString errorName READ errorName)
46 Q_PROPERTY(QString errorMessage READ errorMessage)
48 Q_PROPERTY(QString lineIdentification READ lineIdentification NOTIFY lineIdentificationChanged)
49 Q_PROPERTY(QString incomingLine READ incomingLine NOTIFY incomingLineChanged)
50 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
51 Q_PROPERTY(QString state READ state NOTIFY stateChanged)
52 Q_PROPERTY(QString startTime READ startTime NOTIFY startTimeChanged)
53 Q_PROPERTY(QString information READ information NOTIFY informationChanged)
54 Q_PROPERTY(bool multiparty READ multiparty NOTIFY multipartyChanged)
55 Q_PROPERTY(bool emergency READ emergency NOTIFY emergencyChanged)
56 Q_PROPERTY(quint8 icon READ icon NOTIFY iconChanged)
59 OfonoVoiceCall(const QString &callId, QObject *parent=0);
60 OfonoVoiceCall(const OfonoVoiceCall &op);
63 OfonoVoiceCall operator=(const OfonoVoiceCall &op);
64 bool operator==(const OfonoVoiceCall &op);
66 //! Returns the D-Bus object path of the voice call object
69 //! Get the D-Bus error name of the last operation.
71 * Returns the D-Bus error name of the last operation (setting a property
72 * or calling a method) if it has failed
74 QString errorName() const;
76 //! Get the D-Bus error message of the last operation.
78 * Returns the D-Bus error message of the last operation (setting a property
79 * or calling a method) if it has failed
81 QString errorMessage() const;
85 void deflect(const QString &number);
86 QString lineIdentification() const;
87 QString incomingLine() const;
89 QString state() const;
90 QString startTime() const;
91 QString information() const;
92 bool multiparty() const;
93 bool emergency() const;
97 void answerComplete(bool status);
98 void hangupComplete(bool status);
99 void deflectComplete(bool status);
100 void lineIdentificationChanged(const QString &name);
101 void nameChanged(const QString &name);
102 void stateChanged(const QString &state);
103 void startTimeChanged(const QString &time);
104 void informationChanged(const QString &mcc);
105 void incomingLineChanged(const QString &line);
106 void disconnectReason(const QString &reason);
107 void multipartyChanged(const bool multiparty);
108 void iconChanged(const quint8 &icon);
109 void emergencyChanged(const bool emergency);
112 void propertyChanged(const QString &property, const QVariant &value);
114 void answerErr(const QDBusError &error);
116 void hangupErr(const QDBusError &error);
118 void deflectErr(const QDBusError &error);
121 OfonoInterface *m_if;
125 #endif // OFONOVOICECALL_H