33aff01905ca6ae75b076d40b743a289393c59a1
[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         /*VC_ENDCAUSE_SWITCHING_EQUIPMENT_CONGESTION,     /**<  Switching Equipment Congestion       : 20090627 match as NW_BUSY*/
150 } voice_call_end_cause_type_t;
151
152 /**
153 * This enumeration defines the call types used to end the calls in end call API
154 */
155 typedef enum {
156         VC_END_OUTGOING_CALL,                   /**< To end only mobile originated outgoing call*/
157         VC_END_INCOMING_CALL,                           /**< To end only mobile terminated incoming call*/
158         VC_END_ACTIVE_OR_HELD_CALLS,            /**< To end first active call if available or to end end held call*/
159         VC_END_ALL_ACTIVE_CALLS,                        /**< To end all available active calls*/
160         VC_END_ALL_HELD_CALLS,                  /**< To end all available held calls*/
161         VC_END_ALL_CALLS                                        /**< To end all available calls(active,held,incoming/outgoing*/
162 } _vc_core_engine_end_call_type_t;
163
164 /**
165 * This enumeration defines flags to be used with _vc_core_engine_status_set_end_flag
166 */
167 typedef enum {
168         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*/
169 } voicecall_end_flag_t;
170
171 /**
172  * This enum defines the different call types by source of origination of call
173  */
174 typedef enum {
175         VC_CALL_ORIG_TYPE_NORMAL,                                               /**< Normal Call */
176         VC_CALL_ORIG_TYPE_EMERGENCY,                                            /**< Emergency Call*/
177         VC_CALL_ORIG_TYPE_VOICEMAIL,                                            /**< Voiece Mail Call*/
178         VC_CALL_ORIG_TYPE_SAT,                                                  /**< SAT Requested Call*/
179         VC_CALL_ORIG_TYPE_NOSIM,                                                        /**< Emergency Call with out SIM*/
180         VC_CALL_ORIG_TYPE_PINLOCK                                               /**< Emergency Call with Pin Lock*/
181 } voicecall_call_orig_type_t;
182
183 /**
184  * This enum defines the different call types to be used with the assiociated APIs
185  */
186 typedef enum {
187         VC_INCOMING_CALL,                       /**< Mobile Terminated Call*/
188         VC_OUTGOING_CALL,                       /**< Mobile Originated Call*/
189         VC_CONNECTED_CALL                       /**< Connected Call (Both Parties Connected)*/
190 } voicecall_call_type_t;
191
192 /**
193 * This enum defines the type of calls being termed once the calls are connected
194 */
195 typedef enum {
196         VC_ACTIVE_CALL,         /**< Connected calls in active state*/
197         VC_HELD_CALL                    /**< Connected calls in held state*/
198 } voicecall_connected_call_type_t;
199
200 /**
201  * This enum defines alternate line service types
202  */
203 typedef enum {
204         VC_CALL_CPHS_ALS_NONE,                                          /**< No ALS */
205         VC_CALL_CPHS_ALS_LINE1,                                         /**< Line 1*/
206         VC_CALL_CPHS_ALS_LINE2                                          /**< Line 2 */
207 } voice_call_cphs_alsline_t;
208
209 /**
210  * This enum defines the call group states
211  */
212 typedef enum {
213         CALL_VC_GROUP_STATE_NONE,                                       /**< Group State Not Exist */
214         CALL_VC_GROUP_STATE_ACTIVE,                                     /**< Active group state */
215         CALL_VC_GROUP_STATE_HOLD                                        /**< Hold group state */
216 } call_vc_groupstate_t;
217
218 /**
219  * This enum defines the mobile originated call states
220  */
221 typedef enum {
222         VC_MOCALL_STATE_NONE,                                           /**< MO State Not Exist */
223         VC_MOCALL_STATE_END,                                                    /**< MO State End */
224         VC_MOCALL_STATE_CANCEL,                                         /**< MO State Cancel */
225         VC_MOCALL_STATE_DESTROY                                         /**< MO State Destroy */
226 } voice_call_mocall_state_t;
227
228 #ifdef _CALL_LONG_DTMF
229 /**
230  * This enum defines dtmf buffer states
231  */
232 typedef enum {
233         CALL_VC_DTMF_BUF_NONE,                                  /**< Buffer state Not Exist */
234         CALL_VC_DTMF_BUF_START,                                 /**< Buffer start */
235         CALL_VC_DTMF_BUF_RECEIVED_START_ACK,    /**< Reveived start acknowledgement */
236         CALL_VC_DTMF_BUF_WAIT_STOP_ACK                  /**< Wait stop acknowledgement */
237 } call_vc_dtmf_bufferstate_t;
238 #endif
239
240 /**
241 * This enum defines vc engine sat mo call ctrl response type
242 */
243 typedef enum __voicecall_engine_sat_mo_call_ctrl_res {
244         CALL_ALLOWED_NO_MOD,                                            /**< Call Allowed without any modification in the caller details */
245         CALL_NOT_ALLOWED,                                                       /**< Call Not Allowed - (User should be notified) */
246         CALL_ALLOWED_WITH_MOD,                                  /**< Call Allowed with modification in the caller details- (UI should be updated) */
247         CALL_CHANGED_TO_SS                                              /**< Call number modified to SS String */
248 } voicecall_engine_sat_mo_call_ctrl_res;
249
250 /**
251  * This enum defines sat request response types
252  */
253 typedef enum __voicecall_engine_sat_rqst_resp_type {
254         SAT_RQST_SETUP_CALL,                                            /**< Sat setup call request */
255         SAT_RQST_SEND_DTMF,                                             /**< Sat send dtmf request */
256         SAT_RESP_SETUP_CALL                                             /**< Sat setup call response */
257 } voicecall_engine_sat_rqst_resp_type;
258
259 /**
260  * This enum defines voicecall engine callback event types
261  */
262 typedef enum _voicecall_engine_event_t {
263         /* Tapi Call Related Event Types */
264         VC_CALL_INCOM,                                                          /**< Incoming call */
265         VC_CALL_OUTGOING,                                                       /**< Outgoing call. This event will be sent, when outgoing deferred and made after some time */
266         VC_CALL_OUTGOING_ORIG,                                  /**< Outgoing call originated */
267         VC_CALL_OUTGOING_ALERT,                                 /**< Outgoing alert call */
268         VC_CALL_CONNECTED,                                              /**< Call connected */
269         VC_CALL_NORMAL_END,                                             /**< Normal end */
270         VC_CALL_INCOM_END,                                              /**< Incoming call end */
271         VC_CALL_INCOM_DROPPED,                                  /**< Incoming call ended before it is being precessed by the engine */
272         VC_CALL_REJECTED_END,                                           /**< Rejected call end */
273         VC_CALL_OUTGOING_END,                                   /**< Outgoing call end */
274         VC_CALL_OUTGOING_ABORTED,                               /**< Outgoing call ended before making the call to the NW */
275         VC_CALL_DTMF_ACK,                                                       /**< DTMF Acknowledgement */
276         VC_CALL_AUTO_REDIAL_CHECK,                              /**< Auto Redial Check */
277         VC_CALL_ANSWER_CNF,                                             /**< Answer confirm */
278
279         /*Tapi Call Dependent SS related events */
280         VC_CALL_SS_HELD,                                                        /**< SS Held */
281         VC_CALL_SS_RETREIVED,                                           /**< SS Retriebved */
282         VC_CALL_SS_SWAP,                                                        /**< SS call swap */
283         VC_CALL_SS_SETUP_CONF,                                  /**< SS setup conference */
284         VC_CALL_SS_SPLIT_CONF,                                  /**< SS Split conference */
285         VC_CALL_SS_TRANSFERRED,                                 /**< SS call transferred */
286         VC_CALL_SS_CONNECT_LINE_IND,                            /**< SS connectect line indication */
287
288         /*Tapi Call SS Indication Related Events */
289         VC_CALL_IND_FORWARD,                                            /**< Call forward */
290         VC_CALL_IND_ACTIVATE,                                           /**< Activate call */
291         VC_CALL_IND_HOLD,                                                       /**< Hold call */
292         VC_CALL_IND_TRANSFER,                                           /**< Call transfer */
293         VC_CALL_IND_SETUPCONFERENCE,                            /**< Setup conference */
294         VC_CALL_IND_BARRING,                                            /**< Call barring */
295         VC_CALL_IND_WAITING,                                            /**< Call waiting */
296         VC_CALL_IND_CUGINFO,                                            /**< Closed User Group information */
297         VC_CALL_IND_SSNOTIFY,                                           /**< SS nofify */
298         VC_CALL_IND_CALLINGNAMEINFO,                            /**< Caller name information */
299         VC_CALL_IND_REDIRECT_CNF,                                       /**< Redirect confirmation */
300         VC_CALL_IND_ACTIVATECCBS_CNF,                   /**< Activate CCBS confirmation */
301         VC_CALL_IND_ACTIVATECCBS_USERINFO,              /**< Activate CCBS user information */
302         VC_CALL_IND_AOC,                                                        /**< AOC indication */
303
304         /*Tapi Response Error Related Events */
305         VC_ERROR_OCCURED,                                                       /**< Error */
306
307         /* Voicecall Engine triggered Event Type */
308         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 */
309         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 */
310         VC_ACTION_SAT_RESPONSE, /**< SAT Response */
311         VC_ACTION_CALL_END_HELD_RETREIVED,      /**< If a held call is being retreived on end of an active call, this event will be emitted */
312         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*/
313
314         VC_CALL_GET_VOLUME_RESP,                        /**< Response data from tapi for get tapi sound volume*/
315         VC_ENGINE_EVENT_MAX
316 } voicecall_engine_event_t;
317
318 /**
319  * This enum defines call forwarding indication types
320  */
321 typedef enum _voicecall_forward_ind_type_t {
322         VC_FRWD_IND_INCOM_IS_FRWD,                                      /**< Is incoming call a forwarded call? */
323         VC_FRWD_IND_INCOM_FRWD,                                         /**< Incoming call Forwarded */
324         VC_FRWD_IND_OUTGOING_FRWD                                       /**< Outgoing call Forwarded */
325 } voicecall_forward_ind_type_t;
326
327 /**
328  * This enum defines call barring indication types
329  */
330 typedef enum _voicecall_barr_ind_type_t {
331         VC_BARR_IND_NONE,                                                               /**< No call barring indication */
332         VC_BARR_IND_ALL,                                                                /**< Barring all outgoing and incoming calls */
333         VC_BARR_IND_BAOC,                                                               /**< Bar All Outgoing Calls indication */
334         VC_BARR_IND_BOIC,                                                               /**< Bar Outgoing International Calls indication */
335         VC_BARR_IND_BOIC_EXHC,                                          /**< Bar Outgoing International Calls EXcept Home Calls indication */
336         VC_BARR_IND_BAIC,                                                               /**< Bar All Incoming Calls indication */
337         VC_BARR_IND_BICROAM                                                     /**< Bar Incoming Calls when ROAMing indication */
338 } voicecall_barr_ind_type_t;
339
340 /**
341  * This enum defines supplementary services notificatoin indication types
342  */
343 typedef enum _voicecall_ssnotify_ind_type_t {
344         VC_SSNOTIFY_IND_CFU,                                                    /**<  SS CFU indication */
345         VC_SSNOTIFY_IND_CFB,                                                    /**<  SS CFB indication */
346         VC_SSNOTIFY_IND_CFNRY,                                          /**<  SS CFNRY indication */
347         VC_SSNOTIFY_IND_CFNRC,                                          /**<  SS CFNRC indication */
348         VC_SSNOTIFY_IND_CLIR,                                                   /**<  SS CLIR indication */
349         VC_SSNOTIFY_IND_ALL_COND_FORWARDING,            /**<  SS all condtional call forwarding indication */
350         VC_SSNOTIFY_IND_BARRING_OF_OUTGOING             /**<  SS Outging call baring indication */
351 } voicecall_ssnotify_ind_type_t;
352
353 /**
354  * This enum defines engine/ Input Output sate of call agent
355  */
356 typedef enum {
357         VC_INOUT_STATE_NONE,                                                                    /**<  I/O state none */
358         VC_INOUT_STATE_OUTGOING_START,                                          /**< Outgoing enum value start */
359         VC_INOUT_STATE_OUTGOING_WAIT_HOLD,                                      /**< Outgoing wait for hold */
360         VC_INOUT_STATE_OUTGOING_WAIT_ORIG,                                      /**< Outgoing wait for Origination event */
361         VC_INOUT_STATE_OUTGOING_WAIT_ALERT,                                     /**< Outgoing wait alert */
362         VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED,                         /**< Outgoing wait connected */
363         VC_INOUT_STATE_OUTGOING_WAIT_RELEASE,                           /**< Outgoing wait release */
364         VC_INOUT_STATE_OUTGOING_ABORTED,                                                /**< Outgoing call aborted */
365         VC_INOUT_STATE_OUTGOING_SHOW_REDIALCAUSE,                       /**< Outgoing show redial cause */
366         VC_INOUT_STATE_OUTGOING_WAIT_REDIAL,                                    /**< Outgoing wait redial */
367         VC_INOUT_STATE_OUTGOING_SHOW_RETRY_CALLBOX,                     /**< Outgoing showing retry call box : not used*/
368         VC_INOUT_STATE_OUTGOING_END,                                                    /**< Outgoing enum value end */
369
370         VC_INOUT_STATE_INCOME_SELFEVET_WAIT,    /**< Incoming waiting for self event : not used*/
371         VC_INOUT_STATE_INCOME_START,                                                    /**< Incoming enumvalue start */
372         VC_INOUT_STATE_INCOME_BOX,                                                              /**< Incoming box */
373         VC_INOUT_STATE_INCOME_WAIT_REDIRECTCNF, /**< Incoming wait for redirect confirmation : not used*/
374         VC_INOUT_STATE_INCOME_WAIT_REDIRECT_END,        /**< Incoming wait for redirect end : not used*/
375         VC_INOUT_STATE_INCOME_WAIT_CONNECTED,                           /**< Incoming wait connected */
376         VC_INOUT_STATE_INCOME_WAIT_HOLD_CONNECTED,                      /**< Incoming wait for hold and then connected event */
377         VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVE_CONNECTED, /**< Incoming wait for release and then connected event */
378         VC_INOUT_STATE_INCOME_WAIT_HOLD,        /**< Incoming wait hold : not used*/
379         VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVECALL,          /**< Incoming wait release active call */
380         VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL,            /**< Incoming wait release hold call */
381 #ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
382         VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL_FOR_ALL_RELEASE,    /**< Incoming wait release hold call in case of release all and accept */
383 #endif
384         VC_INOUT_STATE_INCOME_WAIT_RELEASE,                                     /**< Incoming wait release call */
385         VC_INOUT_STATE_INCOME_END,                                                      /**< Incoming enum value end */
386         VC_INOUT_STATE_MAX_NUM                                                          /**< Max value */
387 } voicecall_inout_state_t;
388
389 /**
390  * This enum defines call answer types
391  */
392 typedef enum _voicecall_answer_type_t {
393         VC_ANSWER_NORMAL,                                               /**< Accepts the call in normal scenario(Only CONNECTED will be sent to the client) */
394         VC_ANSWER_HOLD_ACTIVE_AND_ACCEPT,               /**< Puts the active call on hold and accepts the call (Only CONNECTED will be sent to client) */
395         VC_ANSWER_RELEASE_ACTIVE_AND_ACCEPT,    /**< Releases the active call and accept the call (END and CONNECTED will be sent to Client) */
396         VC_ANSWER_RELEASE_HOLD_AND_ACCEPT,      /**< Releases the active call and accept the call (END and  CONNECTED will be sent to client) */
397 #ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
398         VC_ANSWER_RELEASE_ALL_AND_ACCEPT                /**< Releases the all calls and accept the call (END and  CONNECTED will be sent to client) */
399 #endif
400 } voicecall_answer_type_t;
401
402 /**
403  * This enum defines the cphs csp status names
404  */
405 typedef enum _voicecall_cphs_csp_service {
406         /**< CPHS Teleservice*/
407         VC_CPHS_CSP_ALS,                /**<Alternate Line Service*/
408
409         /**< Call completion service*/
410         VC_CPHS_CSP_HOLD,               /**<Call Hold*/
411         VC_CPHS_CSP_CW,         /**<Call Waiting*/
412         VC_CPHS_CSP_CBS,                /**<Completion of Call to Busy Subscribe*/
413         VC_CPHS_CSP_UUS,                /**<User User Signalling*/
414
415         /**< Call Offering Service*/
416         VC_CPHS_CSP_CFU,                /**<Call Forwarding Unconditional*/
417         VC_CPHS_CSP_CFB,                /**<Call Forwarding On User Busy*/
418         VC_CPHS_CSP_CFNRY,      /**<Call Forwarding on No Reply*/
419         VC_CPHS_CSP_CFNRC,      /**<Call Forwarding On User Not Reachable*/
420         VC_CPHS_CSP_CT,         /**<Call Transfer*/
421
422         /**< Other Supplementary Service*/
423         VC_CPHS_CSP_MPTY,               /**<Multi-Party Service*/
424         VC_CPHS_CSP_CUG,                /**<Closed User Group*/
425         VC_CPHS_CSP_AOC,                /**<Advice Of Charge*/
426         VC_CPHS_CSP_PREFCUG,    /**<Preferential CUG*/
427         VC_CPHS_CSP_CUGOA       /**<CUG Outgoing Access*/
428 } voicecall_cphs_csp_service;
429
430 /**
431  * This enum defines audio path values to be used when setting the voicecall audio path
432  */
433 typedef enum __voicecall_audio_path_t {
434         VC_AUDIO_PATH_HANDSET,                  /**<Handset normal receiver*/
435         VC_AUDIO_PATH_HEADSET,                  /**<Headset Attached*/
436         VC_AUDIO_PATH_HANDSFREE,                /**<Handsfree Attached*/
437         VC_AUDIO_PATH_BLUETOOTH,                /**<Bluetooth headset Attached*/
438         VC_AUDIO_PATH_STEREO_BLUETOOTH, /**<Bluetooth Stero headset Attached*/
439         VC_AUDIO_PATH_SPK_PHONE,                /**<Handset Speaker Phone receiver*/
440         VC_AUDIO_PATH_HEADSET_3_5PI             /**<Headset */
441 } voicecall_audio_path_t;
442
443 /**
444  * This enum defines volume level to be used when setting the voicecall volume
445  */
446 typedef enum __voicecall_audio_volume_t {
447         VC_AUDIO_VOLUME_LEVEL_0,
448         VC_AUDIO_VOLUME_LEVEL_1,
449         VC_AUDIO_VOLUME_LEVEL_2,
450         VC_AUDIO_VOLUME_LEVEL_3,
451         VC_AUDIO_VOLUME_LEVEL_4,
452         VC_AUDIO_VOLUME_LEVEL_5,
453         VC_AUDIO_VOLUME_LEVEL_6,
454         VC_AUDIO_VOLUME_LEVEL_7,
455         VC_AUDIO_VOLUME_LEVEL_8,
456         VC_AUDIO_VOLUME_LEVEL_9
457 } voicecall_audio_volume_t;
458
459 /**
460 * Closed User Group Details
461 */
462 typedef struct __voicecall_cug_info_t {
463         gboolean bcug_used;                             /**<TRUE -if CUG information used ,FALSE otherwise */
464         int cug_index;                                  /**< CUG Index Value */
465         gboolean bpref_cug;                             /**<TRUE-if preferential CUG capablity available, FALSE otherwise */
466         gboolean boa_cug;                               /**<TRUE -if Outgoing Access capablity available, FALSE otherwise */
467 } voicecall_cug_info_t;
468
469 /**
470  * This struct provides a structure for call setup info data.
471  */
472 typedef struct _voicecall_setup_info_t {
473         voicecall_call_type_bysetup_t call_setup_by;                                                    /**<defines source of the call setup*/
474         voicecall_call_orig_type_t call_type;                                                                                   /**<  Call type */
475         char source_tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                     /**<  Telephone number */
476         char tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                    /**<  Telephone number */
477         int mo_call_index;                                                                                                                      /**< Outgoing call index */
478         voicecall_cug_info_t cug_info;                                                                                          /**< CUG Details */
479         int identity_mode;                                                                                                              /**< Identity mode, 0 - default, 1-show, 2-hide */
480         int ecc_category;                                                                                                               /**< ecc category*/
481 } voicecall_setup_info_t;
482
483 /**
484  * This enumeration defines name mode to be verified dueing an incoming call
485  */
486 typedef enum {
487         CALL_VC_NAME_MODE_UNAVAILABLE = 0x00,   /**<  Caller Name Unavailable*/
488         CALL_VC_NAME_MODE_REJECT = 0x01,                /**<  Caller Name Rejected by the caller*/
489         CALL_VC_NAME_MODE_INTERACTION = 0x02,   /**<  Caller Name Unavailable*/
490         CALL_VC_NAME_MODE_PAYPHONE = 0x03,              /**<  Caller using Payphone*/
491         CALL_VC_NAME_MODE_MAX
492 } call_vc_name_mode_t;
493
494 /**
495  * This enumeration defines calling name mode to be verified dueing an incoming call
496  */
497 typedef enum {
498         CALL_VC_CALLING_NAME_MODE_AVAILABLE,    /**<  Calling Name Unavailable*/
499         CALL_VC_CALLING_NAME_MODE_RESTRICTED,           /**<  Calling Name restricted by the caller*/
500         CALL_VC_CALLING_NAME_MODE_UNAVAILABLE,  /**<  Calling Name Unavailable*/
501         CALL_VC_CALLING_NAME_MODE_AVAILABLE_RESTRICTED,         /**<  Calling name is available but restricted*/
502         CALL_VC_CALLING_NAME_MODE_MAX
503 } call_vc_calling_name_mode_t;
504
505 /**
506  * This structure defines the members of call object
507  */
508 typedef struct _call_vc_call_objectinfo_t {
509         /*Fields from TAPI */
510         int call_handle;                                                                                                                                /**< Call Handle */
511         float aoc_ccm;                                                                                                                                  /**< AOC Current Call Meter */
512         char aoc_currency[VC_AOC_CURRENCY_CODE_LEN_MAX + 1];                                            /**< AOC Currency Code */
513 #ifdef _CPHS_DEFINED_
514         voice_call_cphs_alsline_t als_type;                                                                                     /**< Alternate Line Service Type */
515 #endif
516
517         /*Engine Fields */
518         int call_id;                                                                                                                                    /**< Call ID */
519
520         /* Call Object Status Flags */
521         gboolean bemergency_number;                                                                                                     /**< emergency call? */
522         gboolean bused_sim;                                                                                                                             /**< used sim? */
523         gboolean mo;                                                                                                                            /**< Mobile originated call? */
524         gboolean bccbs_call;                                                                                                                    /**< CCBS call? */
525         gboolean brestricted_namemode;                                                                                          /**< Name mode Restricted? */
526         call_vc_name_mode_t name_mode;                                                                                  /**< Name mode when BDC number doesn't exist */
527         call_vc_calling_name_mode_t bcalling_namemode;                                                  /**< Name mode of calling name information */
528
529         /*Caller Details */
530 /*PDIAL_SEND_DTMF*/
531         char source_tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                             /**< Source Telephone number */
532 /*PDIAL_SEND_DTMF*/
533         char tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                            /**< Telephone number */
534         char calling_name[VC_PHONE_NAME_LENGTH_MAX];                                            /**< Calling part name */
535         char dtmf_number[VC_PHONE_NUMBER_LENGTH_MAX];                                           /**< DTMF number */
536         char connected_telnumber[VC_PHONE_NUMBER_LENGTH_MAX];                                   /**< Changed number to be connected by call forwarding */
537         char connected_name[VC_PHONE_NUMBER_LENGTH_MAX];                                        /**< Changed name to be connected by call forwarding  */
538
539         /*Call State Flags */
540         voice_call_end_cause_type_t end_cause_type;                                                     /**< End cause type */
541         voicecall_call_state_t state;                                                                                                   /**< Call State */
542         voicecall_call_orig_type_t call_type;                                                                                           /**< Call Type */
543
544         /*CUG Flags */
545         voicecall_cug_info_t cug_info;                                                                                          /**< Closed User Group Details */
546
547         /*Idendity Mode */
548         int identity_mode;                                                                                                              /**< Show My Number Mode, 0-Default,1-Show, 2- Hide */
549         gboolean bincoming_call_is_fwded;
550
551         int ecc_category;                                                                                               /**< emergency category(see the TelSimEccEmergencyServiceInfo_t or TelCallEmergencyCategory_t)*/
552 } call_vc_call_objectinfo_t;
553
554 /**
555  * Structure for SAT call info
556  */
557 typedef struct {
558         char disp_text[VC_PHONE_NUMBER_LENGTH_MAX];                                                             /**< Display text */
559         char call_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                           /**< Call NUmber */
560         unsigned int duration;                                                                                                          /**< Duration of call */
561         int sat_mo_call_ctrl_res;
562         gboolean bicon_present;
563         gboolean bsat_hidden;
564 } voicecall_sat_callinfo_t;
565
566 /**
567  * Structure to hold the SAT Icon Details
568  */
569 typedef struct {
570         int width;                                      /**< Width of the SAT icon being held by the engine */
571         int height;                                     /**< Height of the SAT icon being held by the engine */
572         guchar *psat_icon_data;         /**< SAT icon Raw Data */
573 } voicecall_sat_call_icon_data_t;
574
575 /**
576  * This enumeration defines SAT reponse types
577  */
578 typedef enum {
579         CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND,                                           /**< Unable to process command */
580         CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND,                                      /**< Network unable to process command */
581         CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND_WITHOUT_CAUSE,  /**< Network unable to process command without cause */
582         CALL_VC_ME_CONTROL_PERMANENT_PROBLEM,                                                   /**< Control permanent problem */
583         CALL_VC_ME_CLEAR_DOWN_BEFORE_CONN,                                                      /**< Clear down before connection */
584         CALL_VC_ME_RET_SUCCESS                                                                                  /**< Return success */
585 } call_vc_sat_reponse_type_t;
586
587 #endif                          /*__VC_CORE_ENGINE_TYPES_H_*/