2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Collections.Generic;
20 namespace Tizen.Network.WiFiDirect
23 /// An extended EventArgs class which contains changed connection state during connecting or disconnecting peer device.
25 public class ConnectionStateChangedEventArgs : EventArgs
27 private WiFiDirectError _error;
28 private WiFiDirectConnectionState _state;
29 private string _macAddress;
31 internal ConnectionStateChangedEventArgs(WiFiDirectError error, WiFiDirectConnectionState state, string macAddress)
35 _macAddress = macAddress;
39 /// Wi-Fi Direct result.
41 public WiFiDirectError Error
50 /// Wi-Fi Direct connection state of peer.
52 public WiFiDirectConnectionState State
61 /// MacAddress of peer.
63 public string MacAddress
73 /// An extended EventArgs class which contains address properties of the peer when it connects to a group owner.
75 public class IpAddressAssignedEventArgs : EventArgs
77 private string _macAddress;
78 private string _ipAddress;
79 private string _interfaceAddress;
81 internal IpAddressAssignedEventArgs(string macAddress, string ipAddress, string interfaceAddress)
83 _macAddress = macAddress;
84 _ipAddress = ipAddress;
85 _interfaceAddress = interfaceAddress;
89 /// MacAddress of connected peer.
91 public string MacAddress
100 /// IpAddress of connected peer.
102 public string IpAddress
111 /// InterfaceAddress of connected peer.
113 public string InterfaceAddress
117 return _interfaceAddress;
123 /// An extended EventArgs class which contains changed Wi-Fi Direct state of local device.
125 public class StateChangedEventArgs : EventArgs
127 private WiFiDirectState _state;
129 internal StateChangedEventArgs(WiFiDirectState state)
135 /// Wi-Fi Direct state.
137 public WiFiDirectState State
147 /// An extended EventArgs class which contains changed Wi-Fi Direct discovery state during Wi-Fi Direct scan operation.
149 public class DiscoveryStateChangedEventArgs : EventArgs
151 private WiFiDirectError _error;
152 private WiFiDirectDiscoveryState _state;
154 internal DiscoveryStateChangedEventArgs(WiFiDirectError error, WiFiDirectDiscoveryState state)
161 /// Wi-Fi Direct result.
163 public WiFiDirectError Error
172 /// Wi-Fi Direct Discovery state.
174 public WiFiDirectDiscoveryState DiscoveryState
184 /// An extended EventArgs class which contains found peer information during Wi-Fi Direct scan operation.
186 public class PeerFoundEventArgs : EventArgs
188 private WiFiDirectError _error;
189 private WiFiDirectDiscoveryState _state;
190 private WiFiDirectPeer _peer;
192 internal PeerFoundEventArgs(WiFiDirectError error, WiFiDirectDiscoveryState state, WiFiDirectPeer peer)
200 /// Wi-Fi Direct result.
202 public WiFiDirectError Error
211 /// Wi-Fi Direct Discovery state.
213 public WiFiDirectDiscoveryState DiscoveryState
224 public WiFiDirectPeer Peer
234 /// An extended EventArgs class which contains changed device state during activation or deactivation.
236 public class DeviceStateChangedEventArgs : EventArgs
238 private WiFiDirectError _error;
239 private WiFiDirectDeviceState _state;
241 internal DeviceStateChangedEventArgs(WiFiDirectError error, WiFiDirectDeviceState state)
248 /// Wi-Fi Direct result.
250 public WiFiDirectError Error
259 /// State of the device.
261 public WiFiDirectDeviceState DeviceState
271 /// An extended EventArgs class which contains changed service information during service discovery.
273 public class ServiceStateChangedEventArgs : EventArgs
275 private WiFiDirectError _error;
276 private WiFiDirectServiceDiscoveryState _state;
277 private WiFiDirectServiceType _type;
278 private string _response;
279 private WiFiDirectPeer _peer;
281 internal ServiceStateChangedEventArgs(WiFiDirectError error, WiFiDirectServiceDiscoveryState state, WiFiDirectServiceType type, string response, WiFiDirectPeer peer)
286 _response = response;
291 /// Wi-Fi Direct result.
293 public WiFiDirectError Error
302 /// Service discovery state.
304 public WiFiDirectServiceDiscoveryState ServiceDiscoveryState
313 /// Types of service.
315 public WiFiDirectServiceType ServiceType
324 /// Received response.
326 public string Response
335 /// Peer servicing device.
337 public WiFiDirectPeer Peer
347 /// An extended EventArgs class which contains changed connection state during disconnect all peers or group related operations.
349 public class ConnectionStatusChangedEventArgs : EventArgs
351 private WiFiDirectError _error;
352 private WiFiDirectConnectionState _state;
354 internal ConnectionStatusChangedEventArgs(WiFiDirectError error, WiFiDirectConnectionState state)
361 /// Wi-Fi Direct result.
363 public WiFiDirectError Error
372 /// Connection state.
374 public WiFiDirectConnectionState ConnectionState