Adding CallVolume interface support in ofono-qt Bindings Signed-off-by: Arun Ravindra...
[profile/ivi/ofono-qt.git] / lib / ofonosimmanager.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 #ifndef OFONOSIMMANAGER_H
25 #define OFONOSIMMANAGER_H
26
27 #include <QtCore/QObject>
28 #include <QStringList>
29 #include <QDBusError>
30 #include "ofonomodeminterface.h"
31 #include "libofono-qt_global.h"
32
33 typedef QMap<QString, QString> OfonoServiceNumbers;
34 Q_DECLARE_METATYPE(OfonoServiceNumbers);
35
36 //! This class is used to access oFono SIM API
37 /*!
38  * The API is documented in
39  * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/sim-api.txt
40  */
41 class OFONO_QT_EXPORT OfonoSimManager : public OfonoModemInterface
42 {
43     Q_OBJECT
44
45 public:
46     OfonoSimManager(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, QObject *parent=0);
47     ~OfonoSimManager();
48
49     /* Properties */
50     bool present() const;
51     QString subscriberIdentity() const;
52     QString mobileCountryCode() const;
53     QString mobileNetworkCode() const;
54     QStringList subscriberNumbers() const;
55     OfonoServiceNumbers serviceNumbers() const;
56     QString pinRequired() const;
57     QStringList lockedPins() const;
58     QString cardIdentifier() const;
59     QStringList preferredLanguages() const;
60
61     void changePin(const QString &pintype, const QString &oldpin, const QString &newpin);
62     void enterPin(const QString &pintype, const QString &pin);
63     void resetPin(const QString &pintype, const QString &puk, const QString &newpin);
64     void lockPin(const QString &pintype, const QString &pin);
65     void unlockPin(const QString &pintype, const QString &pin);
66
67     void setSubscriberNumbers(const QStringList &numbers);
68
69 signals:
70     void presenceChanged(bool ispresent);
71     void subscriberIdentityChanged(const QString &imsi);
72     void mobileCountryCodeChanged(const QString &mcc);
73     void mobileNetworkCodeChanged(const QString &mnc);
74     void subscriberNumbersChanged(const QStringList &msisdns);
75     void setSubscriberNumbersFailed();
76     void serviceNumbersChanged(const OfonoServiceNumbers &sdns);
77     void pinRequiredChanged(const QString &pintype);
78     void lockedPinsChanged(const QStringList &pins);
79     void cardIdentifierChanged(const QString &iccid);
80     void preferredLanguagesChanged(const QStringList &languages);
81
82     void changePinComplete(bool success);
83     void enterPinComplete(bool success);
84     void resetPinComplete(bool success);
85     void lockPinComplete(bool success);
86     void unlockPinComplete(bool success);
87
88
89 private slots:
90     void propertyChanged(const QString& property, const QVariant& value);
91     void setPropertyFailed(const QString& property);    
92
93     void changePinResp();
94     void changePinErr(QDBusError error);
95     void enterPinResp();
96     void enterPinErr(QDBusError error);
97     void resetPinResp();
98     void resetPinErr(QDBusError error);
99     void lockPinResp();
100     void lockPinErr(QDBusError error);
101     void unlockPinResp();
102     void unlockPinErr(QDBusError error);
103
104 private:
105
106 };
107
108 #endif  /* !OFONOSIMMANAGER_H */