171.1.1
by Slava Monich
[libqofono] Added base classes for modem interfaces |
1 |
/****************************************************************************
|
2 |
**
|
|
207.1.1
by Slava Monich
[libqofono] Mark QOfonoModem and other objects invalid if modem goes away. Contributes to MER#1110 |
3 |
** Copyright (C) 2014-2015 Jolla Ltd.
|
171.1.1
by Slava Monich
[libqofono] Added base classes for modem interfaces |
4 |
** Contact: slava.monich@jolla.com
|
5 |
**
|
|
6 |
** GNU Lesser General Public License Usage
|
|
7 |
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
8 |
** General Public License version 2.1 as published by the Free Software
|
|
9 |
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
10 |
** packaging of this file. Please review the following information to
|
|
11 |
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
12 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
13 |
**
|
|
14 |
****************************************************************************/
|
|
15 |
||
16 |
#ifndef QOFONOMODEMINTERFACE_H
|
|
17 |
#define QOFONOMODEMINTERFACE_H
|
|
18 |
||
19 |
#include "qofonoobject.h" |
|
20 |
||
21 |
/**
|
|
22 |
* Modem interface with properties.
|
|
23 |
*/
|
|
24 |
class QOfonoModemInterface : public QOfonoObject |
|
25 |
{
|
|
26 |
Q_OBJECT
|
|
27 |
Q_PROPERTY(QString modemPath READ modemPath WRITE setModemPath NOTIFY modemPathChanged) |
|
28 |
Q_PROPERTY(bool ready READ isReady NOTIFY readyChanged) |
|
29 |
||
171.1.2
by Slava Monich
[libqofono] Restore public ABI |
30 |
protected: |
31 |
QOfonoModemInterface(const QString &iface, ExtData *ext, QObject *parent = NULL); |
|
171.1.1
by Slava Monich
[libqofono] Added base classes for modem interfaces |
32 |
QOfonoModemInterface(const QString &iface, QObject *parent = NULL); |
33 |
~QOfonoModemInterface(); |
|
34 |
||
171.1.2
by Slava Monich
[libqofono] Restore public ABI |
35 |
virtual ExtData* extData() const; |
36 |
||
171.1.1
by Slava Monich
[libqofono] Added base classes for modem interfaces |
37 |
QString modemPath() const; |
38 |
void setModemPath(const QString &path); |
|
39 |
||
40 |
bool isReady() const; |
|
41 |
||
207.1.1
by Slava Monich
[libqofono] Mark QOfonoModem and other objects invalid if modem goes away. Contributes to MER#1110 |
42 |
public: |
43 |
bool isValid() const; |
|
207.3.1
by Slava Monich
[libqofono] Added QOfonoSimWatcher. Contributes to JB#28413 |
44 |
void fixModemPath(const QString &path); |
207.1.1
by Slava Monich
[libqofono] Mark QOfonoModem and other objects invalid if modem goes away. Contributes to MER#1110 |
45 |
|
171.1.1
by Slava Monich
[libqofono] Added base classes for modem interfaces |
46 |
Q_SIGNALS: |
47 |
void modemPathChanged(const QString &path); |
|
48 |
void readyChanged(/* No parameter for historical reasons */); |
|
49 |
||
50 |
protected: |
|
51 |
void getPropertiesFinished(const QVariantMap &properties, const QDBusError *error); |
|
52 |
void updateProperty(const QString &key, const QVariant &value); |
|
53 |
void objectPathChanged(const QString &path, const QVariantMap *properties); |
|
54 |
||
207.1.1
by Slava Monich
[libqofono] Mark QOfonoModem and other objects invalid if modem goes away. Contributes to MER#1110 |
55 |
private Q_SLOTS: |
171.1.1
by Slava Monich
[libqofono] Added base classes for modem interfaces |
56 |
void onModemInterfacesChanged(const QStringList &interfaces); |
207.1.1
by Slava Monich
[libqofono] Mark QOfonoModem and other objects invalid if modem goes away. Contributes to MER#1110 |
57 |
void onModemValidChanged(bool valid); |
171.1.1
by Slava Monich
[libqofono] Added base classes for modem interfaces |
58 |
|
59 |
private: |
|
60 |
class Private; |
|
171.1.2
by Slava Monich
[libqofono] Restore public ABI |
61 |
Private* privateData() const; |
171.1.1
by Slava Monich
[libqofono] Added base classes for modem interfaces |
62 |
};
|
63 |
||
64 |
#endif // QOFONOMODEMINTERFACE_H |