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
25 #ifndef OFONONETWORKOPERATOR_H
26 #define OFONONETWORKOPERATOR_H
28 #include <QtCore/QObject>
30 #include <QStringList>
33 #include "libofono-qt_global.h"
37 //! This class is used to access oFono network operator API
39 * The API is documented in
40 * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/network-api.txt
42 class OFONO_QT_EXPORT OfonoNetworkOperator : public QObject
46 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
47 Q_PROPERTY(QString status READ status NOTIFY statusChanged)
48 Q_PROPERTY(QString mcc READ mcc NOTIFY mccChanged)
49 Q_PROPERTY(QString mnc READ mnc NOTIFY mncChanged)
50 Q_PROPERTY(QStringList technologies READ technologies NOTIFY technologiesChanged)
51 Q_PROPERTY(QString additionalInfo READ additionalInfo NOTIFY additionalInfoChanged)
54 OfonoNetworkOperator(const QString& operatorId, QObject *parent=0);
55 OfonoNetworkOperator(const OfonoNetworkOperator& op);
56 ~OfonoNetworkOperator();
58 OfonoNetworkOperator operator=(const OfonoNetworkOperator &op);
59 bool operator==(const OfonoNetworkOperator &op);
61 //! Returns the D-Bus object path of the network operator object
64 //! Get the D-Bus error name of the last operation.
66 * Returns the D-Bus error name of the last operation (setting a property
67 * or calling a method) if it has failed
69 QString errorName() const;
71 //! Get the D-Bus error message of the last operation.
73 * Returns the D-Bus error message of the last operation (setting a property
74 * or calling a method) if it has failed
76 QString errorMessage() const;
81 QString status() const;
84 QStringList technologies() const;
85 QString additionalInfo() const;
88 void registerComplete(bool success);
90 void nameChanged(const QString &name);
91 void statusChanged(const QString &status);
92 void mccChanged(const QString &mcc);
93 void mncChanged(const QString &mnc);
94 void technologiesChanged(const QStringList &technologies);
95 void additionalInfoChanged(const QString &additionalInfo);
100 void propertyChanged(const QString& property, const QVariant& value);
103 void registerErr(const QDBusError& error);
107 OfonoInterface *m_if;