Make TIZEN 2.0
[apps/home/call.git] / call-engine / core / include / vc-core-engine-types.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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 __VC_CORE_ENGINE_TYPES_H_
19 #define __VC_CORE_ENGINE_TYPES_H_
20
21 #include <stdbool.h>
22 #include <glib.h>
23
24 /**< This is the prototype of the client callback function  */
25 typedef gboolean(*voicecall_cb) (int event, int param1, int param2, void *param3, void *puser_data);
26
27 /**
28  * This opaque structure is the interface for the client application to communicate to the engine
29  */
30 typedef struct _voicecall_engine_t voicecall_engine_t;
31
32 /**< General Macro Definitions  */
33 #define TAG_CALL                                                "CALL"
34 #define TAG_CALL_LAUNCH                                 "VCKPI"
35 #define VC_DISPLAY_NAME_LENGTH_MAX              (255+1)                 /**< Voiecall Display Name Max Length  */
36 #define VC_IMAGE_PATH_LENGTH_MAX                (255+1)                 /**< Max File length for image */
37 #define VC_RINGTONE_PATH_LENGTH_MAX             (255+1)                 /**< Max File length for Ringtone */
38 #define VC_DATA_LENGTH_MAX                              (255+1)                 /**< Max data length for misc */
39 #define VC_PHONE_NUMBER_LENGTH_MAX              (82+1)                  /**< Maximum length of a phone number  */
40 #define VC_PHONE_NAME_LENGTH_MAX                (80+1)  /**< Maximum length of a calling name  */
41 #define VC_PHONE_SUBADDRESS_LENGTH_MAX  (40+1)  /**< Maximum length of a SUB address  */
42 #define VC_MAX_CALL_GROUP_MEMBER                5                       /**< Maximum number of members in a group */
43 #define VC_MAX_CALL_MEMBER                              8                       /**< This is the maximum number of members possible */
44 #define VC_INVALID_CALL_ID                              0                       /**< This is the invalid entry for call ID */
45 #define VC_MAX_CALL_ID                                  7                       /**< Maximum Allowed Call IDS (1 -7) (5 Conf Calls, 1 Other Connected Call and 1 Outgoing/Incoming Call)*/
46
47 #define VC_AOC_CURRENCY_CODE_LEN_MAX    3                       /**< Max Length of the AOC Currency Code */
48
49 #define VC_INVALID_CALL_INDEX                   -1
50 #define VC_INVALID_CALL_COST                    -1
51 #define VC_INVALID_PPM                                  -1
52
53 #define VC_TAPI_INVALID_CALLHANDLE              -1
54 #define VC_RQSTID_DEFAULT                               -1              /**< To collect request ID of Async TAPI request*/
55
56 #define VC_ED_HANDLE                                    0
57 #define VC_SAT_ICON_SIZE                                (64*64)
58
59 #define VC_EMERGENCY_NUM_MAX                    8
60
61 #define VC_RECORD_FULL_FILE_PATH_LENGTH (4095+1)
62 #ifndef VC_NO_ERROR
63 #define VC_NO_ERROR 0
64 #endif
65
66 #ifndef VC_ERROR
67 #define VC_ERROR -1
68 #endif
69
70 #ifndef VC_INVALID_VOLUME
71 #define VC_INVALID_VOLUME -1
72 #endif
73 /**< General Macro Definitions  */
74
75 #ifndef EXPORT_API
76 #define EXPORT_API __attribute__((visibility("default")))
77 #endif
78
79 /**
80  * This enumeration defines the call states
81  */
82 typedef enum {
83         VC_CALL_ACCEPT_1,
84         VC_CALL_ACCEPT_2
85 } voicecall_accept_choice_t;
86
87 /**
88  * This enumeration defines the call states
89  */
90 typedef enum {
91         VC_CALL_STATE_NONE,                                     /**< No call state */
92         VC_CALL_STATE_INCOME,                           /**< Incoming state  */
93         VC_CALL_STATE_REJECTED,                         /**< Rejected state */
94         VC_CALL_STATE_PREPARE_OUTGOING, /**< Prepare for outgoing */
95         VC_CALL_STATE_OUTGOING,                         /**< Outgoing state */
96         VC_CALL_STATE_OUTGOING_ORIG,            /**< Outgoing originatged state */
97         VC_CALL_STATE_OUTGOING_ALERT,           /**< Outgoing alert state */
98         VC_CALL_STATE_CANCELLED,                        /**< Cancelled state */
99         VC_CALL_STATE_CONNECTED,                        /**< Connected state */
100         VC_CALL_STATE_RELEASE_WAIT,             /**< Release wait state */
101         VC_CALL_STATE_ENDED,                            /**< Call ended state */
102         VC_CALL_STATE_REDIAL,                           /**< Redial state */
103         VC_CALL_STATE_ENDED_FINISH,             /**< Call ended finish state */
104         VC_CALL_STATE_MAX_NUM                           /**< Max value */
105 } voicecall_call_state_t;
106
107 /**
108  * This enumeration defines the call setup parties
109  */
110 typedef enum {
111         VC_CALL_SETUP_BY_NORMAL,                /**< Normal Call setup */
112         VC_CALL_SETUP_BY_SAT,                   /**< Call setup by SAT */
113         VC_CALL_SETUP_BY_MAILBOX                /**< Call setup by Mail box */
114 } voicecall_call_type_bysetup_t;
115
116 /**
117  * This enumeration defines the call end cause types
118  */
119 typedef enum {
120         VC_ENDCAUSE_CALL_ENDED,                                         /**< Call ended */
121
122         VC_ENDCAUSE_CALL_DISCONNECTED,                          /**< Call disconnected */
123         VC_ENDCAUSE_CALL_SERVICE_NOT_ALLOWED,           /**< Service not allowed */
124         VC_ENDCAUSE_CALL_BARRED,                                                /**< Call barred */
125         VC_ENDCAUSE_NO_SERVICE,                                         /**< No Service */
126         VC_ENDCAUSE_NW_BUSY,                                                    /**< Network busy */
127
128         VC_ENDCAUSE_NW_FAILED,                                          /**< Network failed */
129         VC_ENDCAUSE_NO_ANSWER,                                          /**< No anwer from other party */
130         VC_ENDCAUSE_NO_CREDIT,                                          /**< No credit available */
131         VC_ENDCAUSE_REJECTED,                                                   /**< Call rejected */
132         VC_ENDCAUSE_USER_BUSY,                                          /**< user busy */
133
134         VC_ENDCAUSE_WRONG_GROUP,                                        /**< Wrong group */
135         VC_ENDCAUSE_CALL_NOT_ALLOWED,                           /**< Call not allowed */
136         VC_ENDCAUSE_TAPI_ERROR,                                         /**< Tapi error */
137         VC_ENDCAUSE_CALL_FAILED,                                                /**< Call Failed */
138         VC_ENDCAUSE_NO_USER_RESPONDING,                         /**< User not responding */
139
140         VC_ENDCAUSE_USER_ALERTING_NO_ANSWER,            /**< User Alerting No Answer */
141         VC_ENDCAUSE_SERVICE_TEMP_UNAVAILABLE,           /**< Circuit Channel Unavailable,Network is out of Order,Switching equipment congestion,Temporary Failure */
142         VC_ENDCAUSE_USER_UNAVAILABLE,                           /**< Called Party Rejects the Call */
143         VC_ENDCAUSE_INVALID_NUMBER_FORMAT,                      /**< Entered number is invalid or incomplete */
144         VC_ENDCAUSE_NUMBER_CHANGED,                             /**< Entered number has been changed */
145
146         VC_ENDCAUSE_UNASSIGNED_NUMBER,                          /**< Unassigned/Unallocated number*/
147         VC_ENDCAUSE_USER_DOESNOT_RESPOND,                       /**< Called Party does not respond*/
148         VC_ENDCAUSE_IMEI_REJECTED,                      /**< Called Party does not respond*/
149 } voice_call_end_cause_type_t;
150
151 /**
152 * This enumeration defines the call types used to end the calls in end call API
153 */
154 typedef enum {
155         VC_END_OUTGOING_CALL,                   /**< To end only mobile originated outgoing call*/
156         VC_END_INCOMING_CALL,                           /**< To end only mobile terminated incoming call*/
157         VC_END_ACTIVE_OR_HELD_CALLS,            /**< To end first active call if available or to end end held call*/
158         VC_END_ALL_ACTIVE_CALLS,                        /**< To end all available active calls*/
159         VC_END_ALL_HELD_CALLS,                  /**< To end all available held calls*/
160         VC_END_ALL_CALLS                                        /**< To end all available calls(active,held,incoming/outgoing*/
161 } _vc_core_engine_end_call_type_t;
162
163 /**
164 * This enumeration defines flags to be used with _vc_core_engine_status_set_end_flag
165 */
166 typedef enum {
167         VC_RETREIVE_CALL_ON_MOCALL_END  /**< To be used before ending the mo call to retrieve the held call on mo call end if held call is available*/
168 } voicecall_end_flag_t;
169
170 /**
171  * This enum defines the different call types by source of origination of call
172  */
173 typedef enum {
174         VC_CALL_ORIG_TYPE_NORMAL,                                               /**< Normal Call */
175         VC_CALL_ORIG_TYPE_EMERGENCY,                                            /**< Emergency Call*/
176         VC_CALL_ORIG_TYPE_VOICEMAIL,                                            /**< Voiece Mail Call*/
177         VC_CALL_ORIG_TYPE_SAT,                                                  /**< SAT Requested Call*/
178         VC_CALL_ORIG_TYPE_NOSIM,                                                        /**< Emergency Call with out SIM*/
179         VC_CALL_ORIG_TYPE_PINLOCK                                               /**< Emergency Call with Pin Lock*/
180 } voicecall_call_orig_type_t;
181
182 /**
183  * This enum defines the different call types to be used with the assiociated APIs
184  */
185 typedef enum {
186         VC_INCOMING_CALL,                       /**< Mobile Terminated Call*/
187         VC_OUTGOING_CALL,                       /**< Mobile Originated Call*/
188         VC_CONNECTED_CALL                       /**< Connected Call (Both Parties Connected)*/
189 } voicecall_call_type_t;
190
191 /**
192 * This enum defines the type of calls being termed once the calls are connected
193 */
194 typedef enum {
195         VC_ACTIVE_CALL,         /**< Connected calls in active state*/
196         VC_HELD_CALL                    /**< Connected calls in held state*/
197 } voicecall_connected_call_type_t;
198
199 /**
200  * This enum defines alternate line service types
201  */
202 typedef enum {
203         VC_CALL_CPHS_ALS_NONE,                                          /**< No ALS */
204         VC_CALL_CPHS_ALS_LINE1,                                         /**< Line 1*/
205         VC_CALL_CPHS_ALS_LINE2                                          /**< Line 2 */
206 } voice_call_cphs_alsline_t;
207
208 /**
209  * This enum defines the call group states
210  */
211 typedef enum {
212         CALL_VC_GROUP_STATE_NONE,                                       /**< Group State Not Exist */
213         CALL_VC_GROUP_STATE_ACTIVE,                                     /**< Active group state */
214         CALL_VC_GROUP_STATE_HOLD                                        /**< Hold group state */
215 } call_vc_groupstate_t;
216
217 /**
218  * This enum defines the mobile originated call states
219  */
220 typedef enum {
221         VC_MOCALL_STATE_NONE,                                           /**< MO State Not Exist */
222         VC_MOCALL_STATE_END,                                                    /**< MO State End */
223         VC_MOCALL_STATE_CANCEL,                                         /**< MO State Cancel */
224         VC_MOCALL_STATE_DESTROY                                         /**< MO State Destroy */
225 } voice_call_mocall_state_t;
226
227 #ifdef _CALL_LONG_DTMF
228 /**
229  * This enum defines dtmf buffer states
230  */
231 typedef enum {
232         CALL_VC_DTMF_BUF_NONE,                                  /**< Buffer state Not Exist */
233         CALL_VC_DTMF_BUF_START,                                 /**< Buffer start */
234         CALL_VC_DTMF_BUF_RECEIVED_START_ACK,    /**< Reveived start acknowledgement */
235         CALL_VC_DTMF_BUF_WAIT_STOP_ACK                  /**< Wait stop acknowledgement */
236 } call_vc_dtmf_bufferstate_t;
237 #endif
238
239 /**
240 * This enum defines vc engine sat mo call ctrl response type
241 */
242 typedef enum __voicecall_engine_sat_mo_call_ctrl_res {
243         CALL_ALLOWED_NO_MOD,                                            /**< Call Allowed without any modification in the caller details */
244         CALL_NOT_ALLOWED,                                                       /**< Call Not Allowed - (User should be notified) */
245         CALL_ALLOWED_WITH_MOD,                                  /**< Call Allowed with modification in the caller details- (UI should be updated) */
246         CALL_CHANGED_TO_SS                                              /**< Call number modified to SS String */
247 } voicecall_engine_sat_mo_call_ctrl_res;
248
249 /**
250  * This enum defines sat request response types
251  */
252 typedef enum __voicecall_engine_sat_rqst_resp_type {
253         SAT_RQST_SETUP_CALL,                                            /**< Sat setup call request */
254         SAT_RQST_SEND_DTMF,                                             /**< Sat send dtmf request */
255         SAT_RESP_SETUP_CALL                                             /**< Sat setup call response */
256 } voicecall_engine_sat_rqst_resp_type;
257
258 /**
259  * This enum defines voicecall engine callback event types
260  */
261 typedef enum _voicecall_engine_event_t {
262         /* Tapi Call Related Event Types */
263         VC_CALL_INCOM,                                                          /**< Incoming call */
264         VC_CALL_OUTGOING,                                                       /**< Outgoing call. This event will be sent, when outgoing deferred and made after some time */
265         VC_CALL_OUTGOING_ORIG,                                  /**< Outgoing call originated */
266         VC_CALL_OUTGOING_ALERT,                                 /**< Outgoing alert call */
267         VC_CALL_CONNECTED,                                              /**< Call connected */
268         VC_CALL_NORMAL_END,                                             /**< Normal end */
269         VC_CALL_INCOM_END,                                              /**< Incoming call end */
270         VC_CALL_INCOM_DROPPED,                                  /**< Incoming call ended before it is being precessed by the engine */
271         VC_CALL_REJECTED_END,                                           /**< Rejected call end */
272         VC_CALL_OUTGOING_END,                                   /**< Outgoing call end */
273         VC_CALL_OUTGOING_ABORTED,                               /**< Outgoing call ended before making the call to the NW */
274         VC_CALL_DTMF_ACK,                                                       /**< DTMF Acknowledgement */
275         VC_CALL_AUTO_REDIAL_CHECK,                              /**< Auto Redial Check */
276         VC_CALL_ANSWER_CNF,                                             /**< Answer confirm */
277
278         /*Tapi Call Dependent SS related events */
279         VC_CALL_SS_HELD,                                                        /**< SS Held */
280         VC_CALL_SS_RETREIVED,                                           /**< SS Retriebved */
281         VC_CALL_SS_SWAP,                                                        /**< SS call swap */
282         VC_CALL_SS_SETUP_CONF,                                  /**< SS setup conference */
283         VC_CALL_SS_SPLIT_CONF,                                  /**< SS Split conference */
284         VC_CALL_SS_TRANSFERRED,                                 /**< SS call transferred */
285         VC_CALL_SS_CONNECT_LINE_IND,                            /**< SS connectect line indication */
286
287         /*Tapi Call SS Indication Related Events */
288         VC_CALL_IND_FORWARD,                                            /**< Call forward */
289         VC_CALL_IND_ACTIVATE,                                           /**< Activate call */
290         VC_CALL_IND_HOLD,                                                       /**< Hold call */
291         VC_CALL_IND_TRANSFER,                                           /**< Call transfer */
292         VC_CALL_IND_SETUPCONFERENCE,                            /**< Setup conference */
293         VC_CALL_IND_BARRING,                                            /**< Call barring */
294         VC_CALL_IND_WAITING,                                            /**< Call waiting */
295         VC_CALL_IND_CUGINFO,                                            /**< Closed User Group information */
296         VC_CALL_IND_SSNOTIFY,                                           /**< SS nofify */
297         VC_CALL_IND_CALLINGNAMEINFO,                            /**< Caller name information */
298         VC_CALL_IND_REDIRECT_CNF,                                       /**< Redirect confirmation */
299         VC_CALL_IND_ACTIVATECCBS_CNF,                   /**< Activate CCBS confirmation */
300         VC_CALL_IND_ACTIVATECCBS_USERINFO,              /**< Activate CCBS user information */
301         VC_CALL_IND_AOC,                                                        /**< AOC indication */
302
303         /*Tapi Response Error Related Events */
304         VC_ERROR_OCCURED,                                                       /**< Error */
305
306         /* Voicecall Engine triggered Event Type */
307         VC_ACTION_INCOM_FORCE,  /**< If any outgoing data needs to be destroyed or cleaned up in the client during an incoming call, this event will be sent */
308         VC_ACTION_SAT_REQUEST,  /**< SAT Request. This event will be sent to client , when SAT Engine requests any service from voicecall. Voicecall Engine holds the SAT engine related information, clients can get the information from the engine when it is required */
309         VC_ACTION_SAT_RESPONSE, /**< SAT Response */
310         VC_ACTION_CALL_END_HELD_RETREIVED,      /**< If a held call is being retreived on end of an active call, this event will be emitted */
311         VC_ACTION_NO_ACTIVE_TASK,                       /**< This event will be published when engine becomes idle after executing/aborting a request from other apps - eg) if SAT request is not processed*/
312
313         VC_CALL_GET_VOLUME_RESP,                        /**< Response data from tapi for get tapi sound volume*/
314
315         VC_CALL_NOTI_WBAMR,                     /**< Notification Wideband amr */
316         VC_ENGINE_EVENT_MAX
317 } voicecall_engine_event_t;
318
319 /**
320  * This enum defines call forwarding indication types
321  */
322 typedef enum _voicecall_forward_ind_type_t {
323         VC_FRWD_IND_INCOM_IS_FRWD,                                      /**< Is incoming call a forwarded call? */
324         VC_FRWD_IND_INCOM_FRWD,                                         /**< Incoming call Forwarded */
325         VC_FRWD_IND_OUTGOING_FRWD                                       /**< Outgoing call Forwarded */
326 } voicecall_forward_ind_type_t;
327
328 /**
329  * This enum defines call barring indication types
330  */
331 typedef enum _voicecall_barr_ind_type_t {
332         VC_BARR_IND_NONE,                                                               /**< No call barring indication */
333         VC_BARR_IND_ALL,                                                                /**< Barring all outgoing and incoming calls */
334         VC_BARR_IND_BAOC,                                                               /**< Bar All Outgoing Calls indication */
335         VC_BARR_IND_BOIC,                                                               /**< Bar Outgoing International Calls indication */
336         VC_BARR_IND_BOIC_EXHC,                                          /**< Bar Outgoing International Calls EXcept Home Calls indication */
337         VC_BARR_IND_BAIC,                                                               /**< Bar All Incoming Calls indication */
338         VC_BARR_IND_BICROAM                                                     /**< Bar Incoming Calls when ROAMing indication */
339 } voicecall_barr_ind_type_t;
340
341 /**
342  * This enum defines supplementary services notificatoin indication types
343  */
344 typedef enum _voicecall_ssnotify_ind_type_t {
345         VC_SSNOTIFY_IND_CFU,                                                    /**<  SS CFU indication */
346         VC_SSNOTIFY_IND_CFB,                                                    /**<  SS CFB indication */
347         VC_SSNOTIFY_IND_CFNRY,                                          /**<  SS CFNRY indication */
348         VC_SSNOTIFY_IND_CFNRC,                                          /**<  SS CFNRC indication */
349         VC_SSNOTIFY_IND_CLIR,                                                   /**<  SS CLIR indication */
350         VC_SSNOTIFY_IND_ALL_COND_FORWARDING,            /**<  SS all condtional call forwarding indication */
351         VC_SSNOTIFY_IND_BARRING_OF_OUTGOING             /**<  SS Outging call baring indication */
352 } voicecall_ssnotify_ind_type_t;
353
354 /**
355  * This enum defines engine/ Input Output sate of call agent
356  */
357 typedef enum {
358         VC_INOUT_STATE_NONE,                                                                    /**<  I/O state none */
359         VC_INOUT_STATE_OUTGOING_START,                                          /**< Outgoing enum value start */
360         VC_INOUT_STATE_OUTGOING_WAIT_HOLD,                                      /**< Outgoing wait for hold */
361         VC_INOUT_STATE_OUTGOING_WAIT_ORIG,                                      /**< Outgoing wait for Origination event */
362         VC_INOUT_STATE_OUTGOING_WAIT_ALERT,                                     /**< Outgoing wait alert */
363         VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED,                         /**< Outgoing wait connected */
364         VC_INOUT_STATE_OUTGOING_WAIT_RELEASE,                           /**< Outgoing wait release */
365         VC_INOUT_STATE_OUTGOING_ABORTED,                                                /**< Outgoing call aborted */
366         VC_INOUT_STATE_OUTGOING_SHOW_REDIALCAUSE,                       /**< Outgoing show redial cause */
367         VC_INOUT_STATE_OUTGOING_WAIT_REDIAL,                                    /**< Outgoing wait redial */
368         VC_INOUT_STATE_OUTGOING_SHOW_RETRY_CALLBOX,                     /**< Outgoing showing retry call box : not used*/
369         VC_INOUT_STATE_OUTGOING_END,                                                    /**< Outgoing enum value end */
370
371         VC_INOUT_STATE_INCOME_SELFEVET_WAIT,    /**< Incoming waiting for self event : not used*/
372         VC_INOUT_STATE_INCOME_START,                                                    /**< Incoming enumvalue start */
373         VC_INOUT_STATE_INCOME_BOX,                                                              /**< Incoming box */
374         VC_INOUT_STATE_INCOME_WAIT_REDIRECTCNF, /**< Incoming wait for redirect confirmation : not used*/
375         VC_INOUT_STATE_INCOME_WAIT_REDIRECT_END,        /**< Incoming wait for redirect end : not used*/
376         VC_INOUT_STATE_INCOME_WAIT_CONNECTED,                           /**< Incoming wait connected */
377         VC_INOUT_STATE_INCOME_WAIT_HOLD_CONNECTED,                      /**< Incoming wait for hold and then connected event */
378         VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVE_CONNECTED, /**< Incoming wait for release and then connected event */
379         VC_INOUT_STATE_INCOME_WAIT_HOLD,        /**< Incoming wait hold : not used*/
380         VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVECALL,          /**< Incoming wait release active call */
381         VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL,            /**< Incoming wait release hold call */
382 #ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
383         VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL_FOR_ALL_RELEASE,    /**< Incoming wait release hold call in case of release all and accept */
384 #endif
385         VC_INOUT_STATE_INCOME_WAIT_RELEASE,                                     /**< Incoming wait release call */
386         VC_INOUT_STATE_INCOME_END,                                                      /**< Incoming enum value end */
387         VC_INOUT_STATE_MAX_NUM                                                          /**< Max value */
388 } voicecall_inout_state_t;
389
390 /**
391  * This enum defines call answer types
392  */
393 typedef enum _voicecall_answer_type_t {
394         VC_ANSWER_NORMAL,                                               /**< Accepts the call in normal scenario(Only CONNECTED will be sent to the client) */
395         VC_ANSWER_HOLD_ACTIVE_AND_ACCEPT,               /**< Puts the active call on hold and accepts the call (Only CONNECTED will be sent to client) */
396         VC_ANSWER_RELEASE_ACTIVE_AND_ACCEPT,    /**< Releases the active call and accept the call (END and CONNECTED will be sent to Client) */
397         VC_ANSWER_RELEASE_HOLD_AND_ACCEPT,      /**< Releases the active call and accept the call (END and  CONNECTED will be sent to client) */
398 #ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
399         VC_ANSWER_RELEASE_ALL_AND_ACCEPT                /**< Releases the all calls and accept the call (END and  CONNECTED will be sent to client) */
400 #endif
401 } voicecall_answer_type_t;
402
403 /**
404  * This enum defines the cphs csp status names
405  */
406 typedef enum _voicecall_cphs_csp_service {
407         /**< CPHS Teleservice*/
408         VC_CPHS_CSP_ALS,                /**<Alternate Line Service*/
409
410         /**< Call completion service*/
411         VC_CPHS_CSP_HOLD,               /**<Call Hold*/
412         VC_CPHS_CSP_CW,         /**<Call Waiting*/
413         VC_CPHS_CSP_CBS,                /**<Completion of Call to Busy Subscribe*/
414         VC_CPHS_CSP_UUS,                /**<User User Signalling*/
415
416         /**< Call Offering Service*/
417         VC_CPHS_CSP_CFU,                /**<Call Forwarding Unconditional*/
418         VC_CPHS_CSP_CFB,                /**<Call Forwarding On User Busy*/
419         VC_CPHS_CSP_CFNRY,      /**<Call Forwarding on No Reply*/
420         VC_CPHS_CSP_CFNRC,      /**<Call Forwarding On User Not Reachable*/
421         VC_CPHS_CSP_CT,         /**<Call Transfer*/
422
423         /**< Other Supplementary Service*/
424         VC_CPHS_CSP_MPTY,               /**<Multi-Party Service*/
425         VC_CPHS_CSP_CUG,                /**<Closed User Group*/
426         VC_CPHS_CSP_AOC,                /**<Advice Of Charge*/
427         VC_CPHS_CSP_PREFCUG,    /**<Preferential CUG*/
428         VC_CPHS_CSP_CUGOA       /**<CUG Outgoing Access*/
429 } voicecall_cphs_csp_service;
430
431 /**
432  * This enum defines audio path values to be used when setting the voicecall audio path
433  */
434 typedef enum __voicecall_audio_path_t {
435         VC_AUDIO_PATH_HANDSET,                  /**<Handset normal receiver*/
436         VC_AUDIO_PATH_HEADSET,                  /**<Headset Attached*/
437         VC_AUDIO_PATH_HANDSFREE,                /**<Handsfree Attached*/
438         VC_AUDIO_PATH_BLUETOOTH,                /**<Bluetooth headset Attached*/
439         VC_AUDIO_PATH_STEREO_BLUETOOTH, /**<Bluetooth Stero headset Attached*/
440         VC_AUDIO_PATH_SPK_PHONE,                /**<Handset Speaker Phone receiver*/
441         VC_AUDIO_PATH_HEADSET_3_5PI             /**<Headset */
442 } voicecall_audio_path_t;
443
444 /**
445  * This enum defines volume level to be used when setting the voicecall volume
446  */
447 typedef enum __voicecall_audio_volume_t {
448         VC_AUDIO_VOLUME_LEVEL_0,
449         VC_AUDIO_VOLUME_LEVEL_1,
450         VC_AUDIO_VOLUME_LEVEL_2,
451         VC_AUDIO_VOLUME_LEVEL_3,
452         VC_AUDIO_VOLUME_LEVEL_4,
453         VC_AUDIO_VOLUME_LEVEL_5,
454         VC_AUDIO_VOLUME_LEVEL_6,
455         VC_AUDIO_VOLUME_LEVEL_7,
456         VC_AUDIO_VOLUME_LEVEL_8,
457         VC_AUDIO_VOLUME_LEVEL_9
458 } voicecall_audio_volume_t;
459
460 /**
461 * Closed User Group Details
462 */
463 typedef struct __voicecall_cug_info_t {
464         gboolean bcug_used;                             /**<TRUE -if CUG information used ,FALSE otherwise */
465         int cug_index;                                  /**< CUG Index Value */
466         gboolean bpref_cug;                             /**<TRUE-if preferential CUG capablity available, FALSE otherwise */
467         gboolean boa_cug;                               /**<TRUE -if Outgoing Access capablity available, FALSE otherwise */
468 } voicecall_cug_info_t;
469
470 /**
471  * This struct provides a structure for call setup info data.
472  */
473 typedef struct _voicecall_setup_info_t {
474         voicecall_call_type_bysetup_t call_setup_by;                                                    /**<defines source of the call setup*/
475         voicecall_call_orig_type_t call_type;                                                                                   /**<  Call type */
476         char source_tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                     /**<  Telephone number */
477         char tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                    /**<  Telephone number */
478         int mo_call_index;                                                                                                                      /**< Outgoing call index */
479         voicecall_cug_info_t cug_info;                                                                                          /**< CUG Details */
480         int identity_mode;                                                                                                              /**< Identity mode, 0 - default, 1-show, 2-hide */
481         int ecc_category;                                                                                                               /**< ecc category*/
482 } voicecall_setup_info_t;
483
484 /**
485  * This enumeration defines name mode to be verified dueing an incoming call
486  */
487 typedef enum {
488         CALL_VC_NAME_MODE_UNAVAILABLE = 0x00,   /**<  Caller Name Unavailable*/
489         CALL_VC_NAME_MODE_REJECT = 0x01,                /**<  Caller Name Rejected by the caller*/
490         CALL_VC_NAME_MODE_INTERACTION = 0x02,   /**<  Caller Name Unavailable*/
491         CALL_VC_NAME_MODE_PAYPHONE = 0x03,              /**<  Caller using Payphone*/
492         CALL_VC_NAME_MODE_MAX
493 } call_vc_name_mode_t;
494
495 /**
496  * This enumeration defines calling name mode to be verified dueing an incoming call
497  */
498 typedef enum {
499         CALL_VC_CALLING_NAME_MODE_AVAILABLE,    /**<  Calling Name available*/
500         CALL_VC_CALLING_NAME_MODE_RESTRICTED,           /**<  Calling Name restricted by the caller*/
501         CALL_VC_CALLING_NAME_MODE_UNAVAILABLE,  /**<  Calling Name Unavailable*/
502         CALL_VC_CALLING_NAME_MODE_AVAILABLE_RESTRICTED,         /**<  Calling name is available but restricted*/
503         CALL_VC_CALLING_NAME_MODE_MAX
504 } call_vc_calling_name_mode_t;
505
506 /**
507  * This structure defines the members of call object
508  */
509 typedef struct _call_vc_call_objectinfo_t {
510         /*Fields from TAPI */
511         int call_handle;                                                                                                                                /**< Call Handle */
512         float aoc_ccm;                                                                                                                                  /**< AOC Current Call Meter */
513         char aoc_currency[VC_AOC_CURRENCY_CODE_LEN_MAX + 1];                                            /**< AOC Currency Code */
514 #ifdef _CPHS_DEFINED_
515         voice_call_cphs_alsline_t als_type;                                                                                     /**< Alternate Line Service Type */
516 #endif
517
518         /*Engine Fields */
519         int call_id;                                                                                                                                    /**< Call ID */
520
521         /* Call Object Status Flags */
522         gboolean bemergency_number;                                                                                                     /**< emergency call? */
523         gboolean bused_sim;                                                                                                                             /**< used sim? */
524         gboolean mo;                                                                                                                            /**< Mobile originated call? */
525         gboolean bccbs_call;                                                                                                                    /**< CCBS call? */
526         gboolean brestricted_namemode;                                                                                          /**< Name mode Restricted? */
527         call_vc_name_mode_t name_mode;                                                                                  /**< Name mode when BDC number doesn't exist */
528         call_vc_calling_name_mode_t bcalling_namemode;                                                  /**< Name mode of calling name information */
529
530         /*Caller Details */
531         char source_tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                             /**< Source Telephone number */
532         char tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                            /**< Telephone number */
533         char calling_name[VC_PHONE_NAME_LENGTH_MAX];                                            /**< Calling part name */
534         char dtmf_number[VC_PHONE_NUMBER_LENGTH_MAX];                                           /**< DTMF number */
535         char connected_telnumber[VC_PHONE_NUMBER_LENGTH_MAX];                                   /**< Changed number to be connected by call forwarding */
536         char connected_name[VC_PHONE_NUMBER_LENGTH_MAX];                                        /**< Changed name to be connected by call forwarding  */
537
538         /*Call State Flags */
539         voice_call_end_cause_type_t end_cause_type;                                                     /**< End cause type */
540         voicecall_call_state_t state;                                                                                                   /**< Call State */
541         voicecall_call_orig_type_t call_type;                                                                                           /**< Call Type */
542
543         /*CUG Flags */
544         voicecall_cug_info_t cug_info;                                                                                          /**< Closed User Group Details */
545
546         /*Idendity Mode */
547         int identity_mode;                                                                                                              /**< Show My Number Mode, 0-Default,1-Show, 2- Hide */
548         gboolean bincoming_call_is_fwded;
549
550         int ecc_category;                                                                                               /**< emergency category(see the TelSimEccEmergencyServiceInfo_t or TelCallEmergencyCategory_t)*/
551 } call_vc_call_objectinfo_t;
552
553 /**
554  * Structure for SAT call info
555  */
556 typedef struct {
557         char disp_text[VC_PHONE_NUMBER_LENGTH_MAX];                                                             /**< Display text */
558         char call_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                           /**< Call NUmber */
559         unsigned int duration;                                                                                                          /**< Duration of call */
560         int sat_mo_call_ctrl_res;
561         gboolean bicon_present;
562         gboolean bsat_hidden;
563 } voicecall_sat_callinfo_t;
564
565 /**
566  * Structure to hold the SAT Icon Details
567  */
568 typedef struct {
569         int width;                                      /**< Width of the SAT icon being held by the engine */
570         int height;                                     /**< Height of the SAT icon being held by the engine */
571         guchar *psat_icon_data;         /**< SAT icon Raw Data */
572 } voicecall_sat_call_icon_data_t;
573
574 /**
575  * This enumeration defines SAT reponse types
576  */
577 typedef enum {
578         CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND,                                           /**< Unable to process command */
579         CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND,                                      /**< Network unable to process command */
580         CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND_WITHOUT_CAUSE,  /**< Network unable to process command without cause */
581         CALL_VC_ME_CONTROL_PERMANENT_PROBLEM,                                                   /**< Control permanent problem */
582         CALL_VC_ME_CLEAR_DOWN_BEFORE_CONN,                                                      /**< Clear down before connection */
583         CALL_VC_ME_RET_SUCCESS                                                                                  /**< Return success */
584 } call_vc_sat_reponse_type_t;
585
586 #endif                          /*__VC_CORE_ENGINE_TYPES_H_*/