Fix For PTREL-286 : Multi-User Architecture Change updated for review comments
[platform/core/telephony/tel-plugin-imc.git] / include / common / TelErr.h
1 /*
2  * tel-plugin-imc
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Hayoon Ko <hayoon.ko@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21 /**
22  * @open
23  * @ingroup                     TelephonyAPI
24  * @addtogroup          COMMON_TAPI     COMMON
25  * @{
26  *      These error codes are used by Applications.
27  */
28
29
30 #ifndef _TEL_ERR_H_
31 #define _TEL_ERR_H_
32 /*==================================================================================================
33                                          INCLUDE FILES
34 ==================================================================================================*/
35
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40
41 /*==================================================================================================
42                                            CONSTANTS
43 ==================================================================================================*/
44
45
46 /*==================================================================================================
47                                             MACROS
48 ==================================================================================================*/
49
50
51 /*==================================================================================================
52                                              ENUMS
53 ==================================================================================================*/
54
55 /************************************************************
56 **    Errors defined in  "+CME ERROR" ,
57 **    - see 3GPP TS 27.007
58 **    - ranges are 0x00 ~ 0x7FFF
59 ************************************************************/
60 /**
61     Error codes sent by the modem in response to the above operations.
62 */
63 typedef enum {
64         /* GENERAL ERRORS */
65         TAPI_OP_GEN_ERR_PHONE_FAILURE = 0,                      /* 0 */
66         TAPI_OP_GEN_ERR_NO_CONNECTION_TO_PHONE,                 /* 1 */
67         TAPI_OP_GEN_ERR_PHONE_ADAPTOR_LINK_RESERVED,            /* 2 */
68         TAPI_OP_GEN_ERR_OPER_NOT_ALLOWED,                       /* 3 */
69         TAPI_OP_GEN_ERR_OPER_NOT_SUPPORTED,                     /* 4 */
70         TAPI_OP_GEN_ERR_PH_SIM_PIN_REQU,                        /* 5 */
71         TAPI_OP_GEN_ERR_PH_FSIM_PIN_REQU,                       /* 6 */
72         TAPI_OP_GEN_ERR_PH_FSIM_PUK_REQU,                       /* 7 */
73         TAPI_OP_GEN_ERR_SIM_NOT_INSERTED = 10,                  /* 10 */
74         TAPI_OP_GEN_ERR_SIM_PIN_REQU,                           /* 11 */
75         TAPI_OP_GEN_ERR_SIM_PUK_REQU,                           /* 12 */
76         TAPI_OP_GEN_ERR_SIM_FAILURE,                            /* 13 */
77         TAPI_OP_GEN_ERR_SIM_BUSY,                               /* 14 */
78         TAPI_OP_GEN_ERR_SIM_WRONG,                              /* 15 */
79         TAPI_OP_GEN_ERR_INCORRECT_PW,                           /* 16 */
80         TAPI_OP_GEN_ERR_SIM_PIN2_REQU,                          /* 17 */
81         TAPI_OP_GEN_ERR_SIM_PUK2_REQU,                          /* 18 */
82         TAPI_OP_GEN_ERR_MEM_FULL = 20,                          /* 20 */
83         TAPI_OP_GEN_ERR_INVALID_INDEX,                          /* 21 */
84         TAPI_OP_GEN_ERR_NOT_FOUND,                              /* 22 */
85         TAPI_OP_GEN_ERR_MEM_FAILURE,                            /* 23 */
86         TAPI_OP_GEN_ERR_TEXT_STR_TOO_LONG,                      /* 24 */
87         TAPI_OP_GEN_ERR_INVALID_CHARACTERS_IN_TEXT_STR,         /* 25 */
88         TAPI_OP_GEN_ERR_DIAL_STR_TOO_LONG,                      /* 26 */
89         TAPI_OP_GEN_ERR_INVALID_CHARACTERS_IN_DIAL_STR,         /* 27 */
90         TAPI_OP_GEN_ERR_NO_NET_SVC = 30,                        /* 30 */
91         TAPI_OP_GEN_ERR_NET_TIMEOUT,                            /* 31 */
92         TAPI_OP_GEN_ERR_NET_NOT_ALLOWED_EMERGENCY_CALLS_ONLY,   /* 32 */
93         TAPI_OP_GEN_ERR_NET_PERS_PIN_REQU = 40,                 /* 40 */
94         TAPI_OP_GEN_ERR_NET_PERS_PUK_REQU,                      /* 41 */
95         TAPI_OP_GEN_ERR_NET_SUBSET_PERS_PIN_REQU,               /* 42 */
96         TAPI_OP_GEN_ERR_NET_SUBSET_PERS_PUK_REQU,               /* 43 */
97         TAPI_OP_GEN_ERR_SVC_PROVIDER_PERS_PIN_REQU,             /* 44 */
98         TAPI_OP_GEN_ERR_SVC_PROVIDER_PERS_PUK_REQU,             /* 45 */
99         TAPI_OP_GEN_ERR_CORPORATE_PERS_PIN_REQU,                /* 46 */
100         TAPI_OP_GEN_ERR_CORPORATE_PERS_PUK_REQU,                /* 47 */
101         TAPI_OP_GEN_ERR_HIDDEN_KEY_REQU,                        /* 48 */
102         TAPI_OP_GEN_ERR_UNKNOWN = 100,                          /* 100 */
103
104         /* Errors related to a failure to perform an Attach */
105         TAPI_OP_GEN_ERR_ILLEGAL_MS = 103,                       /* 103 */
106         TAPI_OP_GEN_ERR_ILLEGAL_ME = 106,                       /* 106 */
107         TAPI_OP_GEN_ERR_GPRS_SVC_NOT_ALLOWED,                   /* 107 */
108         TAPI_OP_GEN_ERR_PLMN_NOT_ALLOWED = 111,                 /* 111 */
109         TAPI_OP_GEN_ERR_LOCATION_AREA_NOT_ALLOWED,              /* 112 */
110         TAPI_OP_GEN_ERR_ROAMING_NOT_ALLOWED_IN_THIS_LOCATION_AREA, /* 113 */
111
112         /* Errors related to a failure to Activate a Context */
113         TAPI_OP_GEN_ERR_SVC_OPT_NOT_SUPPORTED = 132,            /* 132 */
114         TAPI_OP_GEN_ERR_REQ_SVC_OPT_NOT_SUBSCRIBED,             /* 133 */
115         TAPI_OP_GEN_ERR_SVC_OPT_TEMPORARILY_OUT_OF_ORDER,       /* 134 */
116         TAPI_OP_GEN_ERR_UNSPECIFIED_GPRS_ERR = 148,             /* 148 */
117         TAPI_OP_GEN_ERR_PDP_AUTHENTICATION_FAILURE,             /* 149 */
118         TAPI_OP_GEN_ERR_INVALID_MOBILE_CLASS,                   /* 150 */
119
120         /* VBS / VGCS and eMLPP -related errors */
121         TAPI_OP_GEN_ERR_VBS_VGCS_NOT_SUPPORTED_BY_THE_NET = 151, /* 151 */
122         TAPI_OP_GEN_ERR_NO_SVC_SUBSCRIPTION_ON_SIM,             /* 152 */
123         TAPI_OP_GEN_ERR_NO_SUBSCRIPTION_FOR_GROUP_ID,           /* 153 */
124         TAPI_OP_GEN_ERR_GROUP_ID_NOT_ACTIVATED_ON_SIM,          /* 154 */
125         TAPI_OP_GEN_ERR_NO_MATCHING_NOTI = 155,                 /* 155 */
126         TAPI_OP_GEN_ERR_VBS_VGCS_CALL_ALREADY_PRESENT,          /* 156 */
127         TAPI_OP_GEN_ERR_CONGESTION,                             /* 157 */
128         TAPI_OP_GEN_ERR_NET_FAILURE,                            /* 158 */
129         TAPI_OP_GEN_ERR_UPLINK_BUSY,                            /* 159 */
130         TAPI_OP_GEN_ERR_NO_ACCESS_RIGHTS_FOR_SIM_FILE = 160,    /* 160 */
131         TAPI_OP_GEN_ERR_NO_SUBSCRIPTION_FOR_PRIORITY,           /* 161 */
132         TAPI_OP_GEN_ERR_OPER_NOT_APPLICABLE_OR_NOT_POSSIBLE,    /* 162 */
133
134
135         /************************************************************
136         **                           SAMSUNG ADDED ERRORS
137         ************************************************************/
138         TAPI_OP_GEN_ERR_NONE = 0x8000,                          /* 0x8000 : No Errors */
139
140         /* General Common Errors : 0x8000 - 0x80FF */
141         TAPI_OP_GEN_ERR_INVALID_FORMAT,                         /* 0x8001 : Invalid Parameter or Format */
142         TAPI_OP_GEN_ERR_PHONE_OFFLINE,                          /* 0x8002 : */
143         TAPI_OP_GEN_ERR_CMD_NOT_ALLOWED,                        /* 0x8003 : */
144         TAPI_OP_GEN_ERR_PHONE_IS_INUSE,                         /* 0x8004 : */
145         TAPI_OP_GEN_ERR_INVALID_STATE = 0x8005,                 /* 0x8005 : */
146
147         TAPI_OP_GEN_ERR_NO_BUFFER,                              /* 0x8006 :  No internal free buffers */
148         TAPI_OP_GEN_ERR_OPER_REJ,                               /* 0x8007 :  Operation Rejected */
149         TAPI_OP_GEN_ERR_INSUFFICIENT_RESOURCE,                  /* 0x8008 : insufficient resource */
150         TAPI_OP_GEN_ERR_NET_NOT_RESPOND,                        /* 0x8009 : Network not responding */
151         TAPI_OP_GEN_ERR_SIM_PIN_ENABLE_REQ = 0x800A,            /* 0x800A : SIM Pin Enable Required */
152         TAPI_OP_GEN_ERR_SIM_PERM_BLOCKED,                       /* 0x800B : SIM Permanent Blocked */
153         TAPI_OP_GEN_ERR_SIM_PHONEBOOK_RESTRICTED,               /*0x800C: SIM Phonebook Restricted*/
154         TAPI_OP_GEM_ERR_FIXED_DIALING_NUMBER_ONLY,              /*0x800D: Restricted By FDN Mode */
155
156         /* Reserved : 0x800E ~ 0x80FF */
157         TAPI_OP_GEN_ERR_800E_RESERVED_START = 0x800E,           /* 0x800E */
158
159         TAPI_OP_GEN_ERR_80FF_RESERVED_END = 0x80ff,             /* 0x80FF */
160
161         /* the other errors */
162         TAPI_OP_GEN_ERR_OTHERS = 0xFFFE,                        /* 0xFFFE */
163
164         TAPI_OP_GEN_ERR_MAX = 0xFFFF
165 } tapi_phone_err_t;
166
167
168 /*==================================================================================================
169                                  STRUCTURES AND OTHER TYPEDEFS
170 ==================================================================================================*/
171
172
173 /*==================================================================================================
174                                      FUNCTION PROTOTYPES
175 ==================================================================================================*/
176
177
178 #ifdef __cplusplus
179 }
180 #endif
181
182 #endif // _TEL_ERR_H_
183
184 /**
185 * @}
186 */