bf41865f9127a55ca9f3e9e5138732f80a78584f
[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 different type of tapi indications given in tapi_event_type
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]           tapi_event_type         Tapi Event Type
40  * @param[in]           param2                          sub param associated with tapi_event_type
41  */
42 gboolean _vc_core_tapi_event_handle_notification(call_vc_callagent_state_t *pcall_agent, int tapi_event_type, int param2);
43
44 /**
45  * This function handles the AOC Event
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]           call_handle             Pointet to SAT engine return call structure
50  * @param[in]           ptapi_aoc_info          AOC info associated with the AOC Event
51  */
52 gboolean _vc_core_tapi_event_handle_aoc(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallAocInfo_t *pTapiAocInfo);
53
54 /**
55  * This function retreives the voicecall engine specific end cause type for the given tapi end cause type
56  *
57  * @return              Returns TRUE on success and FALSE on failure
58  * @param[in]           type                            tapi event type
59  * @param[in]           cause                   tapi call end cause
60  * @param[out]  end_cause_type  voicecall engine end cause
61  */
62 void _vc_core_tapi_event_get_end_cause_type(int type, TelTapiEndCause_t cause, voice_call_end_cause_type_t *end_cause_type);
63
64 /**
65 * This function Copies Telephony incoming call data to voice call incoming call data
66 *
67 * @return               void
68 * @param[in]            pcall_agent             Handle to voicecall agent
69 * @param[in]            callInfo                        Telephony Incoming Call Data
70 * @param[out]   pcallobject_info        Voicecall Engine Incoming Call Dta
71 */
72 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);
73
74 /**
75  * This function handles the incoming event
76  *
77  * @return              Returns TRUE on success and FALSE on failure
78  * @param[in]           pcall_agent             Pointer to the call agent state
79  * @param[in]           call_handle             Incoming call handle
80  * @param[in]           callInfo                        Incoming call info associated with the incoming call
81  */
82 gboolean _vc_core_tapi_event_handle_incoming_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallIncomingCallInfo_t *callInfo);
83
84 /**
85  * This function handles tapi origination 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_originated_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
92
93 /**
94  * This function handles tapi alert 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]           call_handle             Call Handle associated with the alert event
99  */
100 gboolean _vc_core_tapi_event_handle_alert_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
101
102 /**
103  * This function handles the call end event
104  *
105  * @return              Returns TRUE on success and FALSE on failure
106  * @param[in]           pcall_agent             Pointer to the call agent state
107  * @param[in]           type                            Tapi Event Type
108  * @param[in]           handle                  Call Handle of the call being ended
109  * @param[in]           cause                   Tapi End Cause
110  */
111 gboolean _vc_core_tapi_event_handle_call_end_event(call_vc_callagent_state_t *pcall_agent, int type, call_vc_handle handle, TelTapiEndCause_t cause);
112
113 /**
114  * This function handles the tapi call connect 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 connected
119  */
120 gboolean _vc_core_tapi_event_handle_call_connect_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
121
122 /**
123  * This function handles call hold event
124  *
125  * @return              Returns TRUE on success and FALSE on failure
126  * @param[in]           pcall_agent             Pointer to the call agent state
127  * @param[in]           call_handle             call handle assoicated with the call being held
128  * @param[in]           status                  tapi cause incase of hold failed
129  */
130 gboolean _vc_core_tapi_event_handle_call_held_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
131
132 /**
133  * This function handles tapi call activate/retreive event
134  *
135  * @return              Returns TRUE on success and FALSE on failure
136  * @param[in]           pcall_agent             Pointer to the call agent state
137  * @param[in]           call_handle             call handle assoicated with the call being held
138  * @param[in]           status                  tapi cause incase of hold failed
139  */
140 gboolean _vc_core_tapi_event_handle_call_retrieve_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
141
142 /**
143  * This function handles call join/conference event
144  *
145  * @return              Returns TRUE on success and FALSE on failure
146  * @param[in]           pcall_agent             Pointer to the call agent state
147  * @param[in]           call_handle             call handle assoicated with the call being held
148  * @param[in]           status                  tapi cause incase of hold failed
149  */
150 gboolean _vc_core_tapi_event_handle_call_join_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
151
152 /**
153  * This function handles call split/private call event
154  *
155  * @return              Returns TRUE on success and FALSE on failure
156  * @param[in]           pcall_agent             Pointer to the call agent state
157  * @param[in]           call_handle             call handle assoicated with the call being held
158  * @param[in]           status                  tapi cause incase of hold failed
159  */
160 gboolean _vc_core_tapi_event_handle_call_split_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
161
162 /**
163  * This function handles the call transfer event
164  *
165  * @return              Returns TRUE on success and FALSE on failure
166  * @param[in]           pcall_agent             Pointer to the call agent state
167  * @param[in]           status                  tapi cause incase of hold failed
168  */
169 gboolean _vc_core_tapi_event_handle_call_transfer_event(call_vc_callagent_state_t *pcall_agent, TelCallCause_t status);
170
171 #endif                          /* __VC_CORE_TAPI_EVENT_H_ */