Qt bindings for oFono cellular services  1.30
ofonocellbroadcast.h
1 /*
2  * This file is part of ofono-qt
3  *
4  * Copyright (C) 2012 Jolla Ltd.
5  *
6  * Contact: Lorn Potter <lorn.potter@jollamobile.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 
25 #ifndef OFONOCELLBROADCAST_H
26 #define OFONOCELLBROADCAST_H
27 
28 #include <QtCore/QObject>
29 #include <QVariant>
30 #include <QStringList>
31 #include <QDBusError>
32 #include "ofonomodeminterface.h"
33 #include "libofono-qt_global.h"
34 
35 
37 
41 class OFONO_QT_EXPORT OfonoCellBroadcast : public OfonoModemInterface
42 {
43  Q_OBJECT
44 
45  Q_PROPERTY(QString path READ path)
46  Q_PROPERTY(QString errorName READ errorName)
47  Q_PROPERTY(QString errorMessage READ errorMessage)
48 
49  Q_PROPERTY(bool powered READ powered WRITE setPowered NOTIFY powerChanged)
50  Q_PROPERTY(QString topics READ topics NOTIFY topicsChanged)
51 
52 public:
53  explicit OfonoCellBroadcast(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, QObject *parent = 0);
55 
56  QString path() const;
57 
58  bool powered() const;
59  void setPowered(bool b);
60  QString topics() const;
61  void setTopics(const QString &) const;
62 
63  QString errorName() const;
64  QString errorMessage() const;
65 signals:
66  void powerChanged(bool);
67  void topicsChanged(const QString &);
68  void incomingBroadcast(const QString &, quint16);
69  void emergencyBroadcast(const QString &, const QVariantMap &);
70 
71 public slots:
72 
73 private slots:
74  void propertyChanged(const QString& property, const QVariant& value);
75  void inBroadcast(const QString &message, quint16 channel);
76  void emBroadcast(const QString &message, const QVariantMap &properties);
77 
78 };
79 
80 #endif // OFONOCELLBROADCAST_H
OfonoModem::SelectionSetting
SelectionSetting
How the modem object should select a modem.
Definition: ofonomodem.h:68
OfonoCellBroadcast
This class is used to access oFono cell broadcast API.
Definition: ofonocellbroadcast.h:41
OfonoModemInterface
This class implements a generic modem interface object.
Definition: ofonomodeminterface.h:41