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
24 #ifndef OFONOSIMMANAGER_H
25 #define OFONOSIMMANAGER_H
27 #include <QtCore/QObject>
28 #include <QStringList>
30 #include "ofonomodeminterface.h"
31 #include "libofono-qt_global.h"
33 typedef QMap<QString, QString> OfonoServiceNumbers;
34 Q_DECLARE_METATYPE(OfonoServiceNumbers);
36 //! This class is used to access oFono SIM API
38 * The API is documented in
39 * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/sim-api.txt
41 class OFONO_QT_EXPORT OfonoSimManager : public OfonoModemInterface
46 OfonoSimManager(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, QObject *parent=0);
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;
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);
67 void setSubscriberNumbers(const QStringList &numbers);
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);
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);
90 void propertyChanged(const QString& property, const QVariant& value);
91 void setPropertyFailed(const QString& property);
94 void changePinErr(QDBusError error);
96 void enterPinErr(QDBusError error);
98 void resetPinErr(QDBusError error);
100 void lockPinErr(QDBusError error);
101 void unlockPinResp();
102 void unlockPinErr(QDBusError error);
108 #endif /* !OFONOSIMMANAGER_H */