Add support for ipv6 settings property
[profile/ivi/ofono-qt.git] / lib / 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 <alexander.kanavin@nokia.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
35 class OfonoInterface;
36
37 //! This class is used to access oFono network operator API
38 /*!
39  * The API is documented in
40  * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/network-api.txt
41  */
42 class OFONO_QT_EXPORT OfonoNetworkOperator : public QObject
43 {
44     Q_OBJECT
45 public:
46     OfonoNetworkOperator(const QString& operatorId, QObject *parent=0);
47     OfonoNetworkOperator(const OfonoNetworkOperator& op);
48     ~OfonoNetworkOperator();
49
50     OfonoNetworkOperator operator=(const OfonoNetworkOperator &op);
51     bool operator==(const OfonoNetworkOperator &op);
52
53     //! Returns the D-Bus object path of the network operator object
54     QString path() const;
55     
56     //! Get the D-Bus error name of the last operation.
57     /*!
58      * Returns the D-Bus error name of the last operation (setting a property
59      * or calling a method) if it has failed
60      */
61     QString errorName() const;
62
63     //! Get the D-Bus error message of the last operation.
64     /*!
65      * Returns the D-Bus error message of the last operation (setting a property
66      * or calling a method) if it has failed
67      */
68     QString errorMessage() const;
69
70     void registerOp();
71     
72     QString name() const;
73     QString status() const;
74     QString mcc() const;
75     QString mnc() const;
76     QStringList technologies() const;
77     QString additionalInfo() const;
78     
79 signals:
80     void registerComplete(bool success);
81     
82     void nameChanged(const QString &name);
83     void statusChanged(const QString &status);
84     void mccChanged(const QString &mcc);
85     void mncChanged(const QString &mnc);
86     void technologiesChanged(const QStringList &technologies);
87     void additionalInfoChanged(const QString &additionalInfo);
88
89 private:
90
91 private slots:
92     void propertyChanged(const QString& property, const QVariant& value);
93     
94     void registerResp();
95     void registerErr(const QDBusError& error);
96
97
98 private:
99     OfonoInterface *m_if;
100
101 };
102 #endif