Make TIZEN 2.0
[apps/home/call.git] / call-engine / core / include / vc-core-tapi-evnt.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_TAPI_EVENT_H_
19 #define __VC_CORE_TAPI_EVENT_H_
20
21 #include "vc-core-util.h"
22 #include "vc-core-callagent.h"
23 #include "vc-core-engine.h"
24
25 /**
26  * This function handles the tapi connected line indication handle
27  *
28  * @return              Returns TRUE on success and FALSE on failure
29  * @param[in]           pcall_agent                     Pointer to the call agent state
30  * @param[in]           call_handle                     Tapi Call Handle associtated with connected line indication
31  */
32 gboolean _vc_core_tapi_event_connected_line_ind_handle(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallConnectedNumberInfo_t *connected_number_info);
33
34 /**
35  * This function handles the AOC Event
36  *
37  * @return              Returns TRUE on success and FALSE on failure
38  * @param[in]           pcall_agent             Pointer to the call agent state
39  * @param[in]           call_handle             Pointet to SAT engine return call structure
40  * @param[in]           ptapi_aoc_info          AOC info associated with the AOC Event
41  */
42 gboolean _vc_core_tapi_event_handle_aoc(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallAocInfo_t *pTapiAocInfo);
43
44 /**
45  * This function retreives the voicecall engine specific end cause type for the given tapi end cause type
46  *
47  * @return              Returns TRUE on success and FALSE on failure
48  * @param[in]           pcall_agent             Pointer to the call agent state
49  * @param[in]           noti_id                         tapi event type
50  * @param[in]           cause                   tapi call end cause
51  * @param[out]  end_cause_type  voicecall engine end cause
52  */
53 void _vc_core_tapi_event_get_end_cause_type(call_vc_callagent_state_t *pcall_agent, const char *noti_id, TelTapiEndCause_t cause, voice_call_end_cause_type_t *end_cause_type);
54
55 /**
56 * This function Copies Telephony incoming call data to voice call incoming call data
57 *
58 * @return               void
59 * @param[in]            pcall_agent             Handle to voicecall agent
60 * @param[in]            callInfo                        Telephony Incoming Call Data
61 * @param[out]   pcallobject_info        Voicecall Engine Incoming Call Dta
62 */
63 void _vc_core_tapi_event_copy_incoming_call_data(call_vc_callagent_state_t *pcall_agent, TelCallIncomingCallInfo_t *callInfo, call_vc_call_objectinfo_t *pcallobject_info);
64
65 /**
66  * This function handles the incoming event
67  *
68  * @return              Returns TRUE on success and FALSE on failure
69  * @param[in]           pcall_agent             Pointer to the call agent state
70  * @param[in]           call_handle             Incoming call handle
71  * @param[in]           callInfo                        Incoming call info associated with the incoming call
72  */
73 gboolean _vc_core_tapi_event_handle_incoming_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallIncomingCallInfo_t *callInfo);
74
75 /**
76  * This function handles tapi origination event
77  *
78  * @return              Returns TRUE on success and FALSE on failure
79  * @param[in]           pcall_agent             Pointer to the call agent state
80  * @param[in]           call_handle             Call Handle associated with the alert event
81  */
82 gboolean _vc_core_tapi_event_handle_originated_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
83
84 /**
85  * This function handles tapi alert event
86  *
87  * @return              Returns TRUE on success and FALSE on failure
88  * @param[in]           pcall_agent             Pointer to the call agent state
89  * @param[in]           call_handle             Call Handle associated with the alert event
90  */
91 gboolean _vc_core_tapi_event_handle_alert_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
92
93 /**
94  * This function handles the call end event
95  *
96  * @return              Returns TRUE on success and FALSE on failure
97  * @param[in]           pcall_agent             Pointer to the call agent state
98  * @param[in]           type                            Tapi Event Type
99  * @param[in]           handle                  Call Handle of the call being ended
100  * @param[in]           cause                   Tapi End Cause
101  */
102 gboolean _vc_core_tapi_event_handle_call_end_event(call_vc_callagent_state_t *pcall_agent, const char * noti_id, call_vc_handle handle, TelTapiEndCause_t cause);
103
104 /**
105  * This function handles the tapi call connect event
106  *
107  * @return              Returns TRUE on success and FALSE on failure
108  * @param[in]           pcall_agent             Pointer to the call agent state
109  * @param[in]           call_handle             call handle assoicated with the call being connected
110  */
111 gboolean _vc_core_tapi_event_handle_call_connect_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
112
113 /**
114  * This function handles call hold event
115  *
116  * @return              Returns TRUE on success and FALSE on failure
117  * @param[in]           pcall_agent             Pointer to the call agent state
118  * @param[in]           call_handle             call handle assoicated with the call being held
119  * @param[in]           status                  tapi cause incase of hold failed
120  */
121 gboolean _vc_core_tapi_event_handle_call_held_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
122
123 /**
124  * This function handles tapi call activate/retreive event
125  *
126  * @return              Returns TRUE on success and FALSE on failure
127  * @param[in]           pcall_agent             Pointer to the call agent state
128  * @param[in]           call_handle             call handle assoicated with the call being held
129  * @param[in]           status                  tapi cause incase of hold failed
130  */
131 gboolean _vc_core_tapi_event_handle_call_retrieve_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
132
133 /**
134  * This function handles call join/conference event
135  *
136  * @return              Returns TRUE on success and FALSE on failure
137  * @param[in]           pcall_agent             Pointer to the call agent state
138  * @param[in]           call_handle             call handle assoicated with the call being held
139  * @param[in]           status                  tapi cause incase of hold failed
140  */
141 gboolean _vc_core_tapi_event_handle_call_join_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
142
143 /**
144  * This function handles call split/private call event
145  *
146  * @return              Returns TRUE on success and FALSE on failure
147  * @param[in]           pcall_agent             Pointer to the call agent state
148  * @param[in]           call_handle             call handle assoicated with the call being held
149  * @param[in]           status                  tapi cause incase of hold failed
150  */
151 gboolean _vc_core_tapi_event_handle_call_split_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
152
153 /**
154  * This function handles the call transfer event
155  *
156  * @return              Returns TRUE on success and FALSE on failure
157  * @param[in]           pcall_agent             Pointer to the call agent state
158  * @param[in]           status                  tapi cause incase of hold failed
159  */
160 gboolean _vc_core_tapi_event_handle_call_transfer_event(call_vc_callagent_state_t *pcall_agent, TelCallCause_t status);
161
162 #endif                          /* __VC_CORE_TAPI_EVENT_H_ */