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;
21 using Tizen.Internals.Errors;
24 namespace Tizen.Network.Connection
27 /// Enumeration for the connection type.
29 /// <since_tizen> 3 </since_tizen>
30 public enum ConnectionType
53 /// Proxy type for Internet connection
59 /// Enumeration for the address family.
61 /// <since_tizen> 3 </since_tizen>
62 public enum AddressFamily
75 /// Enumeration for the cellular network state.
77 /// <since_tizen> 3 </since_tizen>
78 public enum CellularState
89 /// Roaming is turned off
93 /// Call is only available
95 CallOnlyAvailable = 3,
97 /// Available but not connected yet
107 /// Enumeration for the connection state.
109 /// <since_tizen> 3 </since_tizen>
110 public enum ConnectionState
127 /// Enumeration for the attached or detached state of the ethernet cable.
129 /// <since_tizen> 3 </since_tizen>
130 public enum EthernetCableState
133 /// Ethernet cable is detached
137 /// Ethernet cable is attached
143 /// Enumeration for the statistics type.
145 /// <since_tizen> 3 </since_tizen>
146 public enum StatisticsType
149 /// Last received data
151 LastReceivedData = 0,
157 /// Total received data
159 TotalReceivedData = 2,
167 /// Enumeration for the network connection type.
169 /// <since_tizen> 3 </since_tizen>
170 public enum ConnectionProfileType
191 /// Enumeration for the profile state type.
193 /// <since_tizen> 3 </since_tizen>
194 public enum ProfileState
197 /// Disconnected state
201 /// Association state
205 /// Configuration state
215 /// Enumeration for the proxy method type.
217 /// <since_tizen> 3 </since_tizen>
218 public enum ProxyType
221 /// Direct connection
225 /// Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried
229 /// Manual configuration
235 /// Enumeration for the IP configuration type.
237 /// <since_tizen> 3 </since_tizen>
238 public enum IPConfigType
245 /// Manual IP configuration
249 /// Config IP using DHCP client
253 /// Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available
257 /// Indicates an IP address that can not be modified
263 /// Enumeration for the cellular service type.
265 /// <since_tizen> 3 </since_tizen>
266 public enum CellularServiceType
293 /// Specific application
299 /// Enumeration for the cellular pdn type.
301 /// <since_tizen> 3 </since_tizen>
302 public enum CellularPdnType
317 /// Both IPv4 and IPv6
323 /// Enumeration for the DNS configuration type.
325 /// <since_tizen> 3 </since_tizen>
326 public enum DnsConfigType
333 /// Manual DNS configuration
337 /// Config DNS using DHCP client
342 static internal class ConnectionErrorValue
344 internal const int Base = -0x01C10000;
349 /// Enumeration for the connection errors.
351 /// <since_tizen> 3 </since_tizen>
352 // To do : have to assign valid error code
353 public enum ConnectionError
358 None = ErrorCode.None,
360 /// Invalid parameter
362 InvalidParameter = ErrorCode.InvalidParameter,
364 /// Out of memory error
366 OutOfMemoryError = ErrorCode.OutOfMemory,
368 /// Invalid operation
370 InvalidOperation = ErrorCode.InvalidOperation,
372 /// Address family not supported
374 AddressFamilyNotSupported = ErrorCode.AddressFamilyNotSupported,
378 OperationFailed = ConnectionErrorValue.Base | 0x0401,
382 EndOfIteration = ConnectionErrorValue.Base | 0x0402,
384 /// There is no connection
386 NoConnection = ConnectionErrorValue.Base | 0x0403,
390 NowInProgress = ErrorCode.NowInProgress,
394 AlreadyExists = ConnectionErrorValue.Base | 0x0404,
396 /// Operation is aborted
398 OperationAborted = ConnectionErrorValue.Base | 0x0405,
402 DhcpFailed = ConnectionErrorValue.Base | 0x0406,
406 InvalidKey = ConnectionErrorValue.Base | 0x0407,
410 NoReply = ConnectionErrorValue.Base | 0x0408,
412 /// Permission denied
414 PermissionDenied = ErrorCode.PermissionDenied,
418 NotSupported = ErrorCode.NotSupported
422 /// Enumeration for the profile list type.
424 /// <since_tizen> 3 </since_tizen>
425 public enum ProfileListType
428 /// The iterator of the registered profile
432 /// The iterator of the connected profile
436 /// The iterator of the default profile
442 /// Enumeration for the security type of Wi-Fi.
444 /// <since_tizen> 3 </since_tizen>
445 public enum WiFiSecurityType
448 /// Security disabled
470 /// Enumeration for the encryption modes.
472 /// <since_tizen> 3 </since_tizen>
473 public enum WiFiEncryptionType
476 /// Encryption disabled
492 /// TKIP and AES are both supported
498 /// Enumeration for the connection profile state.
500 /// <since_tizen> 3 </since_tizen>
501 public enum ConnectionProfileState
504 /// Disconnected state
508 /// Association state
512 /// Configuration state
522 /// Enumeration for the cellular authentication type.
524 /// <since_tizen> 3 </since_tizen>
525 public enum CellularAuthType
528 /// No authentication
532 /// PAP authentication
536 /// CHAP authentication
541 static internal class Globals
543 internal const string LogTag = "Tizen.Network.Connection";