connectivity-api: connectivityqt/modem.h Source File

connectivity-api

modem.h
Go to the documentation of this file.
1 /*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
18 */
19
20 #pragma once
21
22 #include <QDBusConnection>
23 #include <QDBusObjectPath>
24 #include <QObject>
25
26 #include <unity/util/DefinesPtrs.h>
27 #include <connectivityqt/sims-list-model.h>
28
29 namespace connectivityqt
30 {
31
32 class Q_DECL_EXPORT Modem : public QObject
33 {
34 Q_OBJECT
35
36 public:
37 UNITY_DEFINES_PTRS(Modem);
38
39 Modem(const QDBusObjectPath& path,
40 const QDBusConnection& connection,
41 SimsListModel::SPtr sims,
42 QObject* parent = 0);
43
44 virtual ~Modem();
45
46 Q_PROPERTY(QDBusObjectPath path READ path)
47 QDBusObjectPath path() const;
48
49 Q_PROPERTY(QString serial READ serial)
50 QString serial() const;
51
52 Q_PROPERTY(int index READ index CONSTANT)
53 int index() const;
54
55 Q_PROPERTY(connectivityqt::Sim* sim READ sim NOTIFY simChanged)
56 Sim* sim() const;
57
58 public Q_SLOTS:
59
60 Q_SIGNALS:
61 void simChanged(Sim *sim);
62
63 protected:
64 class Priv;
65 std::shared_ptr<Priv> d;
66 };
67
68 }
connectivityqt::Modem::UNITY_DEFINES_PTRS
UNITY_DEFINES_PTRS(Modem)
connectivityqt::Modem
Definition: modem.h:33
connectivityqt
Definition: connectivity.cpp:37
connectivityqt::Sim
Definition: sim.h:32
sims-list-model.h