|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef QNETWORKSESSIONENGINE_WIN_P_H |
|
43 #define QNETWORKSESSIONENGINE_WIN_P_H |
|
44 |
|
45 // |
|
46 // W A R N I N G |
|
47 // ------------- |
|
48 // |
|
49 // This file is not part of the Qt API. It exists purely as an |
|
50 // implementation detail. This header file may change from version to |
|
51 // version without notice, or even be removed. |
|
52 // |
|
53 // We mean it. |
|
54 // |
|
55 |
|
56 #include <winsock2.h> |
|
57 #include <mswsock.h> |
|
58 #undef interface |
|
59 #include <winioctl.h> |
|
60 |
|
61 #ifndef NS_NLA |
|
62 |
|
63 #define NS_NLA 15 |
|
64 |
|
65 enum NLA_BLOB_DATA_TYPE { |
|
66 NLA_RAW_DATA = 0, |
|
67 NLA_INTERFACE = 1, |
|
68 NLA_802_1X_LOCATION = 2, |
|
69 NLA_CONNECTIVITY = 3, |
|
70 NLA_ICS = 4 |
|
71 }; |
|
72 |
|
73 enum NLA_CONNECTIVITY_TYPE { |
|
74 NLA_NETWORK_AD_HOC = 0, |
|
75 NLA_NETWORK_MANAGED = 1, |
|
76 NLA_NETWORK_UNMANAGED = 2, |
|
77 NLA_NETWORK_UNKNOWN = 3 |
|
78 }; |
|
79 |
|
80 enum NLA_INTERNET { |
|
81 NLA_INTERNET_UNKNOWN = 0, |
|
82 NLA_INTERNET_NO = 1, |
|
83 NLA_INTERNET_YES = 2 |
|
84 }; |
|
85 |
|
86 struct NLA_BLOB { |
|
87 struct { |
|
88 NLA_BLOB_DATA_TYPE type; |
|
89 DWORD dwSize; |
|
90 DWORD nextOffset; |
|
91 } header; |
|
92 |
|
93 union { |
|
94 // NLA_RAW_DATA |
|
95 CHAR rawData[1]; |
|
96 |
|
97 // NLA_INTERFACE |
|
98 struct { |
|
99 DWORD dwType; |
|
100 DWORD dwSpeed; |
|
101 CHAR adapterName[1]; |
|
102 } interfaceData; |
|
103 |
|
104 // NLA_802_1X_LOCATION |
|
105 struct { |
|
106 CHAR information[1]; |
|
107 } locationData; |
|
108 |
|
109 // NLA_CONNECTIVITY |
|
110 struct { |
|
111 NLA_CONNECTIVITY_TYPE type; |
|
112 NLA_INTERNET internet; |
|
113 } connectivity; |
|
114 |
|
115 // NLA_ICS |
|
116 struct { |
|
117 struct { |
|
118 DWORD speed; |
|
119 DWORD type; |
|
120 DWORD state; |
|
121 WCHAR machineName[256]; |
|
122 WCHAR sharedAdapterName[256]; |
|
123 } remote; |
|
124 } ICS; |
|
125 } data; |
|
126 }; |
|
127 #endif |
|
128 |
|
129 enum NDIS_MEDIUM { |
|
130 NdisMedium802_3 = 0, |
|
131 }; |
|
132 |
|
133 enum NDIS_PHYSICAL_MEDIUM { |
|
134 NdisPhysicalMediumWirelessLan = 1, |
|
135 NdisPhysicalMediumBluetooth = 10, |
|
136 NdisPhysicalMediumWiMax = 12, |
|
137 }; |
|
138 |
|
139 #define OID_GEN_MEDIA_SUPPORTED 0x00010103 |
|
140 #define OID_GEN_PHYSICAL_MEDIUM 0x00010202 |
|
141 |
|
142 #define IOCTL_NDIS_QUERY_GLOBAL_STATS \ |
|
143 CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS) |
|
144 |
|
145 #endif // QNETWORKSESSIONENGINE_WIN_P_H |