lomiri-connectivity-api
networking-status.h
Go to the documentation of this file.
1/*
2 * Copyright © 2014 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#ifndef CONNECTIVITY_NETWORKING_STATUS_H
21#define CONNECTIVITY_NETWORKING_STATUS_H
22
23#include <QObject>
24#include <QScopedPointer>
25#include <QVector>
26
27namespace lomiri {
28namespace connectivity {
29
43class Q_DECL_DEPRECATED Q_DECL_EXPORT NetworkingStatus : public QObject
44{
45 Q_OBJECT
46 Q_DISABLE_COPY(NetworkingStatus)
47
48 Q_ENUMS(Limitations)
49 Q_ENUMS(Status)
50
51
60 Q_PROPERTY(QVector<Limitations> limitations
61 READ limitations
62 NOTIFY limitationsChanged)
63
74 READ status
75 NOTIFY statusChanged)
76
77public:
78 explicit NetworkingStatus(QObject *parent = 0);
79 virtual ~NetworkingStatus();
80
82 * @brief enum for networking limitations
83 *
84 * Networking limitations may be accessed through the NetworkingStatus::limitations property.
85 */
86 enum Limitations {
89
92 };
93
95 * @brief enum for networking status
96 *
97 * Networking status may be accessed through the NetworkingStatus::status property.
98 */
99 enum Status {
100 Offline,
101 Connecting,
102 Online
103 };
104
105
107 Q_DECL_DEPRECATED
108 QVector<Limitations> limitations() const;
109
111 Q_DECL_DEPRECATED
112 Status status() const;
114Q_SIGNALS:
116 Q_DECL_DEPRECATED
118
120 Q_DECL_DEPRECATED
121 void statusChanged(Status value);
122
123private:
124 class Private;
125 QScopedPointer<Private> d;
126};
127
128}
129}
130
132Q_DECLARE_METATYPE(QVector<lomiri::connectivity::NetworkingStatus::Limitations>)
134
135#endif // CONNECTIVITY_NETWORKING_STATUS_H
Definition networking-status.cpp:33
QVector< Limitations > limitations
Definition networking-status.h:60
Limitations
enum for networking limitations
Definition networking-status.h:82
@ Bandwidth
Definition networking-status.h:87
NetworkingStatus(QObject *parent=0)
Definition networking-status.cpp:67
Q_DECL_DEPRECATED void statusChanged(Status value)
lomiri::connectivity::NetworkingStatus::Status status
Definition networking-status.h:71
Status
enum for networking status
Definition networking-status.h:95
@ Offline
Definition networking-status.h:96
@ Online
Definition networking-status.h:98
@ Connecting
Definition networking-status.h:97
Q_DECL_DEPRECATED void limitationsChanged()
Definition networking-status.cpp:30
Definition networking-status.cpp:28