Tizen 2.1 base
[platform/core/api/network-info.git] / include / telephony_network_type.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16  
17
18 #ifndef __TIZEN_TELEPHONY_NETWORK_INFO_TYPE_H__
19 #define __TIZEN_TELEPHONY_NETWORK_INFO_TYPE_H__
20
21 #ifdef __cplusplus
22  extern "C" {
23 #endif
24
25
26 /**
27  * @file telephony_network_type.h
28  * @brief This file contains the enumeration related with telephony network.
29  */
30
31 /**
32  * @addtogroup CAPI_TELEPHONY_NETWORK_INFO_MODULE
33  * @{
34  */
35
36 /**
37  * @brief
38  * Enumerations for telephony error code.
39  */
40 typedef enum
41 {
42         NETWORK_INFO_ERROR_NONE = TIZEN_ERROR_NONE,     /**< Successful */
43         NETWORK_INFO_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
44         NETWORK_INFO_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ 
45         NETWORK_INFO_ERROR_OPERATION_FAILED = TIZEN_ERROR_TELEPHONY_CLASS | 0x2000, /**< Operation failed */    
46         NETWORK_INFO_ERROR_OUT_OF_SERVICE = TIZEN_ERROR_TELEPHONY_CLASS | 0x2001, /**< Out of service */                
47 } network_info_error_e;
48
49
50 /**
51  * @brief Enumerations for RSSI (Receive Signal Strength Indicator).
52  * @details #NETWORK_INFO_RSSI_6 is the highest.
53  */
54 typedef enum
55 {
56    NETWORK_INFO_RSSI_0 = 0x00, /**< Strength 0 */
57    NETWORK_INFO_RSSI_1,        /**< Strength 1 */
58    NETWORK_INFO_RSSI_2,        /**< Strength 2 */
59    NETWORK_INFO_RSSI_3,        /**< Strength 3 */
60    NETWORK_INFO_RSSI_4,        /**< Strength 4 */
61    NETWORK_INFO_RSSI_5,        /**< Strength 5 */
62    NETWORK_INFO_RSSI_6             /**< Strength 6 */
63 } network_info_rssi_e;
64
65
66 /**
67  * @brief Enumerations for network type.
68  */
69 typedef enum
70 {
71         NETWORK_INFO_TYPE_UNKNOWN = 0x00,       /**< Unknown */
72         NETWORK_INFO_TYPE_GSM,  /**< 2G GSM network type */
73         NETWORK_INFO_TYPE_GPRS, /**< 2.5G GPRS network type */
74         NETWORK_INFO_TYPE_EDGE, /**< 2.5G EDGE network type */
75         NETWORK_INFO_TYPE_UMTS, /**< 3G UMTS network type */
76         NETWORK_INFO_TYPE_HSDPA,        /**< HSDPA network type */
77 } network_info_type_e;
78
79
80 /**
81  * @brief Enumeration for network state.
82  */
83 typedef enum
84 {
85     NETWORK_INFO_SERVICE_STATE_IN_SERVICE = 0x00,       /**< In service */
86     NETWORK_INFO_SERVICE_STATE_OUT_OF_SERVICE,  /**< Out of service */
87     NETWORK_INFO_SERVICE_STATE_EMERGENCY_ONLY,  /**< Only emergency call is allowed */
88     NETWORK_INFO_SERVICE_STATE_RADIO_OFF,       /**< Power of radio is turned off */
89 } network_info_service_state_e;
90
91
92 #ifdef __cplusplus
93 }
94 #endif
95
96 /**
97  * @}
98  */
99
100 #endif  // __TIZEN_TELEPHONY_NETWORK_INFO_TYPE_H__
101