2 * This file is part of CellularQt
4 * Copyright (C) 2010 Nokia Corporation. All rights reserved.
7 #ifndef OFONOINTERFACE_H
8 #define OFONOINTERFACE_H
11 * This file is part of ofono-qt
13 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
15 * Contact: Alexander Kanavin <alexander.kanavin@nokia.com>
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public License
19 * version 2.1 as published by the Free Software Foundation.
21 * This library is distributed in the hope that it will be useful, but
22 * WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
33 #include <QtCore/QObject>
35 #include <QDBusVariant>
37 #include "libofono-qt_global.h"
39 class OFONO_QT_EXPORT OfonoInterface : public QObject
43 enum GetPropertySetting {
48 OfonoInterface(const QString& path, const QString& ifname, GetPropertySetting setting, QObject *parent=0);
51 QVariantMap properties() const;
52 void requestProperty(const QString& name);
53 void setProperty(const QString& name, const QVariant& property);
54 void resetProperties();
56 QString path() const {return m_path;}
58 QString ifname() const {return m_ifname;}
59 QString errorName() const {return m_errorName;}
60 QString errorMessage() const {return m_errorMessage;}
63 void propertyChanged(const QString& name, const QVariant& property);
64 void requestPropertyComplete(bool success, const QString& name, const QVariant& property);
65 void setPropertyFailed(const QString& name);
68 void onPropertyChanged(QString property, QDBusVariant value);
69 void getPropertiesAsyncResp(QVariantMap properties);
70 void getPropertiesAsyncErr(const QDBusError&);
71 void setPropertyResp();
72 void setPropertyErr(const QDBusError& error);
74 void setPath(const QString& path);
76 QVariantMap getAllPropertiesSync();
80 QString m_errorMessage;
85 QVariantMap m_properties;
86 QString m_pendingProperty;
87 GetPropertySetting m_getpropsetting;