f20f9b8c60b293889e19c75b42084be210c2aea6
[platform/core/telephony/libtapi.git] / include / TelCall.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@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  TAPI_CALL       CALL
25  * @{
26  *
27  * @file TelCall.h
28
29  @brief This file serves as a "C" header file defines structures for Tapi Call Services. \n
30  It contains a sample set of constants, enums, structs that would be required by applications.
31  */
32
33 #ifndef _TEL_CALL_H_
34 #define _TEL_CALL_H_
35
36 #include <TelSs.h>
37 #include <TelDefines.h>
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #define TAPI_CALLING_NAME_SIZE_MAX      80      /**< The maximum length of the string for calling party name.   */
44 #define TAPI_CALL_UUS_DATA_LEN_MAX      131     /**< The Maximum length of the user to user singnalling data string.   */
45 #define TAPI_CALL_DISPLAY_RECORD_MAX    32      /**< The maximum length of the string for display record in CDMA   */
46 #define MAX_TAPI_CALL_COUNT                             6       /**< Maximum number of call can be possible at a time */
47 #define MAX_TAPI_CONF_CALL_COUNT                5       /**< Maximum number of Call can be possible in a conference call at a time */
48 #define INVALID_CALL_HANDLE                             0               /**< TS_UINT is used for call handle */
49
50 /* Call */
51 #define TAPI_CALL_DIALDIGIT_LEN_MAX             82              /**< Maximum Dialling Digit Length  */
52 #define TAPI_CALL_SUBADDRESS_LEN_MAX    40              /**< Maximum Call Subaddress Length */
53 #define TAPI_CALL_NUMBER_LEN_MAX                7               /**< Dialling Num length */
54 #define TAPI_CONTEXT_CALL_SIZE_MAX              6               /**< Maximum Call context */
55 #define TAPI_CALL_DIAL_NUMBER_LEN_MAX   82
56
57 #define TAPI_INVALID_CONTEXTHANDLE              (HTapiContext)-1
58 #define TAPI_CLIENT_SIZE_MAX                    30
59 #define TAPI_CALL_CUSTOM_SERVICE_DATA_MAX               128
60
61 /**
62  * @enum TelCallCause_t
63  * This structure defines the values for Call Cause.
64  */
65 typedef enum {
66         TAPI_CAUSE_SUCCESS,                             /**< Success  */
67         TAPI_CAUSE_ACCESSDISCARD,                       /**< Access discarded  */
68         TAPI_CAUSE_BARR_BYOPERATOR,             /**< Barred by operator */
69         TAPI_CAUSE_BEARERMODE_NOTIMPL,          /**< Bearer mode not implemented */
70         TAPI_CAUSE_BEARERMODE_RESTRICTED,       /**< Bearer mode restricted */
71         TAPI_CAUSE_BEARERMODE_UNAUTH,           /**< Bearer mode un authorized */
72         TAPI_CAUSE_BEARERMODE_UNAVAIL,          /**< Bearer mode not available */
73         TAPI_CAUSE_BUSY,                                        /**< (Network/Server) busy */
74         TAPI_CAUSE_CALLMETER_EXPIRED,           /**< Call meter expired */
75         TAPI_CAUSE_CALLNO_ERROR,                        /**< Call number error */
76         TAPI_CAUSE_CKTUNAVAIL,                          /**< Circuit channel unavailable */                     //10
77         TAPI_CAUSE_CONGESTION,                          /**< Congestion happened */
78         TAPI_CAUSE_NO_CIRCUIT_AVAIL,            /**< Circuit  not available */
79         TAPI_CAUSE_DESTIN_INCOMPAT,             /**< Destination incompatibility */
80         TAPI_CAUSE_DTMF_NOSPEECH,                       /**< No speech in DTMF */
81         TAPI_CAUSE_DTMF_REJECTED,                       /**< DTMF rejected */
82         TAPI_CAUSE_FACILITY_NOTIMPL,            /**< Facility not implemented */
83         TAPI_CAUSE_FACILITY_NOTSUBSCRIBED,      /**< Facility not subscribed */
84         TAPI_CAUSE_INCOMINGCUGCALLS_BARRED, /**< Incoming CUG Calls barred */
85         TAPI_CAUSE_INVALNUM,                            /**< Invalid number */
86         TAPI_CAUSE_MPTY_ERROR,                          /**< Multiparty error */                                                //20
87         TAPI_CAUSE_NOANSWER,                            /**< No answer  */
88         TAPI_CAUSE_NONCUGMEMBER,                        /**< Non CUG member */
89         TAPI_CAUSE_NUMBERCHANGED,                       /**< Number changed */
90         TAPI_CAUSE_NUMBER_ERROR,                        /**< Number error */
91         TAPI_CAUSE_NWFAILURE,                           /**< Network failure */
92         TAPI_CAUSE_OPERATIONUNAVAIL,            /**< Operation not available */
93         TAPI_CAUSE_OUTOFORDER,                          /**< Out of order */
94         TAPI_CAUSE_PROTOCOL_ERROR,                      /**< Protocol error */
95         TAPI_CAUSE_QOSUNAVAIL,                          /**< QOS unavailable */
96         TAPI_CAUSE_REJECT,                                      /**< Rejected */                                                                //30
97         TAPI_CAUSE_REJ_FAIL,                            /**< Rejection failed */
98         TAPI_CAUSE_REJ_SRVC_NOT_AVL,            /**< Rejection service not available  */
99         TAPI_CAUSE_REMOTE_CKTUNAVAIL,           /**< Remote Circuit channel unavailable */
100         TAPI_CAUSE_RESOURCEUNAVAIL,             /**< Resource not available */
101         TAPI_CAUSE_SERVICEID_ERROR,             /**< Service id error */
102         TAPI_CAUSE_SERVICE_NOTIMPL,             /**< Service not implemented */
103         TAPI_CAUSE_SERVICE_UNAVAIL,             /**< Service not available */
104         TAPI_CAUSE_MODIFY_SAME_BEARER,          /**< Modify same bearer */
105         TAPI_CAUSE_MODIFY_NOT_PERMITTED,        /**< Modification not permitted */
106         TAPI_CAUSE_HOLD_FAIL,                           /**< Call hold fail */                                                  //40
107         TAPI_CAUSE_TEMPFAILURE,                 /**< Temporary failure */
108         TAPI_CAUSE_WRONGNUM,                            /**< Wrong number */
109         TAPI_CAUSE_NORMAL_UNSPECIFIED,          /**< Normal but unspecified */
110         TAPI_CAUSE_SSERRINVALIDTIVALUE, /**< SS invalid Transaction ID Value */
111         TAPI_CAUSE_SSERRINVALIDTI,                      /**< SS Invalid transaction ID */
112         TAPI_CAUSE_SSINCOMPATIBLESTATE, /**< SS incompatible state */
113         TAPI_CAUSE_SSERRSYNTAXERROR,            /**< SS syntax error */
114         TAPI_CAUSE_SSPROTOCOLERROR,             /**< Protocol error */
115         TAPI_CAUSE_SSNEGATIVEPASSWORDCHECK, /**< Negative password check */
116         TAPI_CAUSE_SSSENTASPHASE1,                      /**< SS sent as phase1 message */                               //50
117         TAPI_CAUSE_SSERROR,                             /**< Supplementary service error */
118         TAPI_CAUSE_SS_USSD_BUSY,                        /**< Second USSD request will be rejected when already USSD transaction is ongoing. */
119         TAPI_CAUSE_IDLE,                                        /**< Idle */
120         TAPI_CAUSE_NETWORK_SPECIFIC,            /**< Network specific error */
121         TAPI_CAUSE_FADE,                                        /**< voice call was dropped e.g. because of a loss of signal */
122         TAPI_CAUSE_UNKNOWN,                             /**< unknown no details available */
123         TAPI_CAUSE_INCOM_CALL,                          /**< terminated by incoming call */
124         TAPI_CAUSE_ALERT_STOP,                          /**< terminated by alert stop */
125         TAPI_CAUSE_INTERCEPT,                           /**< voice call was dropped by interception */
126         TAPI_CAUSE_REORDER,                             /**< voice call was dropped by reordering */    //60
127         TAPI_CAUSE_CLIENT_END,                          /**< client ended the call */
128         TAPI_CAUSE_ACCESS_CLASS_BLOCKED,        /**< access class blocked */
129         TAPI_CAUSE_MEMCAPEXCEEDED,                      /**< Memory capacity exceeded */
130         TAPI_CAUSE_TYPENOTSUPPORTED,            /**< Type not supported */
131         TAPI_CAUSE_REPLACENOTSUPPORTED, /**< Replace not supported */
132         TAPI_CAUSE_PROTOCOLID_ERROR,            /**< Protocol id error */
133         TAPI_CAUSE_CLASSNOTSUPPORTED,           /**< Class not supported */
134         TAPI_CAUSE_DATACODING_ERROR,            /**< Data coding error */
135         TAPI_CAUSE_INVAL_MSG,                           /**< Invalid message */
136         TAPI_CAUSE_CALL_BARRED,                 /**< Call barred */                                                     //70
137         TAPI_CAUSE_SIM_CALL_CONTROL_CHANGED_TO_SS,              /**< Sim call control changed to SS */
138         TAPI_CAUSE_SIM_CALL_CONTROL_CHANGED_TO_CALL,    /**< SIM Call control changed to call */
139         TAPI_CAUSE_SIM_ERROR,                           /**< SIM error */
140         TAPI_CAUSE_SIM_CALL_CONTROL_MODIFIED,                   /**< SIM call control modified */
141         TAPI_CAUSE_RANDOM_ACCESS_FAILURE,       /**< Random access error */
142         TAPI_CAUSE_LOWER_LAYER_FAILURE, /**< Lower layer error */
143         TAPI_CAUSE_ACCESS_REJECTED,             /**< Access rejected */
144         TAPI_CAUSE_RESET_NOT_ALLOWED,           /**< Reset not allowed */
145         TAPI_CAUSE_EMERGENCY_CALL_NOT_ALLOWED,                  /**< Emergency call not allowed */
146         TAPI_CAUSE_ACCESS_NOT_ALLOWED,          /**< Access not allowed */                                              //80
147         TAPI_CAUSE_RADIO_LINK_FAILURE,          /**< Radio link failure */
148         TAPI_CAUSE_INVALID_IDENTITY,            /**< Invalid identity */
149         TAPI_CAUSE_UNKNOWN_IDENTITY,            /**< Unknown identity */
150         TAPI_CAUSE_UNACCEPTABLE_IDENTITY,       /**< Un acceptable identity */
151         TAPI_CAUSE_NO_SERVICE_HERE,             /**< No service here */
152         TAPI_CAUSE_SERVICE_NOT_ALLOWED, /**< Service not allowed */
153         TAPI_CAUSE_SERVICE_NOT_AVAIL,           /**< Service not available */
154         TAPI_CAUSE_SERVICE_NOT_WORKING, /**< Service not working */
155         TAPI_CAUSE_CANNOT_IDENTIFY_CALL,        /**< Cannot identify the call */
156         TAPI_CAUSE_DEACTIVATION,                        /**< Deactivation */                                                    //90
157         TAPI_CAUSE_FATAL_ERROR,                 /**< Fatal error */
158         TAPI_CAUSE_SEND_DTMF_SUCCESS,           /**< Sending DTMF Success */
159         TAPI_CAUSE_SEND_DTMF_FAIL,                      /**< Sending DTMF Failed */
160         TAPI_CAUSE_FIXED_DIALING_NUMBER_ONLY,   /**< Fixed Dialing Number Only */
161         TAPI_CAUSE_TIMER_EXPIRED,                       /**< Call Timer Expired */
162 } TelCallCause_t;
163
164 /**
165  * @enum TelTapiEndCause_t
166  * When a call is ended, this end cause is given with the CALL END notification to the application.  This end cause can be originated
167  * from different elements in the communication path or different modules in the same element.
168  */
169 typedef enum {
170         TAPI_CALL_END_NO_CAUSE = 0x00,                          /**< No Cause */
171
172         TAPI_CC_CAUSE_UNASSIGNED_NUMBER,                        /**< Unassigned Number */
173         TAPI_CC_CAUSE_NO_ROUTE_TO_DEST,                 /**< No Route to Destination */
174         TAPI_CC_CAUSE_CHANNEL_UNACCEPTABLE,             /**< Channel Unacceptable */
175         TAPI_CC_CAUSE_OPERATOR_DETERMINED_BARRING,      /**< Operator Determined Barring */
176         TAPI_CC_CAUSE_NORMAL_CALL_CLEARING,             /**< Normal Call Clearing */
177
178         TAPI_CC_CAUSE_USER_BUSY,                                        /**< User Busy */
179         TAPI_CC_CAUSE_NO_USER_RESPONDING,                       /**< No user Responding */
180         TAPI_CC_CAUSE_USER_ALERTING_NO_ANSWER,          /**< User Alerting no Answer */
181         TAPI_CC_CAUSE_CALL_REJECTED,                            /**< Call Rejected */
182         TAPI_CC_CAUSE_NUMBER_CHANGED,                           /**< Number Changed */
183
184         TAPI_CC_CAUSE_NON_SELECTED_USER_CLEARING,       /**< Non Selected User Clearing */
185         TAPI_CC_CAUSE_DESTINATION_OUT_OF_ORDER, /**< Destination out of Order */
186         TAPI_CC_CAUSE_INVALID_NUMBER_FORMAT,            /**< Invalid Number Format */
187         TAPI_CC_CAUSE_FACILITY_REJECTED,                        /**< Facility Rejected */
188         TAPI_CC_CAUSE_RESPONSE_TO_STATUS_ENQUIRY,       /**< Response to Status Enquiry */
189
190         TAPI_CC_CAUSE_NORMAL_UNSPECIFIED,                               /**< Normal Unspecified */
191         TAPI_CC_CAUSE_NO_CIRCUIT_CHANNEL_AVAILABLE,     /**< No Circuit Channel Available */
192         TAPI_CC_CAUSE_NETWORK_OUT_OF_ORDER,                     /**< Network out of Order */
193         TAPI_CC_CAUSE_TEMPORARY_FAILURE,                                /**< Temporary Failure */
194         TAPI_CC_CAUSE_SWITCHING_EQUIPMENT_CONGESTION,   /**< Switching Equipment Congestion */
195
196         TAPI_CC_CAUSE_ACCESS_INFORMATION_DISCARDED,                     /**< Access Information Discarded */
197         TAPI_CC_CAUSE_REQUESTED_CIRCUIT_CHANNEL_NOT_AVAILABLE,  /**< Requested Circuit channel not available */
198         TAPI_CC_CAUSE_RESOURCES_UNAVAILABLE_UNSPECIFIED,                /**< Resources unavailable unspecified */
199         TAPI_CC_CAUSE_QUALITY_OF_SERVICE_UNAVAILABLE,                   /**< Quality of service unavailable */
200         TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_SUBSCRIBED,                /**< Requested facility not subscribed */
201
202         TAPI_CC_CAUSE_INCOMING_CALL_BARRED_WITHIN_CUG,                  /**< incomming call barred within CUG */
203         TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_AUTHORISED,         /**< Bearer Capability not Authorised */
204         TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE,/**< Bearer capability not presently Available */
205         TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_AVAILABLE,                  /**< Service or Option not available */
206         TAPI_CC_CAUSE_BEARER_SERVICE_NOT_IMPLEMENTED,                   /**< Service not implemented */
207
208         TAPI_CC_CAUSE_ACM_GEQ_ACMMAX,                                                   /**< ACM GEQ ACMAX */
209         TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_IMPLEMENTED,               /**< Requested facility not implemented */
210         TAPI_CC_CAUSE_ONLY_RESTRICTED_DIGITAL_INFO_BC_AVAILABLE,/**< Resticted digital info BC not available */
211         TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_IMPLEMENTED,                /**< Service or Option not Implemented  */
212         TAPI_CC_CAUSE_INVALID_TRANSACTION_ID_VALUE,                     /**< Transaction ID value */
213
214         TAPI_CC_CAUSE_USER_NOT_MEMBER_OF_CUG,                           /**< Not member of CUG */
215         TAPI_CC_CAUSE_INCOMPATIBLE_DESTINATION,                 /**< Incompatible Destination */
216         TAPI_CC_CAUSE_INVALID_TRANSIT_NETWORK_SELECTION,        /**< Transit Network selection */
217         TAPI_CC_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE,           /**< Semantically Incorrect message */
218         TAPI_CC_CAUSE_INVALID_MANDATORY_INFORMATION,            /**< Invalid Mandatory Message */
219
220         TAPI_CC_CAUSE_MESSAGE_TYPE_NON_EXISTENT,                                        /**< Message Type Non Existent */
221         TAPI_CC_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROT_STATE,      /**< Message type not compatible with Prot state */
222         TAPI_CC_CAUSE_IE_NON_EXISTENT_OR_NOT_IMPLEMENTED,                       /**< IE non exitent or not implemented */
223         TAPI_CC_CAUSE_CONDITIONAL_IE_ERROR,                                             /**< Conditional IE error */
224         TAPI_CC_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE,       /**< Not Compatible with protocol state */
225
226         TAPI_CC_CAUSE_RECOVERY_ON_TIMER_EXPIRY, /**< Recovery on timer expiry */
227         TAPI_CC_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,       /**< Protocol error unspecified */
228         TAPI_CC_CAUSE_INTERWORKING_UNSPECIFIED, /**< Interworking unspecified */
229
230         TAPI_CC_CAUSE_END = 128,
231
232         /* Reject causes*/
233         TAPI_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR,  /**< IMSI unknown in HLR */
234         TAPI_REJECT_CAUSE_ILLEGAL_MS,                   /**< Illegal MS */
235         TAPI_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR,  /**< IMSI unknown in VLR */
236         TAPI_REJECT_CAUSE_IMEI_NOT_ACCEPTED,    /**< IMEI not accepted */
237         TAPI_REJECT_CAUSE_ILLEGAL_ME,                   /**< Illegal ME */
238
239         TAPI_REJECT_CAUSE_GPRS_SERVICES_NOT_ALLOWED,                                            /**< GPRS service not allowed */
240         TAPI_REJECT_CAUSE_GPRS_SERVICES_AND_NON_GPRS_SERVICES_NOT_ALLOWED,      /**< GPRS services and Non-GPRS services not allowed */
241         TAPI_REJECT_CAUSE_MS_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK, /**< MS device cannot be derived by the network */
242         TAPI_REJECT_CAUSE_IMPLICITLY_DETACHED,                                                          /**< Implicitly detached */
243         TAPI_REJECT_CAUSE_PLMN_NOT_ALLOWED,                                                             /**< PLMN not allowed */
244
245         TAPI_REJECT_CAUSE_LA_NOT_ALLOWED,                                                       /**< LA not allowed */
246         TAPI_REJECT_CAUSE_NATIONAL_ROAMING_NOT_ALLOWED,                 /**< National roaming not allowed */
247         TAPI_REJECT_CAUSE_GPRS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN,       /**< GPRS services not allowed in this PLMN */
248         TAPI_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LA,                                      /**< No suitable cells in the LA */
249         TAPI_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE,                        /**< MSC temporarily not reachable */
250
251         TAPI_REJECT_CAUSE_NETWORK_FAILURE,              /**< Network unavailable */
252         TAPI_REJECT_CAUSE_MAC_FAILURE,                  /**< MAC failure */
253         TAPI_REJECT_CAUSE_SYNCH_FAILURE,                /**< SYNCh failure */
254         TAPI_REJECT_CAUSE_CONGESTTION,                  /**< Congestion */
255         TAPI_REJECT_CAUSE_GSM_AUTH_UNACCEPTED,  /**< GSM Auth unaccepted */
256
257         TAPI_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED, /**< Service option not supported */
258         TAPI_REJECT_CAUSE_REQ_SERV_OPT_NOT_SUBSCRIBED,  /**< REQ_SERV option not suscribed */
259         TAPI_REJECT_CAUSE_SERVICE_OPT__OUT_OF_ORDER,    /**< Service OPT out of order */
260         TAPI_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED,    /**< Call cannot be identified */
261         TAPI_REJECT_CAUSE_NO_PDP_CONTEXT_ACTIVATED,     /**< No PDP context Activated */
262
263         TAPI_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_A_NEW_CELL_MIN_VALUE,   /**< Retry upon entry into a new call min value */
264         TAPI_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_A_NEW_CELL_MAX_VALUE,   /**< Retry upon entry into a new call max value */
265         TAPI_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MSG,                                   /**< Semantically incorret message */
266         TAPI_REJECT_CAUSE_INVALID_MANDATORY_INFO,                                               /**< Invalid mandatory information */
267         TAPI_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTANT,                                    /**< Message type non-existant */
268
269         TAPI_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMP_PRT_ST,         /**< Message type not COMP PRT ST */
270         TAPI_REJECT_CAUSE_IE_NON_EXISTANT,                                              /**< IE not existant */
271         TAPI_REJECT_CAUSE_MSG_NOT_COMPATIBLE_PROTOCOL_STATE,    /**< MSG not compatible protocol state */
272
273         /* Connection Management establishment rejection cause */
274         TAPI_REJECT_CAUSE_REJ_UNSPECIFIED,      /**< rej unspecified */
275
276         /* AS reject causes */
277         TAPI_REJECT_CAUSE_AS_REJ_RR_REL_IND,                                            /**< RR release indication */
278         TAPI_REJECT_CAUSE_AS_REJ_RR_RANDOM_ACCESS_FAILURE,                      /**< Random Access Failure */
279         TAPI_REJECT_CAUSE_AS_REJ_RRC_REL_IND,                                           /**< RRC release indication */
280         TAPI_REJECT_CAUSE_AS_REJ_RRC_CLOSE_SESSION_IND,                 /**< RRC close session indication */
281         TAPI_REJECT_CAUSE_AS_REJ_RRC_OPEN_SESSION_FAILURE,                      /**< RRC open session failure */
282         TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_FAIL,                                        /**< Low level failure */
283         TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_FAIL_REDIAL_NOT_ALLOWED, /**< Low level failure redial not alowed */
284         TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_IMMED_RETRY,                 /**< low level immediate retry */
285
286         /* MM reject causes */
287         TAPI_REJECT_CAUSE_MM_REJ_INVALID_SIM,                   /**< invalid Sim */
288         TAPI_REJECT_CAUSE_MM_REJ_NO_SERVICE,                    /**< No service */
289         TAPI_REJECT_CAUSE_MM_REJ_TIMER_T3230_EXP,               /**< Timer T3230 expire */
290         TAPI_REJECT_CAUSE_MM_REJ_NO_CELL_AVAILABLE,     /**< No call available  */
291         TAPI_REJECT_CAUSE_MM_REJ_WRONG_STATE,                   /**< wrong state */
292         TAPI_REJECT_CAUSE_MM_REJ_ACCESS_CLASS_BLOCKED,  /**< Access class blocked */
293
294         /* Definitions for release ind causes between MM  and CNM*/
295         TAPI_REJECT_CAUSE_ABORT_MSG_RECEIVED,   /**< Abort Message received */
296         TAPI_REJECT_CAUSE_OTHER_CAUSE,                  /**< Other cause  */
297
298         /* CNM reject causes */
299         TAPI_REJECT_CAUSE_CNM_REJ_TIMER_T303_EXP,       /**< Timer T303 expiry */
300         TAPI_REJECT_CAUSE_CNM_REJ_NO_RESOURCES, /**< Rejected due to unavailibilty of resources */
301         TAPI_REJECT_CAUSE_CNM_MM_REL_PENDING,           /**< MM release pending */
302         TAPI_REJECT_CAUSE_CNM_INVALID_USER_DATA,        /**< Invalid user data */
303         TAPI_CALL_END_CAUSE_MAX = 255,                          /**< Maximum End Cause limit for gsm/wcdma */
304
305         /* CDMA CALL END CAUSE */
306         TAPI_CDMA_END_CAUSE_REL_BY_USER = 0x1001,               /**< Call Released by User */
307         TAPI_CDMA_END_CAUSE_REL_BY_NET,                         /**< Call Released by Network */
308         TAPI_CDMA_END_CAUSE_REL_NET_BUSY,                               /**< Call Released because of Network busy */
309         TAPI_CDMA_END_CAUSE_NO_SVC,                                     /**< Call Released because of No Service area */
310         TAPI_CDMA_END_CAUSE_FADING,                                     /**< Call Released because of Fading */
311         TAPI_CDMA_END_CAUSE_RELEASE_BY_REORDER,         /**< Call Released because of reorder */
312         TAPI_CDMA_END_CAUSE_RELEASE_BY_INTERCEPT,               /**< Call Released because of intercept */
313         TAPI_CDMA_END_CAUSE_SILENT_ZONE_RETRY,                  /**< Call Released because of silent zone retry */
314         TAPI_CDMA_END_CAUSE_OTA_CALL_FAIL,                              /**< Call Released because of OTA cal failure */
315         TAPI_CDMA_END_CAUSE_PHONE_OFFLINE,                              /**< Call Released because of phone offline */
316         TAPI_CDMA_END_CAUSE_PHONE_IS_CDMA_LOCKED,               /**< Call Released because of CDMA locked */
317         TAPI_CDMA_END_CAUSE_FLASH_IS_IN_PROGRESS_ERR,   /**< Call Released because of flash-is-in-progress error */
318         TAPI_CDMA_END_CAUSE_E911_MODE_ERR,                              /**< Call Released because of e911 mode */
319         TAPI_CDMA_END_CAUSE_OTHERS,                                     /**< Call Released by Others */
320         TAPI_CDMA_END_CAUSE_MAX                                         /**< Maximum End Cause limit for cdma */
321 } TelTapiEndCause_t;
322
323 /**
324  * @enum TelConferenceCallState_t
325  * This enum defines the call conference states
326  */
327 typedef enum {
328         TAPI_CALL_CONFERENCE_IDLE,      /**< idle */
329         TAPI_CALL_CONFERENCE_ACTIVE /**< active */
330 } TelConferenceCallState_t;
331
332 /**
333  * @enum TelCallStates_t
334  * Applications can use these sates or can have their own states.
335  */
336 typedef enum {
337         TAPI_CALL_STATE_IDLE,           /**< Call is in idle state - i.e. no call */
338         TAPI_CALL_STATE_ACTIVE,         /**< Call is in connected and conversation state */
339         TAPI_CALL_STATE_HELD,           /**< Call is in held state */
340         TAPI_CALL_STATE_DIALING,        /**< Call is in dialing state */
341         TAPI_CALL_STATE_ALERT,          /**< Call is in alerting state */
342         TAPI_CALL_STATE_INCOMING,       /**< Call is in incoming state */
343         TAPI_CALL_STATE_WAITING,        /**< Call is in answered state, and waiting for connected indication event */
344         TAPI_CALL_STATE_MAX
345 } TelCallStates_t;
346
347 /**
348  * IN GSM ONLY: call identification number.
349  */
350 typedef enum {
351         TAPI_CALL_ACTIVE_LINE1, /**< Line 1 */
352         TAPI_CALL_ACTIVE_LINE2  /**< Line 2 */
353 } TelCallActiveLine_t;
354
355 typedef enum {
356         TAPI_CALL_UUS_NONE, /**< No User to User information  */
357         TAPI_CALL_UUS_1,        /**< User to User information 1 */
358 } TelCallUusType_t;
359
360 /**
361  * The Incoming call indication could have be one of the following SS info messages in it.
362  */
363 typedef enum {
364         /*      Number details are present in the "char number" of call info struct. if number is not present
365          then "no cli cause" member in  mt_ss_info is set accordingly.  */
366         TAPI_CALL_MT_CLI_PRESENT = 0x31,
367
368         /*      Calling Name Info presnet,      TelCallingNameInfo_t of call info struct contains this info.  */
369         TAPI_CALL_MT_CNA_PRESENT = 0x32,
370
371         /*      Undefined ss indication. Ignore mt_ss_info */
372         TAPI_CALL_MT_SS_UNDEFINED = 0x00,
373
374 } TelCallMtSSInfo_t;
375
376 /**
377  * @enum TelCallAnswerType_t
378  * Answer type used as in parameter in the answer call API.
379  */
380 typedef enum {
381         TAPI_CALL_ANSWER_ACCEPT = 0,            /**< Used to answer an incoming call when there are no current active calls. */
382         TAPI_CALL_ANSWER_REJECT,                        /**< Used to reject the incoming call */
383         TAPI_CALL_ANSWER_REPLACE,                       /**< Release current active call and accept the */
384         TAPI_CALL_ANSWER_HOLD_AND_ACCEPT,       /**< Hold the current active call, and accept the wating call */
385 } TelCallAnswerType_t;
386
387 /**
388  * @enum TelCallEndType_t
389  * End type used as in parameter in the end call API.
390  */
391 typedef enum {
392         TAPI_CALL_END = 0,      
393         TAPI_CALL_END_ALL,
394         TAPI_CALL_END_ACTIVE_ALL,
395         TAPI_CALL_END_HOLD_ALL,
396 } TelCallEndType_t;
397
398
399
400
401 /**
402  * @enum TelCallType_t
403  * Applications needs to use this call type while using the setup call API. Like the requested call is a voice call or video call.
404  */
405 typedef enum {
406         TAPI_CALL_TYPE_VOICE,   /**< Voice call type. */// in ipcv4, 0x0100
407         TAPI_CALL_TYPE_DATA,    /**< Data call type - (for modem, fax, packet, etc. calls). */// in ipcv4, 0x0200
408         TAPI_CALL_TYPE_E911     /**< Emergency call type. */// in ipcv4, 0x0700
409 } TelCallType_t;
410
411 /**
412  * @enum TelCallAlertingPattern_t
413  * This enumeration defines the different alerting patterns available.
414  */
415 typedef enum {
416         TAPI_CALL_ALERTING_PATTERN_1 = 0x00, /**< Pattern 1 */
417         TAPI_CALL_ALERTING_PATTERN_2 = 0x01, /**< Pattern 2 */
418         TAPI_CALL_ALERTING_PATTERN_3 = 0x02, /**< Pattern 3 */
419         TAPI_CALL_ALERTING_PATTERN_4 = 0x03, /**< Pattern 4 */
420         TAPI_CALL_ALERTING_PATTERN_5 = 0x04, /**< Pattern 5 */
421         TAPI_CALL_ALERTING_PATTERN_6 = 0x05, /**< Pattern 6 */
422         TAPI_CALL_ALERTING_PATTERN_7 = 0x06, /**< Pattern 7 */
423         TAPI_CALL_ALERTING_PATTERN_8 = 0x07, /**< Pattern 8 */
424         TAPI_CALL_NO_ALERTING_PATTERN = 0x08 /**< No Alerting Pattern */
425 } TelCallAlertingPattern_t;
426
427 /**
428  * @enum TelCallActiveState_t
429  * State of the current call.
430  */
431 typedef enum {
432         TAPI_CALL_CONNECT_IDLE, /**< Call is in Idle state. */
433         TAPI_CALL_CONNECT_ACTIVE,       /**< Call is in Active state.*/
434         TAPI_CALL_CONNECT_HELD          /**< Call is in Held state. */
435 } TelCallActiveState_t;
436
437 /**
438  * @enum TelCallCugOptions_t
439  * This enumeration defines the closed user group options
440  */
441 typedef enum {
442         TAPI_CALL_CUG_NO_INFO = 0x00,           /**< No information */
443         TAPI_CALL_CUG_SUPRESS_OA,                       /**< suppress OA */
444         TAPI_CALL_CUG_SUPRESS_PRF_CUG,          /**< suppress preferential CUG */
445         TAPI_CALL_CUG_SUPRESS_OA_AND_CUG        /**< suppress OA and preferential CUG */
446 } TelCallCugOptions_t;
447
448 /**
449  * @enum TelCallUusProtocolType_t
450  *  This enumeration defines the tapi call uus protocol types
451  */
452 typedef enum {
453         TAPI_CALL_UUS_PROTO_SPECIFIC = 0,                       /**< The user information is structured according to user needs. */
454         TAPI_CALL_UUS_PROTO_OSI_HIGHER_LAYER = 1,       /**< OSI high layer protocols */
455         TAPI_CALL_UUS_PROTO_IA5_CHARS = 4,                      /**< user information consists of IA5 characters */
456         TAPI_CALL_UUS_PROTO_V120 = 7,                           /**< rate adaptation */
457         TAPI_CALL_UUS_PROTO_Q931 = 8                            /**< user-network call control messages */
458 } TelCallUusProtocolType_t;
459
460 /**
461  * @enum TelCallNameMode_t
462  *  This enumeration defines the call name mode
463  */
464 typedef enum {
465         TAPI_CALL_NAME_AVAIL = 0,                               /**< This identifier refers to the presentation of the calling party's name identity to the called party. */
466         TAPI_CALL_NAME_RESTRICTED = 1,                  /**< This identifier refers to the restriction of presentation of the name identity of the calling party to the called party. */
467         TAPI_CALL_NAME_UNAVAIL = 2,                     /**< This identifier refers to the unavailability of the calling party's name identity to be offered to the called party. */
468         TAPI_CALL_NAME_AVAIL_RESTRICTED = 3     /**< This identifier refers to the calling party's name identity to be offered to the called party with which presentation restriction is overridden.  */
469 } TelCallNameMode_t;
470
471 /**
472  * @enum TelCallSSNocliCause_t
473  * This enumeration defines the value for "No Cli cause".
474  */
475 typedef enum {
476         TAPI_SS_NO_CLI_CAUSE_UNAVAILABLE = 0x00,                /**< Unavailable */
477         TAPI_SS_NO_CLI_CAUSE_REJECTBY_USER = 0x01,              /**< Rejected by User */
478         TAPI_SS_NO_CLI_CAUSE_INTERACTION_OTHERSERVICES = 0x02, /**<  Other services */
479         TAPI_SS_NO_CLI_CAUSE_COINLINE_PAYPHONE = 0x03,  /**< Coin line phone */
480         TAPI_SS_NO_CLI_CAUSE_MAX                                                /**< maximum usage */
481 } TelCallSSNocliCause_t;
482
483 /**
484  * Fwded Ind Type used for MO and Mt from SS Noti Info
485  */
486 typedef enum {
487         TAPI_CALL_OUTGOING_FWDED = 0x00,        /* Outgoing call forwarded */
488         TAPI_CALL_INCOMMING_FWDED = 0x01,       /* Incoming call forwarded */
489 } TelCallForwardType_t;
490
491 /**
492  * @enum TelCallPrivacyMode_t
493  * This structure contains the voice privacy option mode(CDMA only).
494  */
495 typedef enum {
496         TAPI_CALL_PRIVACY_MODE_STANDARD = 0x00, /**< Standard mode */
497         TAPI_CALL_PRIVACY_MODE_ENHANCED         /**< Enhanced mode */
498 } TelCallPrivacyMode_t;
499
500 /**
501  * @enum TelCallPrivacyType_t
502  * This structure contains the voice privacy request type(CDMA only).
503  */
504 typedef enum {
505         TAPI_CALL_PRIVACY_TYPE_MS = 0x01,       /**< Mobile Station Voice Privacy Mode */
506         TAPI_CALL_PRIVACY_TYPE_BS,                      /**< Base Station Voice Privacy Mode */
507         TAPI_CALL_PRIVACY_TYPE_CURRENT          /**< Current Serving Privacy Mode */
508 } TelCallPrivacyType_t;
509
510 /**
511  * @enum TelCallEmergecyMode_t
512  * This structure contains the emergency callback mode(CDMA only).
513  */
514 typedef enum {
515         TAPI_CALL_EMERGENCY_MODE_EXIT,  /**< Emergency CB Exit mode */
516         TAPI_CALL_EMERGENCY_MODE_ENTER  /**< Emergency CB Enter mode */
517 } TelCallEmergecyMode_t;
518
519 /**
520  * @enum TelCallOtaType_t
521  * This structure contains the OTA type(CDMA only).
522  */
523 typedef enum {
524         TAPI_CALL_OTATYPE_OTASP = 0x01, /**< OTASP : mobile initiated OTA*/
525         TAPI_CALL_OTATYPE_OTAPA,                /**< OTAPA : network initiated OTA */
526 } TelCallOtaType_t;
527
528 /**
529  * @enum TelCallOtaspStatus_t
530  * This structure contains the OTASP Status(CDMA only).
531  */
532 typedef enum {
533         TAPI_CALL_OTASP_OK_SPL_UNLOCKED = 0x01, /**< OTASP : SPL unlocked ok*/
534         TAPI_CALL_OTASP_OK_AKEY_EXCESS,         /**< OTASP : A-Key excess ok*/
535         TAPI_CALL_OTASP_OK_SSD_UPDATE,                  /**< OTASP : SSD update ok */
536         TAPI_CALL_OTASP_OK_NAM_DWNLD,                   /**< OTASP : NAM download ok */
537         TAPI_CALL_OTASP_OK_MDN_DWNLD,                   /**< OTASP : MDN download ok */
538         TAPI_CALL_OTASP_OK_IMSI_DWNLD,                  /**< OTASP :  IMSI download ok*/
539         TAPI_CALL_OTASP_OK_PRL_DWNLD,                   /**< OTASP : PRL download ok */
540         TAPI_CALL_OTASP_OK_COMMIT,                              /**< OTASP : commit ok */
541         TAPI_CALL_OTASP_OK_PROGRAMMING,         /**< OTASP : programming ok */
542         TAPI_CALL_OTASP_SUCCESS,                                /**< OTASP : success */
543         TAPI_CALL_OTASP_UNSUCCESS,                              /**< OTASP : unsuccess */
544         TAPI_CALL_OTASP_OK_OTAPA_VERIFY,                /**< OTASP : verify ok */
545         TAPI_CALL_OTASP_PROGRESS,                               /**< OTASP : progress */
546         TAPI_CALL_OTASP_FAILURES_EXCESS_SPC,    /**< OTASP : SPC excess failure */
547         TAPI_CALL_OTASP_LOCK_CODE_PW_SET,               /**< OTASP : lock code password set*/
548 } TelCallOtaspStatus_t;
549
550 /**
551  * @enum TelCallOtapaStatus_t
552  * This structure contains the OTAPA Status(CDMA only).
553  */
554 typedef enum {
555         TAPI_CALL_OTAPA_STOP = 0x00,    /**< OTAPA : stop */
556         TAPI_CALL_OTAPA_START,                  /**< OTAPA : start */
557 } TelCallOtapaStatus_t;
558
559 /**
560  * @enum TelCallTimeMaskType_t
561  * This structure contains call time request mask type.
562  */
563 typedef enum {
564         TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT = 0x01,      /**< Total Call Count Mask */
565         TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME = 0x02, /**< Total Call Time Mask */
566         TAPI_CALL_TIME_TYPE_LAST_CALL_TIME = 0x04,      /**< Last Call Time Mask */
567 } TelCallTimeMaskType_t;
568
569 /**
570  * @enum TelCallToneDuration_t
571  * This structure contains dtmf tone length.
572  */
573 typedef enum {
574         TAPI_CALL_TONE_DURATION_SHORT = 0x01,
575         TAPI_CALL_TONE_DURATION_LONG
576 } TelCallToneDuration_t;
577
578 /**
579  * @enum TelCallEmergencyCategory_t
580  * This structure contains emergency category type
581  */
582 typedef enum {
583         TAPI_CALL_ECC_DEFAULT = 0x00,
584         TAPI_CALL_ECC_POLICE = 0x01,
585         TAPI_CALL_ECC_AMBULANCE = 0x02,
586         TAPI_CALL_ECC_FIREBRIGADE = 0x04,
587         TAPI_CALL_ECC_MARINEGUARD = 0x08,
588         TAPI_CALL_ECC_MOUNTAINRESCUE = 0x10,
589         TAPI_CALL_ECC_MANUAL_ECALL = 0x20,
590         TAPI_CALL_ECCY_AUTO_ECALL = 0x40
591 } TelCallEmergencyCategory_t;
592
593 typedef enum {
594         TAPI_CALL_IDENTITY_DEFAULT, /**< Calling line identity will be sent. Based on network setting, Line identity will presented to the called party. */
595         TAPI_CALL_IDENTITY_SHOW,        /**< Display calling line identity */
596         TAPI_CALL_IDENTITY_HIDE /**< Hide the display of Calling line identity */
597 } TelCallIdentityMode_t;
598
599
600 /**
601  * context type
602  */
603 typedef enum {
604         TAPI_CONTEXT_TYPE_NONE = 0x00,
605         TAPI_CONTEXT_TYPE_VOICE_CALL = 0x01,
606         TAPI_CONTEXT_TYPE_DATA_CALL = 0x2,
607         TAPI_CONTEXT_TYPE_VIDEO_CALL = 0x3,
608         TAPI_CONTEXT_TYPE_NETTEXT,
609         TAPI_CONTEXT_TYPE_E911,
610 } TapiContextType;
611
612
613 /**
614  * Timer State and or Call Timer ID
615  */
616 typedef enum {
617         TAPI_CALL_TSTATE_IDLE = 0x00,           /**< No timer running */
618         TAPI_CALL_TSTATE_SETUP_PENDING, /**< Setup Timer */
619         TAPI_CALL_TSTATE_CONNECT_PENDING,       /**< Connected Timer */
620         TAPI_CALL_TSTATE_END_PENDING,           /**< Release Timer */
621         TAPI_CALL_TSTATE_HOLD_PENDING,          /**< Hold Timer */
622         TAPI_CALL_TSTATE_RETRIEVE_PENDING,      /**< Retrieve Timer */
623         TAPI_CALL_TSTATE_JOIN_PENDING,          /**< Join Timer */
624         TAPI_CALL_TSTATE_SPLIT_PENDING, /**< Split Timer */
625         TAPI_CALL_TSTATE_ECT_PENDING,           /**< ECT Timer */
626         TAPI_CALL_TSTATE_DTMF_PENDING,          /**< DTMF Timer */
627 } TelTapiCallTimerState;
628
629 typedef struct {
630         TS_BOOL bRequestedBySAT;                        /** This flag is to indicate whether the request has been initiated by SAT or not.Possible values are 0 and 1. This flag should be updated only when originating a setup request */
631         TelCallIdentityMode_t IdentityMode; /**< Sets Calling Line Identity mode. If default value  TAPI_IDENTITY_DEFAULT is set, OEM will set the default value. */
632         TelCallEmergencyCategory_t ecc;
633 } tel_set_call_satflag_identiymode;
634
635 /**
636  * This structure contains information about the redirect destination  information.
637  */
638 typedef struct {
639         unsigned char number[TAPI_CALL_DIAL_NUMBER_LEN_MAX + 1]; /**< Redirect destination number */
640 } TelCallDeflectDstInfo_t;
641
642 /**
643  * This structure defines the calling name information
644  */
645 typedef struct {
646         TelCallNameMode_t NameMode;                                     /**< Display mode of the szNameData. */
647         char szNameData[TAPI_CALLING_NAME_SIZE_MAX];    /**< Calling party name string.   */
648 } TelCallingNameInfo_t;
649
650 /**
651  * This structure contains information about an outgoing call.
652  */
653 typedef struct {
654         TelCallType_t CallType;                                         /**< sets type of call (voice, data, video, emergency) */
655         char szNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< A string containing the destination phone number. This follows the dial number format.*/
656 } TelCallDial_t;
657
658 /**
659  * This structure contains information about call status.
660  */
661 typedef struct {
662         int CallHandle;
663         int bMoCall;                                                                    /**< Status will be yes for MO Call. If MT call, then FALSE*/
664         char pNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];  /**< Mobile Number */
665         TelCallType_t CallType;                                         /**< Specifies type of call (voice, data, emergency) */
666         TelCallStates_t CallState;                                              /**< Current Call state */
667         int bConferenceState;                                                   /**< Whether Call is in Conference or not*/
668 } TelCallStatus_t;
669
670 typedef void (*TelCallStatusCallback)( TelCallStatus_t *out, void *user_data );
671
672
673 /**
674  * This structure contains information about call redirection details.
675  */
676 typedef struct {
677         char szRedirectedNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];               /**< Redirected party number */
678         char szRedirectSubAddress[TAPI_CALL_SUBADDRESS_LEN_MAX + 1];    /**< Redirect party sub-address */
679 } TelCallRedirectionInfo_t;
680
681 /**
682  * This structure contains the incoming call information.
683  */
684 typedef struct {
685         unsigned int CallHandle;                                /**< At Foundation API Level, Call handle indicates the Handle of the Call for the Application . At Framework API Level, call handle indicates the Call identifier used for call by the OEM Adaptation Layer Plug-in */
686         TelCallType_t CallType;                         /**< Call type */
687         TelSsLineIdentificationType_t CliPresentationIndicator; /**< Calling Party presentation indicator */
688         char szCallingPartyNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< caller number,null terminated ASCII */
689         TelCallingNameInfo_t CallingNameInfo;   /**< Call name info. If there is no information from network, this information will be NULL.*/
690         TelCallRedirectionInfo_t RedirectInfo;  /**< The data for the Call Redirect information. If there is no information from network, this information will be NULL.  */
691         TelCallSSNocliCause_t CliCause;         /**< No of CLI cause */
692         int fwded;                                                              /**< True or false. If Incoming call is a forwarded call, then true else false. */
693         TelCallActiveLine_t ActiveLine;         /**< Current Active Line */
694 } TelCallIncomingCallInfo_t;
695
696 /**
697  *SS Info message.
698  */
699 typedef struct {
700         TelCallMtSSInfo_t type; /* Type of the SS Info presnet. */
701         TelCallSSNocliCause_t no_cli_cause;
702 } TelCallMtSsInfo_t; // not used
703
704 typedef struct {
705         int isMobileOriginated;                                 /* Is this call Mobile Originated? */
706         TelCallNameMode_t nameMode;                             /* Calling Party Name availability mode */
707         char callNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /* A character array of the destination address. This follows the dial callNumber format. */
708         unsigned int startTime;                                 /* Time when a call is started */
709         unsigned int endTime;                                           /* Time when a call is ended */
710         TelCallType_t callType;                                 /* Type of a call */
711         TelCallStates_t callState;                                      /* State of a call */
712         TelCallActiveState_t activeState;                       /* Status of a call */
713         TelConferenceCallState_t conferenceState;       /* State of a conference call */
714         TelCallingNameInfo_t callingNameInfo;           /* Calling name information of a call */
715         TelCallActiveLine_t current_line;                       /* Line information of a call */
716         TelCallCause_t cause;                                           /* End type of a call when a call is ended */
717         TelTapiEndCause_t endCause;                             /* EndCause */
718 } TelTapiCallInfo_t;
719
720 /**
721  * This structure contains the connected number information.
722  */
723 typedef struct {
724         TelCallSSNocliCause_t no_cli_cause; /**< Cause when no CLI number. */
725         unsigned char dcs;                                      /**< DCS */
726         unsigned char number_type;                      /**< Number type */
727         TelCallNameMode_t name_mode;            /**< Display mode of the name. */
728         char number[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];           /**< Caller number, null terminated ASCII */
729         char sub_address[TAPI_CALL_SUBADDRESS_LEN_MAX + 1]; /**< Called sub-address, null terminated ASCII */
730 } TelCallConnectedNumberInfo_t;
731
732 /**
733  * This structure contains the voice privacy info(CDMA only).
734  */
735 typedef struct {
736         TelCallPrivacyType_t PrivacyType; /**< Voice Privacy Request Type */
737         TelCallPrivacyMode_t PrivacyMode; /**< Voice Privacy Mode */
738 } TelCallVoicePrivacyInfo_t;
739
740 /**
741  * This structure contains the OTA progress indication information(CDMA only).
742  */
743 typedef struct {
744         TelCallOtaType_t OtaType;                       /**< OTA type */
745         TelCallOtaspStatus_t OtaspStatus;       /**< OTASP status : if OTA type is  OTASP, it is valid */
746         TelCallOtapaStatus_t OtapaStatus;       /**< OTAPA status : if OTA type is  OTAPA, it is valid */
747 } TelCallOtaProgressInfo_t;
748
749 /**
750  * This structure contains information about a call time and call count.
751  */
752 typedef struct {
753         unsigned short req_type_mask;   /**< call time request type */
754         unsigned long TotalCallCnt;     /**< Total Call Count */
755         unsigned long OutgoingCallCnt;  /**< Outgoing Call Count */
756         unsigned long IncomingCallCnt;  /**< Incoming Call Count */
757         unsigned long TotalCallTime;    /**< Overall Call Time(Outgoing + Incoming, in second) */
758         unsigned long OutgoingCallTime; /**< Overall Outgoing Call Time(in second) */
759         unsigned long IncomingCallTime; /**< Overall Incoming Call Time(in second) */
760         unsigned long LastCallTime;     /**< Last Call Time(in second) */
761 } TelCallTimeInfo_t;
762
763 /**
764  * This structure contains information about display record in CDMA.
765  */
766 typedef struct {
767         unsigned char Record[TAPI_CALL_DISPLAY_RECORD_MAX + 1]; /**< display record */
768 } TelCallDisplayRecordInfo_t;
769
770 // New Struct for New API
771 typedef enum {
772         TAPI_SOUND_MUTE              =0x00,             /**<Sound is mute*/
773         TAPI_SOUND_VOLUME_LEVEL_1=0x01,         /**<Volume level is 1*/
774         TAPI_SOUND_VOLUME_LEVEL_2=0x02,         /**<Volume level is 2*/
775         TAPI_SOUND_VOLUME_LEVEL_3=0x03,         /**<Volume level is 3*/
776         TAPI_SOUND_VOLUME_LEVEL_4=0x04,         /**<Volume level is 4*/
777         TAPI_SOUND_VOLUME_LEVEL_5=0x05,         /**<Volume level is 5*/
778         TAPI_SOUND_VOLUME_LEVEL_6=0x06,         /**<Volume level is 6*/
779         TAPI_SOUND_VOLUME_LEVEL_7=0x07,         /**<Volume level is 7*/
780         TAPI_SOUND_VOLUME_LEVEL_8=0x08,         /**<Volume level is 8*/
781         TAPI_SOUND_VOLUME_LEVEL_9=0x09          /**<Volume level is 9*/
782 } TelSoundVolume_t;
783
784 typedef enum {
785         TAPI_SOUND_RECORDING_OFF,
786         TAPI_SOUND_RECORDING_ON,
787
788 } TelSoundRecording_t;
789
790 typedef enum {
791         TAPI_SOUND_DEVICE_RECEIVER = 0x00,
792         TAPI_SOUND_DEVICE_SPEAKER_PHONE = 0x10,
793         TAPI_SOUND_DEVICE_HFK = 0x20,
794         TAPI_SOUND_DEVICE_HEADSET = 0x30,
795         TAPI_SOUND_DEVICE_BLUETOOTH = 0x40,
796         TAPI_SOUND_DEVICE_EC = 0xA0,
797 } TelSoundDevice_t;
798
799 typedef enum {
800         TAPI_SOUND_TYPE_VOICE = 0x01,
801         TAPI_SOUND_TYPE_KEYTONE = 0x02,
802         TAPI_SOUND_TYPE_BELL = 0x03,
803         TAPI_SOUND_TYPE_MESSAGE = 0x04,
804         TAPI_SOUND_TYPE_ALARM = 0x05,
805         TAPI_SOUND_TYPE_PDA_MISC = 0x06,
806 } TelSoundType_t;
807
808
809 typedef struct {
810         TelSoundDevice_t device;
811         TelSoundType_t type;
812         TelSoundVolume_t volume;
813 } TelCallVolumeInfo_t;
814
815 typedef enum {
816         TAPI_SOUND_PATH_HANDSET                 =0x01,          /**<Audio path is handset*/
817         TAPI_SOUND_PATH_HEADSET         =0x02,          /**<Audio path is handset*/
818         TAPI_SOUND_PATH_HANDSFREE               =0x03,          /**<Audio path is Handsfree*/
819         TAPI_SOUND_PATH_BLUETOOTH               =0x04,  /**<Audio path is bluetooth*/
820         TAPI_SOUND_PATH_STEREO_BLUETOOTH   =0x05,       /**<Audio path is stereo bluetooth*/
821         TAPI_SOUND_PATH_SPK_PHONE               =0x06,  /**<Audio path is speaker phone*/
822         TAPI_SOUND_PATH_HEADSET_3_5PI       =0x07,      /**<Audio path is headset_3_5PI*/
823         TAPI_SOUND_PATH_BT_NSEC_OFF         =0x08,
824         TAPI_SOUND_PATH_MIC1                =0x09,
825         TAPI_SOUND_PATH_MIC2                =0x0A,
826         TAPI_SOUND_PATH_HEADSET_HAC         =0x0B,
827 } TelSoundPath_t;
828
829 typedef struct {
830         TelSoundPath_t path;
831         enum ExtraVolumeStatus {
832                 TAPI_SOUND_EX_VOLUME_OFF,
833                 TAPI_SOUND_EX_VOLUME_ON,
834         } ex_volume;
835 } TelCallSoundPathInfo_t;
836
837 typedef enum {
838         TAPI_SOUND_MUTE_STATUS_OFF,
839         TAPI_SOUND_MUTE_STATUS_ON,
840 } TelSoundMuteStatus_t;
841
842 typedef enum {
843         TAPI_SOUND_NOISE_REDUCTION_OFF,
844         TAPI_SOUND_NOISE_REDUCTION_ON,
845 } TelSoundNoiseReduction_t;
846
847 typedef enum {
848         TAPI_SOUND_EQUALIZATION_MODE_OFF,
849         TAPI_SOUND_EQUALIZATION_MODE_ON,
850         TAPI_SOUND_EQUALIZATION_MODE_FLAG_OFF,
851         TAPI_SOUND_EQUALIZATION_MODE_FLAG_ON,
852         TAPI_SOUND_EQUALIZATION_MODE_SOFT1,
853         TAPI_SOUND_EQUALIZATION_MODE_SOFT2,
854 } TelSoundEqualizationMode_t;
855
856 typedef enum {
857         TAPI_SOUND_DIRECTION_LEFT,
858         TAPI_SOUND_DIRECTION_RIGHT,
859 } TelSoundDirection_t;
860
861
862 #define MAX_SOUND_EQ_PARAMETER_SIZE 6
863 typedef struct {
864         TelSoundEqualizationMode_t mode;
865         TelSoundDirection_t direction;
866         unsigned short parameter[MAX_SOUND_EQ_PARAMETER_SIZE];
867 } TelCallSoundEqualization_t;
868
869
870
871
872 typedef struct {
873         unsigned int id;
874 } TelCallAnswerCnf_t;
875
876 typedef struct {
877         TelCallEndType_t type;
878         unsigned int id;
879 } TelCallEndCnf_t;
880
881 typedef struct {
882         unsigned int id;
883 } TelCallHoldCnf_t;
884
885 typedef struct {
886         unsigned int id;
887 } TelCallActiveCnf_t;
888
889 typedef struct {
890         unsigned int id;
891 } TelCallSwapCnf_t;
892
893 typedef struct {
894         unsigned int id;
895 } TelCallJoinCnf_t;
896
897 typedef struct {
898         unsigned int id;
899 } TelCallSplitCnf_t;
900
901 typedef struct {
902         unsigned int id;
903 } TelCallTransferCnf_t;
904
905 typedef struct {
906         unsigned int record_num;
907         TelCallVolumeInfo_t record[ 20 ];
908 } TelCallGetVolumeInfoResp_t;
909
910 typedef struct {
911         TelSoundMuteStatus_t status;
912 } TelCallGetMuteStatusResp_t;
913
914
915
916
917
918
919 typedef struct {
920         unsigned int id;
921         TelTapiEndCause_t cause; /**< End cause for the call indicates whether the call is released normally or due to other cause*/
922 } TelCallStatusIdleNoti_t;
923
924 typedef struct {
925         unsigned int id;
926 } TelCallStatusActiveNoti_t;
927
928 typedef struct {
929         unsigned int id;
930 } TelCallStatusHeldNoti_t;
931
932 typedef struct {
933         unsigned int id;
934 } TelCallStatusDialingNoti_t;
935
936 typedef struct {
937         unsigned int id;
938 } TelCallStatusAlertNoti_t;
939
940 typedef struct {
941         unsigned int id;
942 } TelCallStatusIncomingNoti_t;
943
944 typedef struct {
945         unsigned int id;
946 } TelCallStatusWaitingNoti_t;
947
948 typedef struct {
949         unsigned int id;
950 } TelCallInfoWaitingNoti_t;
951
952 typedef struct {
953         unsigned int id;
954 } TelCallInfoForwardedNoti_t;
955
956 typedef struct {
957         unsigned int id;
958 } TelCallInfoBarredIncomingNoti_t;
959
960 typedef struct {
961         unsigned int id;
962 } TelCallInfoBarredOutgoingNoti_t;
963
964 typedef struct {
965         unsigned int id;
966 } TelCallInfoForwardConditionalNoti_t;
967
968 typedef struct {
969         unsigned int id;
970 } TelCallInfoForwardUnconditionalNoti_t;
971
972 typedef struct {
973         unsigned int id;
974 } TelCallInfoActiveNoti_t;
975
976 typedef struct {
977         unsigned int id;
978 } TelCallInfoHeldNoti_t;
979
980 typedef struct {
981         unsigned int id;
982 } TelCallInfoJoinedNoti_t;
983
984 typedef struct {
985         TelSoundPath_t path;
986 } TelCallSoundPathNoti_t;
987
988 typedef enum {
989         TAPI_CALL_SOUND_RINGBACK_TONE_START,
990         TAPI_CALL_SOUND_RINGBACK_TONE_END,
991 } TelCallSoundRingbackToneNoti_t;
992
993 typedef enum {
994         TAPI_CALL_SOUND_WBAMR_STATUS_OFF,
995         TAPI_CALL_SOUND_WBAMR_STATUS_ON,
996 } TelCallSoundWbamrNoti_t;
997
998 typedef struct {
999         TelSoundNoiseReduction_t status;
1000 } TelCallSoundNoiseReductionNoti_t;
1001
1002 typedef struct {
1003         TelSoundEqualizationMode_t mode;
1004         TelSoundDirection_t direction;
1005 } TelCallSoundEqualizationNoti_t;
1006
1007
1008 #ifdef __cplusplus
1009 }
1010 #endif
1011
1012 #endif  // _TEL_CALL_H_
1013 /**
1014  * @}
1015  */