Remove unnecessary includes
[profile/ivi/ofono-qt.git] / lib / ofonomodemmanager.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 OFONOMODEMMANAGER_H
25 #define OFONOMODEMMANAGER_H
26
27 #include <QtCore/QObject>
28 #include <QVariant>
29 #include <QDBusObjectPath>
30 #include <QStringList>
31 #include "libofono-qt_global.h"
32
33 struct OfonoModemStruct {
34     QDBusObjectPath path;
35     QVariantMap properties;
36 };
37 typedef QList<OfonoModemStruct> OfonoModemList;
38 Q_DECLARE_METATYPE(OfonoModemStruct)
39 Q_DECLARE_METATYPE(OfonoModemList)
40
41 //! Provides access to the list of available modems and changes in that list.
42 class OFONO_QT_EXPORT OfonoModemManager : public QObject {
43
44 Q_OBJECT
45
46 public:
47
48     OfonoModemManager(QObject *parent=0);
49
50     ~OfonoModemManager();
51
52     //! Returns a list of d-bus object paths that represent available modems
53     QStringList modems() const;
54
55 signals:
56     //! Issued when a modem has been added
57     void modemAdded(const QString &modemPath);
58     
59     //! Issued when a modem has been removed
60     void modemRemoved(const QString &modemPath);
61
62 private slots:
63     void onModemAdded(const QDBusObjectPath &path, const QVariantMap &map);
64     void onModemRemoved(const QDBusObjectPath &path);
65
66 private:
67     QStringList m_modems;
68 };
69
70 #endif