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;
19 using System.ComponentModel;
22 using System.Threading.Tasks;
23 using System.Runtime.InteropServices;
25 namespace Tizen.Network.Connection
28 /// This class manages the connection handle resources.
30 /// <since_tizen> 3 </since_tizen>
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public sealed class SafeConnectionHandle : SafeHandle
34 internal SafeConnectionHandle(IntPtr handle) : base(handle, true)
39 /// Checks whether the handle value is valid or not.
41 /// <value>True if the handle is invalid, otherwise false.</value>
42 /// <since_tizen> 3 </since_tizen>
43 public override bool IsInvalid
47 return this.handle == IntPtr.Zero;
54 /// <returns>True if the handle is released successfully, otherwise false.</returns>
55 protected override bool ReleaseHandle()
57 this.SetHandle(IntPtr.Zero);
63 /// This is the ConnectionManager class. It provides functions to manage data connections.
65 /// <since_tizen> 3 </since_tizen>
66 public static class ConnectionManager
68 private static ConnectionItem _currentConnection = null;
71 /// An event is called when the type of the current connection is changed.
73 /// <since_tizen> 3 </since_tizen>
74 /// <privilege>http://tizen.org/privilege/network.get</privilege>
75 /// <feature>http://tizen.org/feature/network.ethernet</feature>
76 /// <feature>http://tizen.org/feature/network.telephony</feature>
77 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
78 /// <feature>http://tizen.org/feature/network.wifi</feature>
79 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
80 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
81 public static event EventHandler<ConnectionTypeEventArgs> ConnectionTypeChanged
85 ConnectionInternalManager.Instance.ConnectionTypeChanged += value;
90 ConnectionInternalManager.Instance.ConnectionTypeChanged -= value;
95 /// An event for the ethernet cable is plugged [in/out] event.
97 /// <since_tizen> 3 </since_tizen>
98 /// <privilege>http://tizen.org/privilege/network.get</privilege>
99 /// <feature>http://tizen.org/feature/network.ethernet</feature>
100 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
101 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
102 public static event EventHandler<EthernetCableStateEventArgs> EthernetCableStateChanged
106 ConnectionInternalManager.Instance.EthernetCableStateChanged += value;
111 ConnectionInternalManager.Instance.EthernetCableStateChanged -= value;
116 /// An event is called when the IP address is changed.
118 /// <since_tizen> 3 </since_tizen>
119 /// <privilege>http://tizen.org/privilege/network.get</privilege>
120 /// <feature>http://tizen.org/feature/network.ethernet</feature>
121 /// <feature>http://tizen.org/feature/network.telephony</feature>
122 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
123 /// <feature>http://tizen.org/feature/network.wifi</feature>
124 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
125 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
126 public static event EventHandler<AddressEventArgs> IPAddressChanged
130 ConnectionInternalManager.Instance.IPAddressChanged += value;
135 ConnectionInternalManager.Instance.IPAddressChanged -= value;
140 /// An event is called when the proxy address is changed.
142 /// <since_tizen> 3 </since_tizen>
143 /// <privilege>http://tizen.org/privilege/network.get</privilege>
144 /// <feature>http://tizen.org/feature/network.ethernet</feature>
145 /// <feature>http://tizen.org/feature/network.telephony</feature>
146 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
147 /// <feature>http://tizen.org/feature/network.wifi</feature>
148 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
149 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
150 public static event EventHandler<AddressEventArgs> ProxyAddressChanged
154 ConnectionInternalManager.Instance.ProxyAddressChanged += value;
159 ConnectionInternalManager.Instance.ProxyAddressChanged -= value;
164 /// Gets the connection handle.
166 /// <since_tizen> 3 </since_tizen>
167 /// <returns>Instance of SafeConnectionHandle.</returns>
168 [EditorBrowsable(EditorBrowsableState.Never)]
169 public static SafeConnectionHandle GetConnectionHandle()
171 IntPtr handle = ConnectionInternalManager.Instance.GetHandle();
172 return new SafeConnectionHandle(handle);
176 /// Gets the IP address of the current connection.
178 /// <since_tizen> 3 </since_tizen>
179 /// <param name="family">The address family.</param>
180 /// <returns>IP address of the connection (global address in case of IPv6).</returns>
181 /// <privilege>http://tizen.org/privilege/network.get</privilege>
182 /// <feature>http://tizen.org/feature/network.ethernet</feature>
183 /// <feature>http://tizen.org/feature/network.telephony</feature>
184 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
185 /// <feature>http://tizen.org/feature/network.wifi</feature>
186 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
187 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
188 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
189 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
190 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
191 public static System.Net.IPAddress GetIPAddress(AddressFamily family)
193 return ConnectionInternalManager.Instance.GetIPAddress(family);
197 /// Gets all the IPv6 addresses of the current connection.
199 /// <since_tizen> 3 </since_tizen>
200 /// <param name="type">The type of current network connection.</param>
201 /// <returns>A list of IPv6 addresses of the connection.</returns>
202 /// <privilege>http://tizen.org/privilege/network.get</privilege>
203 /// <feature>http://tizen.org/feature/network.ethernet</feature>
204 /// <feature>http://tizen.org/feature/network.telephony</feature>
205 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
206 /// <feature>http://tizen.org/feature/network.wifi</feature>
207 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
208 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
209 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
210 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
211 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
212 public static IEnumerable<System.Net.IPAddress> GetAllIPv6Addresses(ConnectionType type)
214 return ConnectionInternalManager.Instance.GetAllIPv6Addresses(type);
218 /// Gets the proxy address of the current connection.
220 /// <since_tizen> 3 </since_tizen>
221 /// <param name="family">The address family.</param>
222 /// <returns>Proxy address of the connection.</returns>
223 /// <privilege>http://tizen.org/privilege/network.get</privilege>
224 /// <feature>http://tizen.org/feature/network.ethernet</feature>
225 /// <feature>http://tizen.org/feature/network.telephony</feature>
226 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
227 /// <feature>http://tizen.org/feature/network.wifi</feature>
228 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
229 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
230 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
231 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
232 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
233 public static string GetProxy(AddressFamily family)
235 return ConnectionInternalManager.Instance.GetProxy(family);
239 /// Gets the MAC address of the Wi-Fi or ethernet.
241 /// <since_tizen> 3 </since_tizen>
242 /// <param name="type">The type of current network connection.</param>
243 /// <returns>MAC address of the Wi-Fi or ethernet.</returns>
244 /// <privilege>http://tizen.org/privilege/network.get</privilege>
245 /// <feature>http://tizen.org/feature/network.ethernet</feature>
246 /// <feature>http://tizen.org/feature/network.telephony</feature>
247 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
248 /// <feature>http://tizen.org/feature/network.wifi</feature>
249 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
250 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
251 /// <exception cref="System.ArgumentException">Thrown when value is an invalid parameter.</exception>
252 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
253 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
254 public static string GetMacAddress(ConnectionType type)
256 return ConnectionInternalManager.Instance.GetMacAddress(type);
260 /// Gets the statistics information.
262 /// <since_tizen> 3 </since_tizen>
263 /// <param name="connectionType">The type of connection (only WiFi and Cellular are supported).</param>
264 /// <param name="statisticsType">The type of statistics.</param>
265 /// <returns>The statistics information associated with statisticsType.</returns>
266 /// <privilege>http://tizen.org/privilege/network.get</privilege>
267 /// <feature>http://tizen.org/feature/network.ethernet</feature>
268 /// <feature>http://tizen.org/feature/network.telephony</feature>
269 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
270 /// <feature>http://tizen.org/feature/network.wifi</feature>
271 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
272 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
273 /// <exception cref="System.ArgumentException">Thrown when value is an invalid parameter.</exception>
274 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
275 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to invalid operation.</exception>
276 public static long GetStatistics(ConnectionType connectionType, StatisticsType statisticsType)
278 return ConnectionInternalManager.Instance.GetStatistics(connectionType, statisticsType);
282 /// Resets the statistics information.
284 /// <since_tizen> 3 </since_tizen>
285 /// <param name="connectionType">The type of connection (only WiFi and Cellular are supported).</param>
286 /// <param name="statisticsType">The type of statistics.</param>
287 /// <privilege>http://tizen.org/privilege/network.get</privilege>
288 /// <privilege>http://tizen.org/privilege/network.set</privilege>
289 /// <feature>http://tizen.org/feature/network.ethernet</feature>
290 /// <feature>http://tizen.org/feature/network.telephony</feature>
291 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
292 /// <feature>http://tizen.org/feature/network.wifi</feature>
293 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
294 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
295 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
296 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
297 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
298 public static void ResetStatistics(ConnectionType connectionType, StatisticsType statisticsType)
300 ConnectionInternalManager.Instance.ResetStatistics(connectionType, statisticsType);
304 /// Adds a route to the routing table.
306 /// <since_tizen> 4 </since_tizen>
307 /// <param name="family">The address family.</param>
308 /// <param name="interfaceName">The name of the network interface.</param>
309 /// <param name="hostAddress">The IP address of the host.</param>
310 /// <param name="gateway">The gateway address.</param>
311 /// <privilege>http://tizen.org/privilege/network.get</privilege>
312 /// <privilege>http://tizen.org/privilege/network.route</privilege>
313 /// <feature>http://tizen.org/feature/network.telephony</feature>
314 /// <feature>http://tizen.org/feature/network.wifi</feature>
315 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
316 /// <feature>http://tizen.org/feature/network.ethernet</feature>
317 /// <feature>http://tizen.org/feature/network.route</feature>
318 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
319 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
320 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
321 /// <exception cref="System.ArgumentNullException">Thrown when an interfaceName or a hostAddress or a gateway is null.</exception>
322 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
323 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
324 public static void AddRoute(AddressFamily family, string interfaceName, System.Net.IPAddress hostAddress, System.Net.IPAddress gateway)
326 ConnectionInternalManager.Instance.AddRoute(family, interfaceName, hostAddress, gateway);
330 /// Removes a route from the routing table.
332 /// <since_tizen> 4 </since_tizen>
333 /// <param name="family">The address family.</param>
334 /// <param name="interfaceName">The name of network interface.</param>
335 /// <param name="hostAddress">The IP address of the host.</param>
336 /// <param name="gateway">The gateway address.</param>
337 /// <privilege>http://tizen.org/privilege/network.get</privilege>
338 /// <privilege>http://tizen.org/privilege/network.route</privilege>
339 /// <feature>http://tizen.org/feature/network.telephony</feature>
340 /// <feature>http://tizen.org/feature/network.wifi</feature>
341 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
342 /// <feature>http://tizen.org/feature/network.ethernet</feature>
343 /// <feature>http://tizen.org/feature/network.route</feature>
344 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
345 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
346 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
347 /// <exception cref="System.ArgumentNullException">Thrown when an interfaceName or a hostAddress or a gateway is null.</exception>
348 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
349 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
350 public static void RemoveRoute(AddressFamily family, string interfaceName, System.Net.IPAddress hostAddress, System.Net.IPAddress gateway)
352 ConnectionInternalManager.Instance.RemoveRoute(family, interfaceName, hostAddress, gateway);
356 /// The type and state of the current profile for data connection.
358 /// <since_tizen> 3 </since_tizen>
359 /// <value>Instance of ConnectionItem.</value>
360 public static ConnectionItem CurrentConnection
364 if (_currentConnection == null)
366 _currentConnection = new ConnectionItem();
369 return _currentConnection;
374 /// Creates a cellular profile handle.
376 /// <since_tizen> 3 </since_tizen>
377 /// <param name="type">The type of profile. Cellular profile type is supported.</param>
378 /// <param name="keyword">The keyword included in profile name.</param>
379 /// <returns>CellularProfile object.</returns>
380 /// <privilege>http://tizen.org/privilege/network.get</privilege>
381 /// <feature>http://tizen.org/feature/network.telephony</feature>
382 /// <feature>http://tizen.org/feature/network.wifi</feature>
383 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
384 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
385 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
386 /// <exception cref="System.ArgumentNullException">Thrown when a keyword value is null.</exception>
387 /// <exception cref="System.InvalidOperationException">Thrown when a method fails due to invalid operation.</exception>
388 public static CellularProfile CreateCellularProfile(ConnectionProfileType type, string keyword)
390 IntPtr profileHandle = IntPtr.Zero;
391 if (type == ConnectionProfileType.Cellular)
393 profileHandle = ConnectionInternalManager.Instance.CreateCellularProfile(type, keyword);
398 Log.Error(Globals.LogTag, "ConnectionProfile Type is not supported");
399 ConnectionErrorFactory.ThrowConnectionException((int)ConnectionError.InvalidParameter);
402 return new CellularProfile(profileHandle);
406 /// The state of the cellular connection.
408 /// <since_tizen> 3 </since_tizen>
409 /// <value>Cellular network state.</value>
410 /// <feature>http://tizen.org/feature/network.telephony</feature>
411 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
412 public static CellularState CellularState
416 return ConnectionInternalManager.Instance.CellularState;
421 /// The state of the Wi-Fi connection.
423 /// <since_tizen> 3 </since_tizen>
424 /// <value>WiFi connection state.</value>
425 /// <privilege>http://tizen.org/privilege/network.get</privilege>
426 /// <feature>http://tizen.org/feature/network.wifi</feature>
427 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
428 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
429 public static ConnectionState WiFiState
433 return ConnectionInternalManager.Instance.WiFiState;
438 /// The state of the Bluetooth connection.
440 /// <since_tizen> 3 </since_tizen>
441 /// <value>Bluetooth connection state.</value>
442 /// <privilege>http://tizen.org/privilege/network.get</privilege>
443 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
444 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
445 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
446 public static ConnectionState BluetoothState
450 return ConnectionInternalManager.Instance.BluetoothState;
455 /// The Ethernet connection state.
457 /// <since_tizen> 3 </since_tizen>
458 /// <value>Ethernet connection state.</value>
459 /// <privilege>http://tizen.org/privilege/network.get</privilege>
460 /// <feature>http://tizen.org/feature/network.ethernet</feature>
461 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
462 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
463 public static ConnectionState EthernetState
467 return ConnectionInternalManager.Instance.EthernetState;
472 /// Checks if the ethernet cable is attached or not.
474 /// <since_tizen> 3 </since_tizen>
475 /// <value>Ethernet cable state.</value>
476 /// <privilege>http://tizen.org/privilege/network.get</privilege>
477 /// <feature>http://tizen.org/feature/network.ethernet</feature>
478 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
479 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
480 public static EthernetCableState EthernetCableState
484 return ConnectionInternalManager.Instance.EthernetCableState;
488 } // class ConnectionManager
491 /// This class contains connection information, such as connection type and state.
493 /// <since_tizen> 3 </since_tizen>
494 public class ConnectionItem
496 internal ConnectionItem()
501 /// The type of the current profile for data connection.
503 /// <since_tizen> 3 </since_tizen>
504 /// <value>Data connection current profile.</value>
505 /// <privilege>http://tizen.org/privilege/network.get</privilege>
506 /// <feature>http://tizen.org/feature/network.ethernet</feature>
507 /// <feature>http://tizen.org/feature/network.telephony</feature>
508 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
509 /// <feature>http://tizen.org/feature/network.wifi</feature>
510 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
511 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
512 public ConnectionType Type
516 return ConnectionInternalManager.Instance.ConnectionType;
521 /// The state of the current profile for data connection.
523 /// <since_tizen> 3 </since_tizen>
524 /// <value>Connection state of the current connection type.</value>
525 /// <privilege>http://tizen.org/privilege/network.get</privilege>
526 /// <feature>http://tizen.org/feature/network.ethernet</feature>
527 /// <feature>http://tizen.org/feature/network.telephony</feature>
528 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
529 /// <feature>http://tizen.org/feature/network.wifi</feature>
530 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
531 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
532 public ConnectionState State
536 if (ConnectionInternalManager.Instance.ConnectionType == ConnectionType.Cellular)
538 if (ConnectionInternalManager.Instance.CellularState == CellularState.Connected)
540 return ConnectionState.Connected;
542 else if (ConnectionInternalManager.Instance.CellularState == CellularState.Available)
544 return ConnectionState.Disconnected;
547 return ConnectionState.Deactivated;
550 else if (ConnectionInternalManager.Instance.ConnectionType == ConnectionType.Bluetooth)
552 return ConnectionInternalManager.Instance.BluetoothState;
554 else if (ConnectionInternalManager.Instance.ConnectionType == ConnectionType.WiFi)
556 return ConnectionInternalManager.Instance.WiFiState;
558 else if (ConnectionInternalManager.Instance.ConnectionType == ConnectionType.Ethernet)
560 return ConnectionInternalManager.Instance.EthernetState;
562 else { // TO DO : Add Net Proxy
563 return ConnectionState.Disconnected;
567 } // class ConnectionItem
570 /// An extended EventArgs class, which contains changed connection type.
572 /// <since_tizen> 3 </since_tizen>
573 public class ConnectionTypeEventArgs : EventArgs
575 private ConnectionType Type = ConnectionType.Disconnected;
577 internal ConnectionTypeEventArgs(ConnectionType type)
583 /// The connection type.
585 /// <since_tizen> 3 </since_tizen>
586 /// <value>Type of the connection.</value>
587 public ConnectionType ConnectionType
597 /// An extended EventArgs class, which contains changed ethernet cable state.
599 /// <since_tizen> 3 </since_tizen>
600 public class EthernetCableStateEventArgs : EventArgs
602 private EthernetCableState State;
604 internal EthernetCableStateEventArgs(EthernetCableState state)
610 /// The ethernet cable state.
612 /// <since_tizen> 3 </since_tizen>
613 /// <value>Attached or detached state of the ethernet cable.</value>
614 public EthernetCableState EthernetCableState
624 /// An extended EventArgs class, which contains changed address.
626 /// <since_tizen> 3 </since_tizen>
627 public class AddressEventArgs : EventArgs
629 private string IPv4 = "";
630 private string IPv6 = "";
632 internal AddressEventArgs(string ipv4, string ipv6)
639 /// The IPV4 address.
641 /// <since_tizen> 3 </since_tizen>
642 /// <value>IP address in the format of the IPV4 syntax.</value>
643 public string IPv4Address
652 /// The IPV6 address.
654 /// <since_tizen> 3 </since_tizen>
655 /// <value>IP address in the format of the IPV6 syntax.</value>
656 public string IPv6Address