~nemo-mobile-team/nemo-mobile/timed

« back to all changes in this revision

Viewing changes to src/server/modemwatcher.h

  • Committer: David Greaves
  • Author(s): David Greaves
  • Date: 2015-10-19 14:58:14 UTC
  • Revision ID: git-v1:b7bd70c81a570d683dc3efd4418fb15fd5a407a3
Migration to git.merproject.org

Signed-off-by: David Greaves <david.greaves@jolla.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
**                                                                        **
3
 
**  Copyright (C) 2013 Jolla Ltd.                                         **
4
 
**  Contact: Petri M. Gerdt <petri.gerdt@jollamobile.com>                 **
5
 
**                                                                        **
6
 
**     This file is part of Timed                                         **
7
 
**                                                                        **
8
 
**     Timed is free software; you can redistribute it and/or modify      **
9
 
**     it under the terms of the GNU Lesser General Public License        **
10
 
**     version 2.1 as published by the Free Software Foundation.          **
11
 
**                                                                        **
12
 
**     Timed 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.               **
15
 
**     See the GNU 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 Timed. If not, see http://www.gnu.org/licenses/   **
19
 
**                                                                        **
20
 
***************************************************************************/
21
 
 
22
 
#ifndef MODEMWATCHER_H
23
 
#define MODEMWATCHER_H
24
 
 
25
 
#include <QObject>
26
 
#include <QVariant>
27
 
#include <QDBusVariant>
28
 
 
29
 
class QDBusInterface;
30
 
class QDBusPendingCallWatcher;
31
 
class QDBusServiceWatcher;
32
 
 
33
 
class ModemWatcher : public QObject
34
 
{
35
 
    Q_OBJECT
36
 
 
37
 
public:
38
 
    explicit ModemWatcher(const QString objectPath, const QString interface, QObject *parent = 0);
39
 
    ~ModemWatcher();
40
 
    bool interfaceAvailable() const;
41
 
    QString objectPath() const;
42
 
    QString interface() const;
43
 
 
44
 
signals:
45
 
    void interfaceAvailableChanged(bool available);
46
 
 
47
 
private:
48
 
    QString m_objectPath;
49
 
    QString m_interface;
50
 
    bool m_interfaceAvailable;
51
 
    QDBusServiceWatcher *m_ofonoWatcher;
52
 
 
53
 
    void checkInterfaceAvailability(QVariant variant);
54
 
 
55
 
private slots:
56
 
    void onModemPropertyChanged(QString objectPath, QDBusVariant value);
57
 
    void getProperties();
58
 
    void getPropertiesReply(QDBusPendingCallWatcher *call);
59
 
};
60
 
#endif // MODEMWATCHER_H