connectivity-api: ubuntu/connectivity/networking-status.h Source File

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
27 namespace ubuntu {
28 namespace connectivity {
29
43 class 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
64
73 Q_PROPERTY(ubuntu::connectivity::NetworkingStatus::Status status
74 READ status
75 NOTIFY statusChanged)
76
77 public:
78 explicit NetworkingStatus(QObject *parent = 0);
79 virtual ~NetworkingStatus();
80
86 enum Limitations {
91 Bandwith
92 };
93
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;
113
114 Q_SIGNALS:
116 Q_DECL_DEPRECATED
117 void limitationsChanged();
118
120 Q_DECL_DEPRECATED
121 void statusChanged(Status value);
122
123 private:
124 class Private;
125 QScopedPointer<Private> d;
126 };
127
128 }
129 }
130
131 Q_DECLARE_METATYPE(ubuntu::connectivity::NetworkingStatus::Limitations)
132 Q_DECLARE_METATYPE(QVector<ubuntu::connectivity::NetworkingStatus::Limitations>)
133 Q_DECLARE_METATYPE(ubuntu::connectivity::NetworkingStatus::Status)
134
135 #endif // CONNECTIVITY_NETWORKING_STATUS_H
ubuntu::connectivity::NetworkingStatus::Offline
@ Offline
Definition: networking-status.h:100
ubuntu::connectivity::NetworkingStatus::Limitations
Limitations
enum for networking limitations
Definition: networking-status.h:86
ubuntu::connectivity::NetworkingStatus::limitationsChanged
Q_DECL_DEPRECATED void limitationsChanged()
ubuntu::connectivity::NetworkingStatus
Overall system networking status.
Definition: networking-status.cpp:33
ubuntu::connectivity::NetworkingStatus::Status
Status
enum for networking status
Definition: networking-status.h:99
ubuntu::connectivity::NetworkingStatus::statusChanged
Q_DECL_DEPRECATED void statusChanged(Status value)
ubuntu
Definition: networking-status.cpp:28
ubuntu::connectivity::NetworkingStatus::Connecting
@ Connecting
Definition: networking-status.h:101