a4989536be74243086c3a341d116ebd6a381b1da
[apps/home/call.git] / call-engine / include / voice-call-engine-msg.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 _VOICE_CALL_ENGINE_MSG_H_
19 #define _VOICE_CALL_ENGINE_MSG_H_
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #include "vc-core-engine-types.h"
26
27 typedef enum _vc_engine_msgid_t  { 
28         /* Tapi Call Related Event Types */ 
29         VC_ENGINE_MSG_INCOM_TO_UI, /**< Incoming call */ 
30         VC_ENGINE_MSG_OUTGOING_TO_UI, /**< Outgoing call. This event will be sent, when outgoing deferred and made after some time */ 
31         VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI, /**< Outgoing call originated */ 
32         VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI_TEST,  /**< Outgoing local test */ 
33         VC_ENGINE_MSG_OUTGOING_ALERT_TO_UI, /**< Outgoing alert call */ 
34         VC_ENGINE_MSG_CONNECTED_TO_UI, /**< Call connected */ 
35         VC_ENGINE_MSG_NORMAL_END_TO_UI, /**< Normal end */ 
36         VC_ENGINE_MSG_INCOM_END_TO_UI, /**< Incoming call end */ 
37         VC_ENGINE_MSG_REJECTED_END_TO_UI, /**< Rejected call end */ 
38         VC_ENGINE_MSG_OUTGOING_END_TO_UI, /**< Outgoing call end */ 
39         VC_ENGINE_MSG_OUTGOING_END_SIGNAL_PLAY_TO_UI, /**< Outgoing call end signal play */ 
40         VC_ENGINE_MSG_OUTGOING_ABORTED_TO_UI, /**< Outgoing call ended before making the call to the NW */ 
41         VC_ENGINE_MSG_DTMF_ACK_TO_UI, /**< DTMF Acknowledgement */ 
42         
43         /*Tapi Call Dependent SS related events */ 
44         VC_ENGINE_MSG_SS_HELD_TO_UI, /**< SS Held */ 
45         VC_ENGINE_MSG_SS_RETREIVED_TO_UI, /**< SS Retriebved */ 
46         VC_ENGINE_MSG_SS_SWAP_TO_UI, /**< SS call swap */ 
47         VC_ENGINE_MSG_SS_SETUP_CONF_TO_UI, /**< SS setup conference */ 
48         VC_ENGINE_MSG_SS_SPLIT_CONF_TO_UI, /**< SS Split conference */ 
49         VC_ENGINE_MSG_SS_TRANSFERRED_TO_UI, /**< SS call transferred */ 
50         VC_ENGINE_MSG_SS_CONNECT_LINE_IND_TO_UI,        /**< SS connectect line indication */
51         
52         /*Tapi Call SS Indication Related Events */ 
53         VC_ENGINE_MSG_IND_FORWARD_TO_UI, /**< Call forward */ 
54         VC_ENGINE_MSG_IND_ACTIVATE_TO_UI, /**< Activate call */ 
55         VC_ENGINE_MSG_IND_HOLD_TO_UI, /**< Hold call */ 
56         VC_ENGINE_MSG_IND_TRANSFER_TO_UI, /**< Call transfer */ 
57         VC_ENGINE_MSG_IND_SETUPCONFERENCE_TO_UI, /**< Setup conference */ 
58         VC_ENGINE_MSG_IND_BARRING_TO_UI, /**< Call barring */ 
59         VC_ENGINE_MSG_IND_WAITING_TO_UI, /**< Call waiting */ 
60         VC_ENGINE_MSG_IND_CUGINFO_TO_UI, /**< Closed User Group information */ 
61         VC_ENGINE_MSG_IND_SSNOTIFY_TO_UI, /**< SS nofify */ 
62         VC_ENGINE_MSG_IND_CALLINGNAMEINFO_TO_UI, /**< Caller name information */ 
63         VC_ENGINE_MSG_IND_REDIRECT_CNF_TO_UI, /**< Redirect confirmation */ 
64         VC_ENGINE_MSG_IND_ACTIVATECCBS_CNF_TO_UI, /**< Activate CCBS confirmation */ 
65         VC_ENGINE_MSG_IND_ACTIVATECCBS_USERINFO_TO_UI, /**< Activate CCBS user information */ 
66         VC_ENGINE_MSG_IND_AOC_TO_UI, /**< AOC indication */ 
67
68         /*Tapi Response Error Related Events */ 
69         VC_ENGINE_MSG_ERROR_OCCURED_TO_UI, /**< Error */ 
70         
71         /* Voicecall Engine triggered Event Type */ 
72         VC_ENGINE_MSG_ACTION_INCOM_FORCE_TO_UI, /**< If any outgoing data needs to be destroyed or cleaned up in the client during an incoming call, this event will be sent */ 
73         VC_ENGINE_MSG_ACTION_SAT_REQUEST_TO_UI, /**< 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 */ 
74         VC_ENGINE_MSG_ACTION_SAT_RESPONSE_TO_UI, /**< SAT Response */ 
75         VC_ENGINE_MSG_ACTION_CALL_END_HELD_RETREIVED_TO_UI, /**< If a held call is being retreived on end of an active call, this event will be emitted */ 
76         VC_ENGINE_MSG_ACTION_NO_ACTIVE_TASK_TO_UI, /**< This event will be published when engine becomes idle after executing/aborting a request from other apps - eg) if SAT request is not processed*/ 
77         VC_ENGINE_MSG_GET_VOLUME_RESP_TO_UI, /**< Response data from tapi for get tapi sound volume (with ringtone vol)*/ 
78         VC_ENGINE_MSG_SET_VOLUME_FROM_BT_TO_UI, /**< volume change form bt headset */ 
79         VC_ENGINE_MSG_HEADSET_STATUS_TO_UI, /**< Headset status to UI */ 
80         VC_ENGINE_MSG_EARJACK_STATUS_TO_UI, /**< Headset status to UI */ 
81         VC_ENGINE_MSG_ACCEPT_CHOICE_BOX_TO_UI, /**< Accept choice box to UI */ 
82         VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, /**< Create Message box */ 
83         VC_ENGINE_MSG_REDIAL_TO_UI, /* To send the redial message to the UI */ 
84         VC_ENGINE_MSG_NOTI_WBAMR_TO_UI, /* WBAMR notification */
85         VC_ENGINE_MSG_MAX_TO_UI 
86 } vc_engine_msgid_t;
87
88 typedef enum _vc_engine_msgbox_string_id_t {
89         IDS_CALL_POP_CALL_IS_DIVERTED,
90         IDS_CALL_POP_CALLFAILED,
91         IDS_CALL_POP_CALLING_EMERG_ONLY,
92         IDS_CALL_POP_CALLNOTCALLOWED,
93         IDS_CALL_POP_CAUSE_WRONG_NUMBER,
94         IDS_CALL_POP_CHANGEOFFLINEMODETOCALL,
95         IDS_CALL_POP_DTMFSENDING_FAIL,
96         IDS_CALL_POP_FDNCALLONLY,
97         IDS_CALL_POP_HOLD_FAILED,
98         IDS_CALL_POP_HOLD_NOT_SUPPORTED,
99         IDS_CALL_POP_INCOMPLETE,
100         IDS_CALL_POP_JOIN_FAILED,
101         IDS_CALL_POP_JOIN_NOT_SUPPORTED,
102         IDS_CALL_POP_OPERATION_REFUSED,
103         IDS_CALL_POP_PHONE_NOT_INITIALISED,
104         IDS_CALL_POP_REJECTED,
105         IDS_CALL_POP_SENDING,
106         IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE,
107         IDS_CALL_POP_SPLIT_FAILED,
108         IDS_CALL_POP_SPLIT_NOT_SUPPORTED,
109         IDS_CALL_POP_SWAP_FAILED,
110         IDS_CALL_POP_SWAP_NOT_SUPPORTED,
111         IDS_CALL_POP_TRANSFER_FAILED,
112         IDS_CALL_POP_TRANSFER_NOT_SUPPORTED,
113         IDS_CALL_POP_UNABLE_TO_RETRIEVE,
114         IDS_CALL_POP_UNAVAILABLE,
115         IDS_CALL_POP_UNHOLD_NOT_SUPPORTED,
116         IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL,
117         IDS_CALL_POP_WAITING_ACTIVE,
118         IDS_CALL_BODY_CALLENDED, 
119         IDS_CALL_POP_INVALID_DTMF,
120         IDS_CALL_POP_DTMF_SENT, 
121         IDS_CALL_MAX 
122 } vc_engine_msgbox_string_id_t;
123
124
125 typedef enum _vc_engine_end_cause_type_t {
126         VC_ENGINE_ENDCAUSE_CALL_ENDED, /**< Call ended */ 
127         VC_ENGINE_ENDCAUSE_CALL_DISCONNECTED, /**< Call disconnected */ 
128         VC_ENGINE_ENDCAUSE_CALL_SERVICE_NOT_ALLOWED, /**< Service not allowed */ 
129         VC_ENGINE_ENDCAUSE_CALL_BARRED, /**< Call barred */ 
130         VC_ENGINE_ENDCAUSE_NO_SERVICE, /**< No Service */ 
131         VC_ENGINE_ENDCAUSE_NW_BUSY, /**< Network busy */ 
132         VC_ENGINE_ENDCAUSE_NW_FAILED, /**< Network failed */ 
133         VC_ENGINE_ENDCAUSE_NO_ANSWER, /**< No anwer from other party */ 
134         VC_ENGINE_ENDCAUSE_NO_CREDIT, /**< No credit available */ 
135         VC_ENGINE_ENDCAUSE_REJECTED, /**< Call rejected */ 
136         VC_ENGINE_ENDCAUSE_USER_BUSY, /**< user busy */ 
137         VC_ENGINE_ENDCAUSE_WRONG_GROUP, /**< Wrong group */ 
138         VC_ENGINE_ENDCAUSE_CALL_NOT_ALLOWED, /**< Call not allowed */ 
139         VC_ENGINE_ENDCAUSE_TAPI_ERROR, /**< Tapi error */ 
140         VC_ENGINE_ENDCAUSE_CALL_FAILED, /**< Call Failed */ 
141         VC_ENGINE_ENDCAUSE_NO_USER_RESPONDING, /**< User not responding */ 
142         VC_ENGINE_ENDCAUSE_USER_ALERTING_NO_ANSWER, /**< User Alerting No Answer */ 
143         VC_ENGINE_ENDCAUSE_SERVICE_TEMP_UNAVAILABLE, /**< Circuit Channel Unavailable,Network is out of Order,Switching equipment congestion,Temporary Failure */ 
144         VC_ENGINE_ENDCAUSE_USER_UNAVAILABLE, /**< Called Party Rejects the Call */ 
145         VC_ENGINE_ENDCAUSE_INVALID_NUMBER_FORMAT, /**< Entered number is invalid or incomplete */ 
146         VC_ENGINE_ENDCAUSE_NUMBER_CHANGED, /**< Entered number has been changed */ 
147         VC_ENGINE_ENDCAUSE_UNASSIGNED_NUMBER, /**< Unassigned/Unallocated number*/ 
148         VC_ENGINE_ENDCAUSE_USER_DOESNOT_RESPOND, /**< Called Party does not respond*/ 
149         VC_ENGINE_ENDCAUSE_IMEI_REJECTED, /**< Called Party does not respond*/ 
150 } vc_engine_end_cause_type_t;
151
152 typedef struct {
153         int len;
154         int msg_id;
155 } vc_engine_msg_hdr_type;
156
157 typedef struct {
158         vc_engine_msg_hdr_type hdr;
159         int call_handle;
160         int contact_index;
161         int phone_type;
162         int brejected;
163         int brestricted;
164         int bpayphone;
165         int bday_remaining_days;
166         char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
167         char call_name[VC_DISPLAY_NAME_LENGTH_MAX];
168         char call_file_path[VC_IMAGE_PATH_LENGTH_MAX];
169         char call_full_file_path[VC_IMAGE_PATH_LENGTH_MAX];
170 } vc_engine_incoming_type;
171
172 typedef struct {
173         vc_engine_msg_hdr_type hdr;
174         int contact_index;
175         int phone_type;
176         int bday_remaining_days;
177         char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
178         char call_name[VC_DISPLAY_NAME_LENGTH_MAX];
179         char call_file_path[VC_IMAGE_PATH_LENGTH_MAX];
180         char call_full_file_path[VC_IMAGE_PATH_LENGTH_MAX];
181 } vc_engine_outgoing_type;
182
183 typedef struct {
184         vc_engine_msg_hdr_type hdr;
185         int call_handle;
186         int end_cause_type;
187 } vc_engine_normal_end_type;
188
189 typedef struct {
190         vc_engine_msg_hdr_type hdr;
191         int call_handle;
192         int bt_status;
193 } vc_engine_connected_type;
194
195 typedef struct {
196         vc_engine_msg_hdr_type hdr;
197         int call_handle;
198         int bemergency;
199 } vc_engine_outgoing_orig_type;
200
201 typedef struct {
202         vc_engine_msg_hdr_type hdr;
203         int call_handle;
204         int end_cause_type;
205         int bauto_redial;
206 } vc_engine_outgoing_end_type;
207
208 typedef struct {
209         vc_engine_msg_hdr_type hdr;
210         int call_handle;
211         int end_cause_type;
212 } vc_engine_outgoing_end_signal_play_type;
213
214 typedef struct {
215         vc_engine_msg_hdr_type hdr;
216         int call_handle;
217         int end_cause_type;
218 } vc_engine_redial_type;
219
220 typedef struct {
221         vc_engine_msg_hdr_type hdr;
222         int call_handle;
223 } vc_engine_common_with_handle_type;
224
225 typedef struct {
226         vc_engine_msg_hdr_type hdr;
227 } vc_engine_common_type;
228
229 typedef struct {
230         vc_engine_msg_hdr_type hdr;
231         int fwd_type;
232 } vc_engine_ind_forward_type;
233
234 typedef struct {
235         vc_engine_msg_hdr_type hdr;
236         int ss_type;
237 } vc_engine_ind_ssnotify_type;
238
239 typedef struct {
240         vc_engine_msg_hdr_type hdr;
241         int error_code;
242 } vc_engine_error_occured_type;
243
244 typedef struct {
245         vc_engine_msg_hdr_type hdr;
246         int vol_alert_type;
247         int vol_level;
248 } vc_engine_vol_resp_type;
249
250 typedef struct {
251         vc_engine_msg_hdr_type hdr;
252         int vol_level;
253 } vc_engine_vol_set_from_bt_type;
254
255 typedef struct {
256         vc_engine_msg_hdr_type hdr;
257         int bstatus;
258 } vc_engine_headset_status_type;
259
260 typedef struct {
261         vc_engine_msg_hdr_type hdr;
262         int bstatus;
263 } vc_engine_earjack_status_type;
264
265 typedef struct {
266         vc_engine_msg_hdr_type hdr;
267         int choice;
268 } vc_engine_accept_choice_box_type;
269
270 typedef struct {
271         vc_engine_msg_hdr_type hdr;
272         int string_id;
273         char diverted_num[VC_PHONE_NUMBER_LENGTH_MAX];
274 } vc_engine_msg_box_type;
275
276 typedef struct {
277         vc_engine_msg_hdr_type hdr;
278         gboolean bstatus;
279         int string_id;
280         char display_string[VC_DISPLAY_NAME_LENGTH_MAX];
281 } vc_engine_dtmf_ack_type;
282
283 typedef struct {
284         vc_engine_msg_hdr_type hdr;
285         int bstatus;
286 } vc_engine_wbamr_status_type;
287
288 typedef union {
289         vc_engine_msg_hdr_type hdr;
290         vc_engine_incoming_type incoming;
291         vc_engine_outgoing_type outgoing;
292         vc_engine_outgoing_orig_type outgoing_orig;
293         vc_engine_common_with_handle_type outgoing_alert;
294         vc_engine_connected_type connected;
295         vc_engine_normal_end_type normal_end;
296         vc_engine_common_with_handle_type incom_end;
297         vc_engine_common_with_handle_type incom_droped;
298         vc_engine_common_with_handle_type rejected_end;
299         vc_engine_outgoing_end_type outgoing_end;
300         vc_engine_outgoing_end_signal_play_type outgoing_end_signal_play;
301         vc_engine_common_with_handle_type outgoing_aborted;
302         vc_engine_common_with_handle_type dtmf_ack;
303         vc_engine_common_with_handle_type auto_redial_check;
304         vc_engine_common_type ss_held;
305         vc_engine_common_type ss_retreived;
306         vc_engine_common_type ss_swap;
307         vc_engine_common_type ss_setup_conf;
308         vc_engine_common_with_handle_type ss_split_conf;
309         vc_engine_common_type ss_transferred;
310         vc_engine_common_type ss_connnect_line_ind;
311         vc_engine_ind_forward_type ss_ind_forward;
312         vc_engine_common_type ss_ind_activate;
313         vc_engine_common_type ss_ind_hold;
314         vc_engine_common_type ss_ind_transfer;
315         vc_engine_common_type ss_ind_setupconference;
316         vc_engine_common_type ss_ind_barring;
317         vc_engine_common_type ss_ind_wating;
318         vc_engine_common_type ss_ind_cuginfo;
319         vc_engine_ind_ssnotify_type ss_ind_ssnotify;
320         vc_engine_common_type ss_ind_callingnameinfo;
321         vc_engine_common_type ss_ind_redirect_cnf;
322         vc_engine_common_type ss_ind_activateccbs_cnf;
323         vc_engine_common_type ss_ind_activatedccbs_userinfo;
324         vc_engine_common_type ss_ind_aoc;
325         vc_engine_error_occured_type error_occured;
326         vc_engine_vol_resp_type vol_resp;
327         vc_engine_vol_set_from_bt_type vol_set_from_bt;
328         vc_engine_headset_status_type headset_status;
329         vc_engine_earjack_status_type earjack_status;
330         vc_engine_accept_choice_box_type accept_choice_box;
331         vc_engine_msg_box_type msg_box;
332         vc_engine_redial_type redial;
333         vc_engine_dtmf_ack_type dtmf_progress;
334         vc_engine_wbamr_status_type wbamr_status;
335 } vc_engine_msg_type;
336
337 typedef enum {
338         VC_CALL_UI_ACCEPT_1,
339         VC_CALL_UI_ACCEPT_2 
340 } voicecal_ui_accept_choice_t;
341
342 typedef struct {
343         int len;
344         int msg_id;
345 } vcui_msg_hdr_type;
346
347 typedef struct {
348         vcui_msg_hdr_type hdr;
349 } vcui_common_type;
350
351 typedef struct {
352         vcui_msg_hdr_type hdr;
353         int call_handle;
354 } vcui_common_with_handle_type;
355
356 typedef struct {
357         vcui_msg_hdr_type hdr;
358         int ans_type;
359 } vcui_accept_with_type;
360
361 typedef struct {
362         vcui_msg_hdr_type hdr;
363         int vol_alert_type;
364 } vcui_vol_get_type;
365
366 typedef struct {
367         vcui_msg_hdr_type hdr;
368         int vol_level;
369 } vcui_tapi_vol_set_type;
370
371 typedef struct {
372         vcui_msg_hdr_type hdr;
373         int vol_level;
374 } vcui_ringtone_vol_set_type;
375
376 typedef struct {
377         vcui_msg_hdr_type hdr;
378         int manual_redial;
379 } vcui_common_with_redial_type;
380
381 typedef struct {
382         vcui_msg_hdr_type hdr;
383         char dtmf_number[2];
384 } vcui_dtmf_type;
385
386 typedef union {
387         vcui_msg_hdr_type hdr;
388         vcui_common_type accept;
389         vcui_accept_with_type accept_with_type;
390         vcui_common_type reject;
391         vcui_common_type reject_with_msg;
392         vcui_common_type end;
393         vcui_common_with_handle_type end_with_handle;
394         vcui_common_type end_all_calls;
395         vcui_common_type end_active_calls;
396         vcui_common_type end_held_calls;
397         vcui_common_type hold;
398         vcui_common_type unhold;
399         vcui_common_type swap;
400         vcui_common_type join;
401         vcui_common_with_handle_type split;
402         vcui_common_type transfer;
403         vcui_common_type spkon;
404         vcui_common_type spkoff;
405         vcui_common_type muteon;
406         vcui_common_type muteoff;
407         vcui_vol_get_type vol_get;
408         vcui_tapi_vol_set_type tapi_vol_set;
409         vcui_ringtone_vol_set_type ringtone_vol_set;
410         vcui_common_type headset_on;
411         vcui_common_type headset_off;
412         vcui_common_with_redial_type redial_type;
413         vcui_common_type redial_stop;
414         vcui_dtmf_type dtmf;
415 } vcui_msg_type;
416 #ifdef __cplusplus
417 }
418 #endif
419
420 #endif
421