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 OfonoVoiceCall(const QString &callId, QObject *parent=0);
45 OfonoVoiceCall(const OfonoVoiceCall &op);
48 bool operator==(const OfonoVoiceCall &op);
50 //! Returns the D-Bus object path of the voice call object
53 //! Get the D-Bus error name of the last operation.
55 * Returns the D-Bus error name of the last operation (setting a property
56 * or calling a method) if it has failed
58 QString errorName() const;
60 //! Get the D-Bus error message of the last operation.
62 * Returns the D-Bus error message of the last operation (setting a property
63 * or calling a method) if it has failed
65 QString errorMessage() const;
69 void deflect(const QString &number);
70 QString lineIdentification() const;
71 QString incomingLine() const;
73 QString state() const;
74 QString startTime() const;
75 QString information() const;
76 bool multiparty() const;
77 bool emergency() const;
80 void answerComplete(bool status);
81 void hangupComplete(bool status);
82 void deflectComplete(bool status);
83 void lineIdentificationChanged(const QString &name);
84 void nameChanged(const QString &name);
85 void stateChanged(const QString &state);
86 void startTimeChanged(const QString &time);
87 void informationChanged(const QString &mcc);
88 void incomingLineChanged(const QString &line);
89 void disconnectReason(const QString &reason);
90 void multipartyChanged(const bool multiparty);
91 void iconChanged(const quint8 &icon);
92 void emergencyChanged(const bool emergency);
95 void propertyChanged(const QString &property, const QVariant &value);
97 void answerErr(const QDBusError &error);
99 void hangupErr(const QDBusError &error);
101 void deflectErr(const QDBusError &error);
104 OfonoInterface *m_if;
108 #endif // OFONOVOICECALL_H