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.set</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 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
318 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
319 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
320 /// <exception cref="System.ArgumentNullException">Thrown when an interfaceName or a hostAddress or a gateway is null.</exception>
321 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
322 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
323 public static void AddRoute(AddressFamily family, string interfaceName, System.Net.IPAddress hostAddress, System.Net.IPAddress gateway)
325 ConnectionInternalManager.Instance.AddRoute(family, interfaceName, hostAddress, gateway);
329 /// Removes a route from the routing table.
331 /// <since_tizen> 4 </since_tizen>
332 /// <param name="family">The address family.</param>
333 /// <param name="interfaceName">The name of network interface.</param>
334 /// <param name="hostAddress">The IP address of the host.</param>
335 /// <param name="gateway">The gateway address.</param>
336 /// <privilege>http://tizen.org/privilege/network.get</privilege>
337 /// <privilege>http://tizen.org/privilege/network.set</privilege>
338 /// <feature>http://tizen.org/feature/network.telephony</feature>
339 /// <feature>http://tizen.org/feature/network.wifi</feature>
340 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
341 /// <feature>http://tizen.org/feature/network.ethernet</feature>
342 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
343 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
344 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
345 /// <exception cref="System.ArgumentNullException">Thrown when an interfaceName or a hostAddress or a gateway is null.</exception>
346 /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
347 /// <exception cref="System.InvalidOperationException">Thrown when a connection instance is invalid or when a method fails due to an invalid operation.</exception>
348 public static void RemoveRoute(AddressFamily family, string interfaceName, System.Net.IPAddress hostAddress, System.Net.IPAddress gateway)
350 ConnectionInternalManager.Instance.RemoveRoute(family, interfaceName, hostAddress, gateway);
354 /// The type and state of the current profile for data connection.
356 /// <since_tizen> 3 </since_tizen>
357 /// <value>Instance of ConnectionItem.</value>
358 public static ConnectionItem CurrentConnection
362 if (_currentConnection == null)
364 _currentConnection = new ConnectionItem();
367 return _currentConnection;
372 /// Creates a cellular profile handle.
374 /// <since_tizen> 3 </since_tizen>
375 /// <param name="type">The type of profile. Cellular profile type is supported.</param>
376 /// <param name="keyword">The keyword included in profile name.</param>
377 /// <returns>CellularProfile object.</returns>
378 /// <privilege>http://tizen.org/privilege/network.get</privilege>
379 /// <feature>http://tizen.org/feature/network.telephony</feature>
380 /// <feature>http://tizen.org/feature/network.wifi</feature>
381 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
382 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
383 /// <exception cref="System.ArgumentException">Thrown when a value is an invalid parameter.</exception>
384 /// <exception cref="System.ArgumentNullException">Thrown when a keyword value is null.</exception>
385 /// <exception cref="System.InvalidOperationException">Thrown when a method fails due to invalid operation.</exception>
386 public static CellularProfile CreateCellularProfile(ConnectionProfileType type, string keyword)
388 IntPtr profileHandle = IntPtr.Zero;
389 if (type == ConnectionProfileType.Cellular)
391 profileHandle = ConnectionInternalManager.Instance.CreateCellularProfile(type, keyword);
396 Log.Error(Globals.LogTag, "ConnectionProfile Type is not supported");
397 ConnectionErrorFactory.ThrowConnectionException((int)ConnectionError.InvalidParameter);
400 return new CellularProfile(profileHandle);
404 /// The state of the cellular connection.
406 /// <since_tizen> 3 </since_tizen>
407 /// <value>Cellular network state.</value>
408 /// <feature>http://tizen.org/feature/network.telephony</feature>
409 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
410 public static CellularState CellularState
414 return ConnectionInternalManager.Instance.CellularState;
419 /// The state of the Wi-Fi connection.
421 /// <since_tizen> 3 </since_tizen>
422 /// <value>WiFi connection state.</value>
423 /// <privilege>http://tizen.org/privilege/network.get</privilege>
424 /// <feature>http://tizen.org/feature/network.wifi</feature>
425 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
426 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
427 public static ConnectionState WiFiState
431 return ConnectionInternalManager.Instance.WiFiState;
436 /// The state of the Bluetooth connection.
438 /// <since_tizen> 3 </since_tizen>
439 /// <value>Bluetooth connection state.</value>
440 /// <privilege>http://tizen.org/privilege/network.get</privilege>
441 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
442 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
443 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
444 public static ConnectionState BluetoothState
448 return ConnectionInternalManager.Instance.BluetoothState;
453 /// The Ethernet connection state.
455 /// <since_tizen> 3 </since_tizen>
456 /// <value>Ethernet connection state.</value>
457 /// <privilege>http://tizen.org/privilege/network.get</privilege>
458 /// <feature>http://tizen.org/feature/network.ethernet</feature>
459 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
460 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
461 public static ConnectionState EthernetState
465 return ConnectionInternalManager.Instance.EthernetState;
470 /// Checks if the ethernet cable is attached or not.
472 /// <since_tizen> 3 </since_tizen>
473 /// <value>Ethernet cable state.</value>
474 /// <privilege>http://tizen.org/privilege/network.get</privilege>
475 /// <feature>http://tizen.org/feature/network.ethernet</feature>
476 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
477 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
478 public static EthernetCableState EthernetCableState
482 return ConnectionInternalManager.Instance.EthernetCableState;
486 } // class ConnectionManager
489 /// This class contains connection information, such as connection type and state.
491 /// <since_tizen> 3 </since_tizen>
492 public class ConnectionItem
494 internal ConnectionItem()
499 /// The type of the current profile for data connection.
501 /// <since_tizen> 3 </since_tizen>
502 /// <value>Data connection current profile.</value>
503 /// <privilege>http://tizen.org/privilege/network.get</privilege>
504 /// <feature>http://tizen.org/feature/network.ethernet</feature>
505 /// <feature>http://tizen.org/feature/network.telephony</feature>
506 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
507 /// <feature>http://tizen.org/feature/network.wifi</feature>
508 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
509 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
510 public ConnectionType Type
514 return ConnectionInternalManager.Instance.ConnectionType;
519 /// The state of the current profile for data connection.
521 /// <since_tizen> 3 </since_tizen>
522 /// <value>Connection state of the current connection type.</value>
523 /// <privilege>http://tizen.org/privilege/network.get</privilege>
524 /// <feature>http://tizen.org/feature/network.ethernet</feature>
525 /// <feature>http://tizen.org/feature/network.telephony</feature>
526 /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
527 /// <feature>http://tizen.org/feature/network.wifi</feature>
528 /// <exception cref="System.NotSupportedException">Thrown when a feature is not supported.</exception>
529 /// <exception cref="System.UnauthorizedAccessException">Thrown when a permission is denied.</exception>
530 public ConnectionState State
534 if (ConnectionInternalManager.Instance.ConnectionType == ConnectionType.Cellular)
536 if (ConnectionInternalManager.Instance.CellularState == CellularState.Connected)
538 return ConnectionState.Connected;
540 else if (ConnectionInternalManager.Instance.CellularState == CellularState.Available)
542 return ConnectionState.Disconnected;
545 return ConnectionState.Deactivated;
548 else if (ConnectionInternalManager.Instance.ConnectionType == ConnectionType.Bluetooth)
550 return ConnectionInternalManager.Instance.BluetoothState;
552 else if (ConnectionInternalManager.Instance.ConnectionType == ConnectionType.WiFi)
554 return ConnectionInternalManager.Instance.WiFiState;
556 else if (ConnectionInternalManager.Instance.ConnectionType == ConnectionType.Ethernet)
558 return ConnectionInternalManager.Instance.EthernetState;
560 else { // TO DO : Add Net Proxy
561 return ConnectionState.Disconnected;
565 } // class ConnectionItem
568 /// An extended EventArgs class, which contains changed connection type.
570 /// <since_tizen> 3 </since_tizen>
571 public class ConnectionTypeEventArgs : EventArgs
573 private ConnectionType Type = ConnectionType.Disconnected;
575 internal ConnectionTypeEventArgs(ConnectionType type)
581 /// The connection type.
583 /// <since_tizen> 3 </since_tizen>
584 /// <value>Type of the connection.</value>
585 public ConnectionType ConnectionType
595 /// An extended EventArgs class, which contains changed ethernet cable state.
597 /// <since_tizen> 3 </since_tizen>
598 public class EthernetCableStateEventArgs : EventArgs
600 private EthernetCableState State;
602 internal EthernetCableStateEventArgs(EthernetCableState state)
608 /// The ethernet cable state.
610 /// <since_tizen> 3 </since_tizen>
611 /// <value>Attached or detached state of the ethernet cable.</value>
612 public EthernetCableState EthernetCableState
622 /// An extended EventArgs class, which contains changed address.
624 /// <since_tizen> 3 </since_tizen>
625 public class AddressEventArgs : EventArgs
627 private string IPv4 = "";
628 private string IPv6 = "";
630 internal AddressEventArgs(string ipv4, string ipv6)
637 /// The IPV4 address.
639 /// <since_tizen> 3 </since_tizen>
640 /// <value>IP address in the format of the IPV4 syntax.</value>
641 public string IPv4Address
650 /// The IPV6 address.
652 /// <since_tizen> 3 </since_tizen>
653 /// <value>IP address in the format of the IPV6 syntax.</value>
654 public string IPv6Address