2 * This file is part of ofono-qt
4 * Copyright (C) 2010 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
24 #ifndef OFONOINTERFACE_H
25 #define OFONOINTERFACE_H
27 #include <QtCore/QObject>
29 #include <QDBusVariant>
31 #include "libofono-qt_global.h"
33 class OFONO_QT_EXPORT OfonoInterface : public QObject
37 enum GetPropertySetting {
42 OfonoInterface(const QString& path, const QString& ifname, GetPropertySetting setting, QObject *parent=0);
45 QVariantMap properties() const;
46 void requestProperty(const QString& name);
47 void setProperty(const QString& name, const QVariant& property);
48 void resetProperties();
50 QString path() const {return m_path;}
52 QString ifname() const {return m_ifname;}
53 QString errorName() const {return m_errorName;}
54 QString errorMessage() const {return m_errorMessage;}
57 void propertyChanged(const QString& name, const QVariant& property);
58 void requestPropertyComplete(bool success, const QString& name, const QVariant& property);
59 void setPropertyFailed(const QString& name);
62 void onPropertyChanged(QString property, QDBusVariant value);
63 void getPropertiesAsyncResp(QVariantMap properties);
64 void getPropertiesAsyncErr(const QDBusError&);
65 void setPropertyResp();
66 void setPropertyErr(const QDBusError& error);
68 void setPath(const QString& path);
70 QVariantMap getAllPropertiesSync();
74 QString m_errorMessage;
79 QVariantMap m_properties;
80 QString m_pendingProperty;
81 GetPropertySetting m_getpropsetting;