-
Notifications
You must be signed in to change notification settings - Fork 10
/
Events.cs
178 lines (127 loc) · 6.15 KB
/
Events.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Copyright (c) 2013 Eugen Pechanec
using System;
using System.Security.Permissions;
namespace EugenPechanec.NativeWifi {
public delegate void WlanEventHandler(object sender, WlanEventArgs e);
public delegate void OneXEventHandler(object sender, OneXEventArgs e);
public delegate void OneXResultUpdateEventHandler(object sender, OneXEventArgs e);
public delegate void OneXAuthRestartedEventHandler(object sender, OneXEventArgs e);
public delegate void AcmEventHandler(object sender, AcmEventArgs e);
public delegate void AcmBssTypeChangeEventHandler(object sender, AcmBssTypeChangeEventArgs e);
public delegate void AcmPowerSettingChangeEventHandler(object sender, AcmPowerSettingChangeEventArgs e);
public delegate void AcmReasonCodeEventHandler(object sender, AcmReasonCodeEventArgs e);
public delegate void AcmConnectionEventHandler(object sender, AcmConnectionEventArgs e);
public delegate void AcmProfileNameChangeEventHandler(object sender, AcmProfileNameChangeEventArgs e);
public delegate void AcmBooleanEventHandler(object sender, AcmBooleanEventArgs e);
public delegate void AcmAdhocNetworkStateChange(object sender, AcmAdhocNetworkStateChangeEventArgs e);
public delegate void MsmEventHandler(object sender, MsmEventArgs e);
public delegate void MsmNotificationEventHandler(object sender, MsmNotificationEventArgs e);
public delegate void MsmDwordEventHandler(object sender, MsmDwordEventArgs e);
public delegate void MsmRadioStateChangeEventHandler(object sender, MsmRadioStateChangeEventArgs e);
public delegate void SecurityEventHandler(object sender, SecurityEventArgs e);
public delegate void IhvEventHandler(object sender, IhvEventArgs e);
public delegate void HnwkEventHandler(object sender, HnwkEventArgs e);
public delegate void HnwkStateChangeEventHandler(object sender, HnwkStateChangeEventArgs e);
public delegate void HnwkPeerStateChangeEventHandler(object sender, HnwkPeerStateChangeEventArgs e);
public delegate void HnwkRadioStateChangeEventHandler(object sender, HnwkRadioStateChangeEventArgs e);
public class WlanEventArgs : EventArgs {
private static WlanEventArgs empty = new WlanEventArgs();
public static new WlanEventArgs Empty {
get {
return empty;
}
}
public Guid InterfaceGuid { get; set; }
public WlanNotificationSource NotificationSource { get; set; }
public object NotificationCode { get; set; }
protected WlanEventArgs() { }
protected WlanEventArgs(WlanNotificationSource source) {
NotificationSource = source;
}
}
#region OneX Notifications
public class OneXEventArgs : WlanEventArgs {
public OneXEventArgs() : base(WlanNotificationSource.OneX) { }
}
public class OneXResultUpdateEventArgs : OneXEventArgs {
public OneXResultUpdateData ResultUpdate { get; set; }
}
public class OneXAuthRestartedEventArgs : OneXEventArgs {
public OneXAuthRestartReason AuthRestartReason { get; set; }
}
#endregion OneX Notifications
#region Acm Notifications
public class AcmEventArgs : WlanEventArgs {
public AcmEventArgs() : base(WlanNotificationSource.Acm) { }
}
public class AcmBssTypeChangeEventArgs : AcmEventArgs {
public Dot11BssType BssType { get; set; }
}
public class AcmPowerSettingChangeEventArgs : AcmEventArgs {
public WlanPowerSetting PowerSetting { get; set; }
}
public class AcmReasonCodeEventArgs : AcmEventArgs {
public WlanReasonCode ReasonCode { get; set; }
}
public class AcmConnectionEventArgs : AcmEventArgs {
public WlanConnectionNotificationData ConnectionData { get; set; }
}
public class AcmProfileNameChangeEventArgs : AcmEventArgs {
public String OldName { get; set; }
public String NewName { get; set; }
}
public class AcmBooleanEventArgs : AcmEventArgs {
public bool Value { get; set; }
}
public class AcmAdhocNetworkStateChangeEventArgs : AcmEventArgs {
public WlanAdhocNetworkState AdhocNetowrkState { get; set; }
}
#endregion Acm Notifications
#region Msm Notifications
public class MsmEventArgs : WlanEventArgs {
public MsmEventArgs() : base(WlanNotificationSource.Msm) { }
}
public class MsmNotificationEventArgs : MsmEventArgs {
public WlanMsmNotificationData NotificationData { get; set; }
}
public class MsmDwordEventArgs : MsmEventArgs {
public uint Value { get; set; }
}
public class MsmRadioStateChangeEventArgs : MsmEventArgs {
public WlanPhyRadioState RadioState { get; set; }
}
public class MsmOperationModeChange : MsmEventArgs {
public Dot11OperationMode OperationMode { get; set; }
}
#endregion Msm Notifications
#region Security Notifications
public class SecurityEventArgs : WlanEventArgs {
public SecurityEventArgs() : base(WlanNotificationSource.Security) { }
}
#endregion Security Notifications
#region Ihv Notifications
public class IhvEventArgs : WlanEventArgs {
internal IntPtr Data { get; set; }
internal uint DataSize { get; set; }
public IhvEventArgs() : base(WlanNotificationSource.Ihv) { }
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
public T InterpretStruct<T>() where T : struct {
return Util.ParseStruct<T>(Data, DataSize);
}
}
#endregion Ihv Notifications
#region Hosted Network Notifications
public class HnwkEventArgs : WlanEventArgs {
public HnwkEventArgs() : base (WlanNotificationSource.HostedNetwork) { }
}
public class HnwkPeerStateChangeEventArgs : HnwkEventArgs {
public WlanHostedNetworkDataPeerStateChange PeerState { get; set; }
}
public class HnwkRadioStateChangeEventArgs : HnwkEventArgs {
public WlanHostedNetworkRadioState RadioState { get; set; }
}
public class HnwkStateChangeEventArgs : HnwkEventArgs {
public WlanHostedNetworkStateChange State { get; set; }
}
#endregion Hosted Network Notifications
}