apply FSL(Flora Software License)
[apps/home/call.git] / ui / vcui-engine-interface.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_UI_IPC_
19 #define _VOICE_CALL_UI_IPC_
20
21 #include "voice-call-engine.h"
22
23 typedef enum _vcui_snd_path_type_t{
24         VCUI_SND_PATH_NONE,
25         VCUI_SND_PATH_HEADSET,
26         VCUI_SND_PATH_EARJACK,
27         VCUI_SND_PATH_SPEAKER,
28         VCUI_SND_PATH_MAX,
29 }vcui_snd_path_type_t;
30
31 typedef enum _vcui_call_type_t {
32         VCUI_CALL_TYPE_MO,
33         VCUI_CALL_TYPE_MT,
34         VCUI_CALL_TYPE_ECC,
35         VCUI_CALL_TYPE_ECC_TEST,
36         VCUI_CALL_TYPE_DOWNLOAD_CALL,
37         VCUI_CALL_TYPE_SAT,
38         VCUI_CALL_TYPE_MAX
39 } vcui_call_type_t;
40
41 typedef struct _vcui_call_mo_data_t {
42         char call_number[VC_PHONE_NUMBER_LENGTH_MAX];
43         int ct_index;
44 } vcui_call_mo_data_t;
45
46 typedef struct _vcui_call_mt_data_t {
47         int call_handle;
48         int call_type;
49         int cli_presentation_indicator;
50         char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
51         int calling_name_mode;
52         char calling_name[VC_PHONE_NAME_LENGTH_MAX];
53         char redirected_number[VC_PHONE_NUMBER_LENGTH_MAX];
54         char redirected_sub_address[VC_PHONE_SUBADDRESS_LENGTH_MAX];
55         int cli_cause;
56         int bfwded;
57         int active_line;
58 } vcui_call_mt_data_t;
59
60 typedef struct _vcui_call_ecc_data_t {
61         char call_number[VC_PHONE_NUMBER_LENGTH_MAX];
62 } vcui_call_ecc_data_t;
63
64 typedef struct _vcui_call_sat_data_t {
65         int command_id;                                                         /**<Proactive Command Number sent by USIM*/
66         int command_qualifier;                                          /**<call type*/
67         char disp_text[500 + 1];                                        /**<character data*/
68         char call_num[VC_PHONE_NUMBER_LENGTH_MAX];;     /**<call number*/
69         unsigned int duration;                                          /**<maximum repeat duration*/
70 } vcui_call_sat_data_t;
71
72 typedef enum _vcui_vol_type_t {
73         VCUI_VOL_RING,
74         VCUI_VOL_VOICE,
75         VCUI_VOL_HEADSET,
76         VCUI_VOL_MAX
77 } vcui_vol_type_t;
78
79 typedef enum _vcui_rec_result_t {
80         VCUI_REC_RESULT_SUCCESS,
81         VCUI_REC_RESULT_NOT_ENOUGH_MEMORY,
82         VCUI_REC_RESULT_NO_CONNECTED_CALL,
83         VCUI_REC_RESULT_MAX
84 } vcui_rec_result_t;
85
86 /**
87 * This enumeration defines names of the on call audio status
88 */
89 typedef enum _vcui_audio_type_t {
90         VCUI_AUDIO_NONE,                                /**< none*/
91         VCUI_AUDIO_SPEAKER,                     /**< System LoudSpeaker Audio */
92         VCUI_AUDIO_RECEIVER,            /**< System Receiver Audio */
93         VCUI_AUDIO_HEADSET,                     /**< System Headset Audio */
94         VCUI_AUDIO_EARJACK,                     /**< System Earjack Audio */
95         VCUI_AUDIO_MAX,
96 } vcui_audio_type_t;
97
98 void _vcui_engine_init(vcui_app_call_data_t *ad);
99 void _vcui_engine_answer_call(void);
100 void _vcui_engine_answer_call_by_type(int type);
101 void _vcui_engine_cancel_call(void);
102 void _vcui_engine_reject_call(void);
103 void _vcui_engine_stop_alert(void);
104 void _vcui_engine_end_call(void);
105 void _vcui_engine_end_call_by_handle(int handle);
106 void _vcui_engine_end_all_call(void);
107 void _vcui_engine_end_active_calls(void);
108 void _vcui_engine_end_held_calls(void);
109 void _vcui_engine_hold_unhold_swap_call(void);
110 void _vcui_engine_join_call(void);
111 void _vcui_engine_split_call(int call_handle);
112 void _vcui_engine_transfer_call(void);
113 void _vcui_engine_speaker_on_off(int bLoundSpeaker);
114 void _vcui_engine_mute_on_off(int bMute);
115 void _vcui_engine_set_volume_level(vcui_vol_type_t vol_type, int level);
116 int _vcui_engine_get_volume_level(vcui_vol_type_t vol_type);
117 void _vcui_engine_change_sound_path(vcui_audio_type_t sound_path);
118 vcui_audio_type_t _vcui_engine_get_sound_path(void);
119
120 void _vcui_engine_interface_process_auto_redial(int bRedial);
121 void _vcui_engine_interface_process_voice_record(int bRecord);
122 void _vcui_engine_interface_process_mute_alert(void);
123 void _vcui_engine_interface_send_dtmf_number(char data);
124 void _vcui_engine_interface_process_mo_call(vcui_call_type_t call_type, vcui_call_mo_data_t *data);
125 void _vcui_engine_interface_process_mt_call(vcui_call_type_t call_type, vcui_call_mt_data_t *data);
126 void _vcui_engine_interface_process_ecc_call(vcui_call_type_t call_type, vcui_call_ecc_data_t *data);
127 void _vcui_engine_interface_process_sat_call(vcui_call_type_t call_type, vcui_call_sat_data_t *data);
128
129 // Add callback function to handle voicecall-engine library events
130 void _vcui_engine_callback(int event, void *pdata, void *puser_data);
131
132 #endif