trikRuntime
networkStructs.h
Go to the documentation of this file.
1 /* Copyright 2015 - 2016 Yurii Litvinov and CyberTech Labs Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License. */
14 
15 #pragma once
16 
17 #include <QtCore/QString>
18 
19 namespace trikWiFi {
20 
22 enum class Security
23 {
25  wpa
26 
28  , wep
29 
31  , none
32 };
33 
35 enum class DisconnectReason
36 {
38  planned
39 
41  , unplanned
42 };
43 
44 enum class SignalStrength
45 {
46  undefined
47  , low
48  , medium
49  , high
50 };
51 
53 struct Status
54 {
56  bool connected = false;
57 
59  QString ssid;
60 
62  QString ipAddress;
63 };
64 
66 struct ScanResult
67 {
69  QString ssid;
70 
72  Security security {};
73 
75  bool known {};
76 };
77 
78 }
79 
Contains description of a network obtained by scanning.
Definition: networkStructs.h:66
DisconnectReason
Enum with possible reasons of "disconnect" message.
Definition: networkStructs.h:35
Disconnected ourselves.
Contains info about current connection.
Definition: networkStructs.h:53
QString ssid
SSID of currently connected network.
Definition: networkStructs.h:59
QString ssid
SSID of a network.
Definition: networkStructs.h:69
QString ipAddress
Current IP address.
Definition: networkStructs.h:62
Definition: controller.h:25
SignalStrength
Definition: networkStructs.h:44
Uses some kind of WPA security algorithm. Authorization required.
It is an open network.
Security
Enum with possible network security.
Definition: networkStructs.h:22