~ken-vandine/ubuntu/wily/libqofono/libqofono-0.79

« back to all changes in this revision

Viewing changes to .pc/connman-resetcontexts.patch/src/qofonoconnectionmanager.h

  • Committer: Ken VanDine
  • Author(s): Ken VanDine, Jonas Drange
  • Date: 2015-05-21 20:16:51 UTC
  • Revision ID: ken.vandine@canonical.com-20150521201651-boa8e4wvl26l369h
Tags: 0.70-0ubuntu4
[ Jonas Drange ]
* debian/patches/connman-resetcontexts.patch
  - Added bindings to Ofono's reset context API (LP: #1338758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 2013-2014 Jolla Ltd.
 
4
** Contact: lorn.potter@jollamobile.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 QOFONOCONNECTIONMANAGER_H
 
17
#define QOFONOCONNECTIONMANAGER_H
 
18
 
 
19
#include "qofonomodeminterface.h"
 
20
#include "qofono_global.h"
 
21
 
 
22
//! This class is used to access ofono connman context API
 
23
/*!
 
24
 * The API is documented in
 
25
 * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob;f=doc/connman-api.txt
 
26
 */
 
27
class QOFONOSHARED_EXPORT QOfonoConnectionManager : public QOfonoModemInterface
 
28
{
 
29
    Q_OBJECT
 
30
    Q_PROPERTY(bool attached READ attached NOTIFY attachedChanged)
 
31
    Q_PROPERTY(QString bearer READ bearer NOTIFY bearerChanged)
 
32
    Q_PROPERTY(bool suspended READ suspended NOTIFY suspendedChanged)
 
33
    Q_PROPERTY(bool roamingAllowed READ roamingAllowed WRITE setRoamingAllowed NOTIFY roamingAllowedChanged)
 
34
    Q_PROPERTY(bool powered READ powered WRITE setPowered NOTIFY poweredChanged)
 
35
 
 
36
    Q_PROPERTY(QStringList contexts READ contexts NOTIFY contextsChanged)
 
37
    Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
 
38
 
 
39
public:
 
40
    explicit QOfonoConnectionManager(QObject *parent = 0);
 
41
    ~QOfonoConnectionManager();
 
42
 
 
43
    QString modemPath() const;
 
44
    void setModemPath(const QString &path);
 
45
 
 
46
    bool attached() const;
 
47
    QString bearer() const;
 
48
    bool suspended() const;
 
49
 
 
50
    bool roamingAllowed() const;
 
51
    void setRoamingAllowed(bool);
 
52
 
 
53
    bool powered() const;
 
54
    void setPowered(bool);
 
55
 
 
56
    QStringList contexts();
 
57
    bool isValid() const;
 
58
 
 
59
    QString filter() const;
 
60
    void setFilter(const QString &filter);
 
61
 
 
62
Q_SIGNALS:
 
63
    void attachedChanged(bool value);
 
64
    void bearerChanged(const QString &bearer);
 
65
    void suspendedChanged(bool suspnd);
 
66
    void roamingAllowedChanged(bool roaming);
 
67
    void poweredChanged(bool powered);
 
68
 
 
69
    void contextAdded(const QString &path);
 
70
    void contextRemoved(const QString &path);
 
71
    void contextsChanged(const QStringList &contexts);
 
72
    void filterChanged(const QString &filter);
 
73
 
 
74
public slots:
 
75
    void deactivateAll();
 
76
    void addContext(const QString &type);
 
77
    void removeContext(const QString &path);
 
78
 
 
79
private slots:
 
80
    void onAddContextFinished(QDBusPendingCallWatcher *watch);
 
81
    void onRemoveContextFinished(QDBusPendingCallWatcher *watch);
 
82
    void onGetContextsFinished(QDBusPendingCallWatcher *watch);
 
83
    void onContextAdded(const QDBusObjectPath &path, const QVariantMap &propertyMap);
 
84
    void onContextRemoved(const QDBusObjectPath &path);
 
85
 
 
86
protected:
 
87
    QDBusAbstractInterface *createDbusInterface(const QString &path);
 
88
    void dbusInterfaceDropped();
 
89
    void propertyChanged(const QString &property, const QVariant &value);
 
90
 
 
91
private:
 
92
    class Private;
 
93
    Private *privateData() const;
 
94
};
 
95
 
 
96
#endif // QOFONOCONNECTIONMANAGER_H