Make TIZEN 2.0
[apps/home/call.git] / call-engine / core / include / vc-core-engine-status.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_STATUS_H_
19 #define __VC_CORE_ENGINE_STATUS_H_
20
21 #include "vc-core-engine-types.h"
22 #include "vc-core-error.h"
23
24 /**
25 * This function checks whether the given incoming call is a restricted call or not
26 *
27 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
28 * @param[in]    pvoicecall_agent        Handle to voicecall engine
29 * @param[in]    call_handle             Call handle of the call to be checked
30 * @param[out]   pbrestricted            Pointer to the restricted name mode
31 * @remarks              pvoicecall_agent and prestricted cannot be NULL.
32 *                               This API shall only be used with the incoming call handle before it is connected
33 */
34 voicecall_error_t _vc_core_engine_status_isrestricted_call(voicecall_engine_t *pvoicecall_agent, int call_handle, gboolean *pbrestricted);
35
36 /**
37 * This function retrieves the call object belongs to the given call handle
38 *
39 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
40 * @param[in]    pvoicecall_agent        Handle to voicecall engine
41 * @param[in]    call_handle     Call handle of the call for which the call object is retrieved
42 * @param[out]   pcall_object    Pointer to the retrived call object info
43 * @remarks              pvoicecall_agent and pcall_object cannot be NULL.
44 */
45 voicecall_error_t _vc_core_engine_status_get_call_object(voicecall_engine_t *pvoicecall_agent, int call_handle, call_vc_call_objectinfo_t *pcall_object);
46
47 /**
48 * This function retrieves the inout state of the engine
49 *
50 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
51 * @param[in]    pvoicecall_agent        Handle to voicecall engine
52 * @param[out]   pio_state                       Contains the Engine InOut state on return
53 * @remarks              pvoicecall_agent and pio_state cannot be NULL.
54 * @see                  _vc_core_engine_change_engine_iostate
55 */
56 voicecall_error_t _vc_core_engine_status_get_engine_iostate(voicecall_engine_t *pvoicecall_agent, int *pio_state);
57
58 /**
59 * This function checks whether connected call exists or not
60 *
61 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
62 * @param[in]    pvoicecall_agent        Handle to voicecall engine
63 * @param[in]    call_type                       call type
64 * @param[out]   bcall_exists            TRUE - if call exists of given given type, FALSE otherwise
65 * @remarks              pvoicecall_agent and bcall_exists cannot be NULL.
66 */
67 voicecall_error_t _vc_core_engine_status_isexists_call_bytype(voicecall_engine_t *pvoicecall_agent, voicecall_call_type_t call_type, gboolean *bcall_exists);
68
69 /**
70 * This function retrieves the total number of call members available with the engine
71 *
72 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
73 * @param[in]    pvoicecall_agent                Handle to voicecall engine
74 * @param[out]   ptotal_call_member      Contains the total call member availalbe in engine on return
75 * @remarks              pvoicecall_agent and ptotal_call_member cannot be NULL
76 */
77 voicecall_error_t _vc_core_engine_status_get_call_member_count(voicecall_engine_t *pvoicecall_agent, int *ptotal_call_member);
78
79 /**
80 * This function retrieves the total number of call members with the given connected call type
81 *
82 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
83 * @param[in]    pvoicecall_agent                Handle to voicecall engine
84 * @param[in]    connected_call_type     connected call type
85 * @param[out]   pmember_num             Contains the number of call members available with the given connected call type on return
86 * @remarks              pvoicecall_agent and pmember_num cannot be NULL
87 */
88 voicecall_error_t _vc_core_engine_status_get_call_member_info(voicecall_engine_t *pvoicecall_agent, voicecall_connected_call_type_t connected_call_type, int *pmember_num);
89
90 /**
91 * This function retrieves the call handle according to the given call type
92 *
93 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
94 * @param[in]    pvoicecall_agent        Handle to voicecall engine
95 * @param[in]    call_type               call type
96 * @param[out]   pcall_handle    Contains the call handle on success
97 * @remarks              pvoicecall_agent and pcall_handle cannot be NULL
98 *                               In case of multiple connected calls available, it will retreive the first connected call
99 */
100 voicecall_error_t _vc_core_engine_status_get_call_handle_bytype(voicecall_engine_t *pvoicecall_agent, voicecall_call_type_t call_type, int *pcall_handle);
101
102 /**
103 * This function checks if active calls and/or held call exists or not
104 *
105 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
106 * @param[in]    pvoicecall_agent        Handle to voicecall engine
107 * @param[out]   pactive_calls           Set to TRUE if active calls exist
108 * @param[out]   pheld_calls             Set to TRUE if held calls exist
109 * @remarks              pvoicecall_agent,pactive_calls and pheld_calls cannot be NULL
110 */
111 voicecall_error_t _vc_core_engine_status_isexists_any_call(voicecall_engine_t *pvoicecall_agent, gboolean *pactive_calls, gboolean *pheld_calls);
112
113 /**
114 * This function retreives the cphs csp status
115 *
116 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
117 * @param[in]    pvoicecall_agent                Handle to Voicecall Engine
118 * @param[in]    csp_service             csp name
119 * @param[out]   pbcsp_status            Contains TRUE if given csp service is enabled,FALSE  otherwise
120 * @remarks              pvoicecall_agent and pbcsp_status cannot be NULL
121 */
122 voicecall_error_t _vc_core_engine_status_get_cphs_csp_status(voicecall_engine_t *pvoicecall_agent, voicecall_cphs_csp_service csp_service, gboolean *pbcsp_status);
123
124 /**
125 * This function checks if the call is emergency call for the given outgoing call index
126 *
127 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
128 * @param[in]    pvoicecall_agent        Handle to Voicecall Engine
129 * @param[in]    mo_call_index           Index of the outgoing call
130 * @param[out]   pbemergency_call        Contains TRUE if the call is emergency call,FALSE  otherwise
131 * @remarks              pvoicecall_agent and pbemergency_call cannot be NULL
132 */
133 voicecall_error_t _vc_core_engine_status_check_emergency_byindex(voicecall_engine_t *pvoicecall_agent, int mo_call_index, gboolean *pbemergency_call);
134
135 /**
136 * This function checks and returns the FDN status
137 *
138 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
139 * @param[in]    pcall_agent     Handle to Voicecall Engine
140 * @param[out]   bfdn_enabled    TRUE - if FDN is enabled, FALSE  otherwise
141 * @remarks              pvoicecall_agent and bfdn_anabled cannot be NULL
142 */
143 voicecall_error_t _vc_core_engine_status_isenabled_fdn(voicecall_engine_t *pcall_agent, gboolean *bfdn_enabled);
144
145 /**
146 * This function checks the possiblity of transfering calls
147 *
148 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
149 * @param[in]    pvoicecall_agent                Handle to Voicecall Engine
150 * @param[out]   pbtransfer_calls        Contains TRUE if call transfer is possible, FALSE otherwise
151 * @remarks              pvoicecall_agent and pbtransfer_calls cannot be NULL
152 */
153 voicecall_error_t _vc_core_engine_status_is_transfer_call_possible(voicecall_engine_t *pvoicecall_agent, gboolean *pbtransfer_calls);
154
155 /**
156 * This function checks the possiblity of making conference calls
157 *
158 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
159 * @param[in]    pvoicecall_agent        Handle to Voicecall Engine
160 * @param[out]   pbconf_call             Contains TRUE if conference call is possible , FALSE otherwise
161 * @remarks              pvoicecall_agent and pbconf_call cannot be NULL
162 */
163 voicecall_error_t _vc_core_engine_status_is_conf_call_possible(voicecall_engine_t *pvoicecall_agent, gboolean *pbconf_call);
164
165 /**
166 * This function retreives the call state of the given call
167 *
168 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
169 * @param[in]    pvoicecall_agent        Handle to voicecall engine
170 * @param[in]    call_handle             Call handle of particular call
171 * @param[out]   pcall_state             Contains the call state of the given call handle
172 * @remarks              pvoicecall_agent and pcall_state cannot be NULL
173 */
174 voicecall_error_t _vc_core_engine_status_get_call_state_byhandle(voicecall_engine_t *pvoicecall_agent, int call_handle, voicecall_call_state_t *pcall_state);
175
176 /**
177 * This function checks if any call is ending and retrieves its call number if it is ending
178 *
179 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
180 * @param[in]    pvoicecall_agent        Handle to voicecall engine
181 * @param[out]   bcall_ending            TRUE if any call is being ended, FALSE otherwise
182 * @remarks              pvoicecall_agent and bcall_ending cannot be NULL
183 */
184 voicecall_error_t _vc_core_engine_status_is_any_call_ending(voicecall_engine_t *pvoicecall_agent, gboolean *bcall_ending);
185
186 /**
187 * This function checks whther engine is busy in processing any events or not
188 *
189 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
190 * @param[in]    pvoicecall_agent        Handle to voicecall engine
191 * @param[out]   bbusy   TRUE - if engine is not busy in processing any events, FALSE - otherwise
192 * @remarks              pvoicecall_agent and bbusy cannot be NULL
193 */
194 voicecall_error_t _vc_core_engine_status_is_engine_busy(voicecall_engine_t *pvoicecall_agent, gboolean *bbusy);
195
196 /**
197 * This function sets the given flag to engine for processing during call end
198 *
199 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
200 * @param[in]    pvoicecall_agent        Handle to voicecall engine
201 * @param[in]    end_flag                        End Flag to be set
202 * @remarks              pvoicecall_agent and bsscode cannot be NULL
203 */
204 voicecall_error_t _vc_core_engine_status_set_end_flag(voicecall_engine_t *pvoicecall_agent, voicecall_end_flag_t end_flag);
205
206 /**
207 * This function checks whether the given string is MMI string or not
208 *
209 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
210 * @param[in]    pvoicecall_agent        Handle to voicecall engine
211 * @param[in]    pinput_number   Input string to be verified
212 * @param[out]   bsscode                 TRUE - if the given string is a valid ss code, FALSE otherwise
213 * @remarks              pvoicecall_agent and bsscode cannot be NULL
214 */
215 voicecall_error_t _vc_core_engine_status_isvalid_ss_code(voicecall_engine_t *pvoicecall_agent, const char *pinput_number, gboolean *bsscode);
216
217 /**
218 * This function checks the if it is in zuhause area or not
219 *
220 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
221 * @param[in]    pvoicecall_agent        Handle to voicecall engine
222 * @param[out]   psat_icon_data  Pointer carrying the zuhause status
223 * @remarks              pvoicecall_agent and psat_icon_data cannot be NULL
224 */
225 voicecall_error_t _vc_core_engine_status_is_zuhause_area(voicecall_engine_t *pvoicecall_agent, gboolean *bzuhause);
226
227 /**
228 * This function checks whether the given incoming call is a restricted call or not
229 *
230 * @return               ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
231 * @param[in]    pvoicecall_agent        Handle to voicecall engine
232 * @param[in]    call_handle             Call handle of the call to be checked
233 * @param[out]   pbrestricted            Pointer to the restricted name mode
234 * @remarks              pvoicecall_agent and prestricted cannot be NULL.
235 *                               This API shall only be used with the incoming call handle before it is connected
236 */
237 voicecall_error_t _vc_core_engine_status_get_calling_namemode(voicecall_engine_t *pvoicecall_agent, int call_handle, gboolean *bcalling_namemode);
238
239 voicecall_error_t _vc_core_engine_status_dump_call_details(voicecall_engine_t *pvoicecall_agent);
240
241 /**
242 * This function checks the possiblity of making private calls
243 *
244 * @param[in]            pvoicecall_agent        Handle to Voicecall Engine
245 * @param[out]           b_download_call         Contains TRUE if zuhause area, FALSE otherwise
246 * @remarks                      pvoicecall_agent and pbprivate_call cannot be NULL
247 */
248 void _vc_core_engine_status_set_download_call(voicecall_engine_t *pvoicecall_agent, gboolean b_download_call);
249
250 gboolean _vc_core_engine_status_get_download_call(voicecall_engine_t *pvoicecall_agent);
251
252 #endif                          /* __VC_CORE_ENGINE_STATUS_H_ */