Qt bindings for oFono cellular services 1.30
ofononetworkoperator.h
1/*
2 * This file is part of ofono-qt
3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 *
6 * Contact: Alexander Kanavin <alex.kanavin@gmail.com>
7 *
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.
11 *
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.
16 *
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
20 * 02110-1301 USA
21 *
22 */
23
24
25#ifndef OFONONETWORKOPERATOR_H
26#define OFONONETWORKOPERATOR_H
27
28#include <QtCore/QObject>
29#include <QVariant>
30#include <QStringList>
31#include <QDBusError>
32
33#include "libofono-qt_global.h"
34
35class OfonoInterface;
36
38
42class OFONO_QT_EXPORT OfonoNetworkOperator : public QObject
43{
44 Q_OBJECT
45 Q_DISABLE_COPY(OfonoNetworkOperator)
46
47 Q_PROPERTY(QString path READ path)
48 Q_PROPERTY(QString errorName READ errorName)
49 Q_PROPERTY(QString errorMessage READ errorMessage)
50
51 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
52 Q_PROPERTY(QString status READ status NOTIFY statusChanged)
53 Q_PROPERTY(QString mcc READ mcc NOTIFY mccChanged)
54 Q_PROPERTY(QString mnc READ mnc NOTIFY mncChanged)
55 Q_PROPERTY(QStringList technologies READ technologies NOTIFY technologiesChanged)
56 Q_PROPERTY(QString additionalInfo READ additionalInfo NOTIFY additionalInfoChanged)
57
58public:
59 OfonoNetworkOperator(const QString& operatorId, QObject *parent=0);
61
62 bool operator==(const OfonoNetworkOperator &op) const;
63
65 QString path() const;
66
68
72 QString errorName() const;
73
75
79 QString errorMessage() const;
80
81 QString name() const;
82 QString status() const;
83 QString mcc() const;
84 QString mnc() const;
85 QStringList technologies() const;
86 QString additionalInfo() const;
87
88public Q_SLOTS:
89 void registerOp();
90
91Q_SIGNALS:
92 void registerComplete(bool success);
93
94 void nameChanged(const QString &name);
95 void statusChanged(const QString &status);
96 void mccChanged(const QString &mcc);
97 void mncChanged(const QString &mnc);
98 void technologiesChanged(const QStringList &technologies);
99 void additionalInfoChanged(const QString &additionalInfo);
100
101private:
102
103private Q_SLOTS:
104 void propertyChanged(const QString& property, const QVariant& value);
105
106 void registerResp();
107 void registerErr(const QDBusError& error);
108
109
110private:
111 OfonoInterface *m_if;
112
113};
114#endif
This class is used to access oFono network operator API.
Definition ofononetworkoperator.h:43
QString errorName() const
Get the D-Bus error name of the last operation.
QString path() const
Returns the D-Bus object path of the network operator object.
QString errorMessage() const
Get the D-Bus error message of the last operation.