Adding CallVolume interface support in ofono-qt Bindings Signed-off-by: Arun Ravindra...
[profile/ivi/ofono-qt.git] / lib / ofononetworkregistration.h
1 /*
2  * This file is part of ofono-qt
3  *
4  * Copyright (C) 2010-2011 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 #ifndef OFONONETWORKREGISTRATION_H
25 #define OFONONETWORKREGISTRATION_H
26
27 #include <QtCore/QObject>
28 #include <QStringList>
29 #include <QDBusError>
30 #include <QDBusObjectPath>
31 #include "ofonomodeminterface.h"
32 #include "libofono-qt_global.h"
33
34 struct OfonoOperatorStruct {
35     QDBusObjectPath path;
36     QVariantMap properties;
37 };
38 typedef QList<OfonoOperatorStruct> OfonoOperatorList;
39 Q_DECLARE_METATYPE(OfonoOperatorStruct)
40 Q_DECLARE_METATYPE(OfonoOperatorList)
41
42 //! This class is used to access oFono network registration API
43 /*!
44  * The API is documented in
45  * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/network-api.txt
46  */
47 class OFONO_QT_EXPORT OfonoNetworkRegistration : public OfonoModemInterface
48 {
49     Q_OBJECT
50
51 public:
52     OfonoNetworkRegistration(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, QObject *parent=0);
53     ~OfonoNetworkRegistration();
54     
55     /* Properties */
56     QString mode() const;
57     QString status() const;
58     uint locationAreaCode() const;
59     uint cellId() const;
60     QString mcc() const;
61     QString mnc() const;
62     QString technology() const;
63     QString name() const;
64     uint strength() const;
65     QString baseStation() const;
66     
67     void registerOp();
68     void getOperators();
69     void scan();
70     
71 signals:
72     void modeChanged(const QString &mode);
73     void statusChanged(const QString &status);
74     void locationAreaCodeChanged(uint locationAreaCode);
75     void cellIdChanged(uint cellId);
76     void mccChanged(const QString &mcc);
77     void mncChanged(const QString &mnc);
78     void technologyChanged(const QString &technology);
79     void nameChanged(const QString &name);
80     void strengthChanged(uint strength);
81     void baseStationChanged(const QString &baseStation);
82
83     void registerComplete(bool success);
84     void getOperatorsComplete(bool success, const QStringList &operatorIds);
85     void scanComplete(bool success, const QStringList &operatorIds);
86
87 private slots:
88     void propertyChanged(const QString& property, const QVariant& value);
89     void registerResp();
90     void registerErr(QDBusError error);
91     void getOperatorsResp(OfonoOperatorList list);
92     void getOperatorsErr(QDBusError error);
93     void scanResp(OfonoOperatorList list);
94     void scanErr(QDBusError error);
95
96 private:
97
98 };
99
100 #endif  /* !OFONONETWORKREGISTRATION_H */