4 * Copyright(C) 2007,2008 Ixonos Plc
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Boston, MA 02111.
31 #ifndef CALL_INTERFACE
32 #define CALL_INTERFACE
36 * @brief voice call interface provice voice call service such as dial accept or
39 typedef struct CallInterface CallInterface
;
48 /***************************Method calls***********************************/
54 * @param call call interface pointer
55 * @param ipc_data data for ipc
56 * @param number the phone number to call
58 void (*initiate
) (CallInterface
*call
,
64 * @brief Activates a call (either incoming or held)
65 * @param call call interface pointer
66 * @param ipc_data data for ipc
69 void (*activate
) (CallInterface
*call
,
75 * @brief Adds specified call to conference
76 * @param call call interface pointer
77 * @param ipc_data data for ipc
80 void (*activate_conference
) (CallInterface
*call
,
85 * @brief Hangup a call. Hangup the current call or cancel the call
87 * @param call call interface pointer
88 * @param ipc_data data for ipc
89 * @param message TODO what's this?
90 * @param id index of the call to hang up
92 void (*release
) (CallInterface
*call
,
98 * @brief Place active call to hold.
100 * @param call call interface pointer
101 * @param ipc_data data for ipc
103 void (*hold_active
) (CallInterface
*call
,
109 * @param call call interface pointer
110 * @param ipc_data data for ipc
112 void (*join
) (CallInterface
*call
,
116 * @brief Transfer calls.
118 * @param call call interface pointer
119 * @param ipc_data data for ipc
121 void (*transfer
) (CallInterface
*call
,
123 const gchar
*number
);
126 * @brief Hangup all calls.
127 * @param call call interface pointer
128 * @param ipc_data data for ipc
129 * @param message TODO what's this?
131 void (*release_all
) (CallInterface
*call
,
133 const gchar
*message
);
136 * @brief Releases all held calls.
137 * @param call call interface pointer
138 * @param ipc_data data for ipc
139 * @param message TODO what's this?
141 void (*release_held
) (CallInterface
*call
,
143 const gchar
*message
);
147 * @brief Lists current calls (held and active)
148 * @param call call interface pointer
149 * @param ipc_data data for ipc
151 void (*list_calls
) (CallInterface
*call
,
155 * @brief Set Dtmf of modem
156 * @param call call interface poniter
157 * @param ipc_data data for ipc
158 * @param str Dtmf string
160 void (*send_dtmf
) (CallInterface
*call
,
164 * @brief Get emergency number
165 * @param call call interface poniter
166 * @param ipc_data data for ipc
168 void (*emergency
) (CallInterface
*call
,
175 typedef struct _CallIPCInterface CallIPCInterface
;
177 struct _CallIPCInterface
182 /**************************Replies to method calls*************************/
185 * @brief sends a reply to ipc that phone call has been made
186 * @param call_ipc call IPC interface pointer
187 * @param ipc_data data for ipc
188 * @param id newly initiated phone call's id
190 void (*initiate_reply
) (CallIPCInterface
*call_ipc
,
196 * @brief sends a reply to ipc that phone call has been activated
197 * @param call_ipc call IPC interface pointer
198 * @param ipc_data data for ipc
200 void (*activate_reply
) (CallIPCInterface
*call_ipc
,
204 * @brief sends a reply to ipc that phone call has been added to
206 * @param call_ipc call IPC interface pointer
207 * @param ipc_data data for ipc
209 void (*activate_conference_reply
) (CallIPCInterface
*call_ipc
,
213 * @brief sends a reply to ipc that active and held calls have been joined and released
214 * @param call_ipc call IPC interface pointer
215 * @param ipc_data data for ipc
217 void (*join_reply
) (CallIPCInterface
*call_ipc
,
221 * @brief sends a reply to ipc that a phone call has been released (hung up)
222 * @param call_ipc call IPC interface pointer
223 * @param ipc_data data for ipc
225 void (*release_reply
) (CallIPCInterface
*call_ipc
,
229 * @brief sends a reply to ipc that dtmf has been sent
230 * @param call_ipc call IPC interface pointer
231 * @param ipc_data data for ipc
234 void (*send_dtmf_reply
) (CallIPCInterface
*call_ipc
,
239 * @brief sends a reply to ipc with the emergency number
240 * @param call_ipc call IPC interface pointer
241 * @param ipc_data data for ipc
242 * @param number emergency number
244 void (*emergency_reply
) (CallIPCInterface
*call_ipc
,
249 * @brief send a reply to set DTMF duration function
250 * @param call_ipc call IPC interface pointer
251 * @param ipc_data data for ipc
253 void (*set_dtmf_duration_reply
) (CallIPCInterface
*call_ipc
,
257 * @brief send a reply to get DTMF duration function
258 * @param call_ipc call IPC interface pointer
259 * @param ipc_data data for ipc
260 * @param duration dtmf duration
262 void (*get_dtmf_duration_reply
) (CallIPCInterface
*call_ipc
,
264 const gint duration
);
267 * @brief send a reply to release all function
268 * @param call_ipc call IPC interface pointer
269 * @param ipc_data data for ipc
271 void (*release_all_reply
) (CallIPCInterface
*call_ipc
,
276 * @brief send a reply to release held function
277 * @param call_ipc call IPC interface pointer
278 * @param ipc_data data for ipc
280 void (*release_held_reply
) (CallIPCInterface
*call_ipc
,
284 * @brief send a reply to list calls function
285 * @param call_ipc call IPC interface pointer
286 * @param ipc_data data for ipc
287 * @param calls active calls
289 void (*list_calls_reply
) (CallIPCInterface
*call_ipc
,
294 * @brief sends a reply to get send identification function
295 * @param call_ipc call IPC interface pointer
296 * @param ipc_data data for ipc
299 void (*get_send_identification_reply
) (CallIPCInterface
*call_ipc
,
304 * @brief sends a reply to set send identification function
305 * @param call_ipc call IPC interface pointer
306 * @param ipc_data data for ipc
308 void (*set_send_identification_reply
) (CallIPCInterface
*call_ipc
,
310 /*********************Error replies to method calls************************/
313 * @brief sends an error reply to ipc
314 * @param call_ipc pointer to call IPC interface struct
315 * @param ipc_data ipc data
316 * @param error pointer to GError describing error
318 void (*initiate_error
) (CallIPCInterface
*call_ipc
,
325 * @brief sends an error reply to ipc
326 * @param call_ipc pointer to call IPC interface struct
327 * @param ipc_data ipc data
328 * @param error pointer to GError describing error
330 void (*activate_error
) (CallIPCInterface
*call_ipc
,
335 * @brief sends an error reply to ipc
336 * @param call_ipc pointer to call IPC interface struct
337 * @param ipc_data ipc data
338 * @param error pointer to GError describing error
340 void (*activate_conference_error
) (CallIPCInterface
*call_ipc
,
345 * @brief sends an error reply to ipc
346 * @param call_ipc pointer to call IPC interface struct
347 * @param ipc_data ipc data
348 * @param error pointer to GError describing error
350 void (*release_error
) (CallIPCInterface
*call_ipc
,
355 * @brief sends an error reply to ipc
356 * @param call_ipc pointer to call IPC interface struct
357 * @param ipc_data ipc data
358 * @param error pointer to GError describing error
360 void (*join_error
) (CallIPCInterface
*call_ipc
,
365 * @brief sends an error reply to ipc
366 * @param call_ipc pointer to call IPC interface struct
367 * @param ipc_data ipc data
368 * @param error pointer to GError describing error
370 void (*release_all_error
) (CallIPCInterface
*call_ipc
,
375 * @brief sends an error reply to ipc
376 * @param call_ipc pointer to call IPC interface struct
377 * @param ipc_data ipc data
378 * @param error pointer to GError describing error
380 void (*release_held_error
) (CallIPCInterface
*call_ipc
,
385 * @brief sends an error reply to ipc
386 * @param call_ipc pointer to call IPC interface struct
387 * @param ipc_data ipc data
388 * @param error pointer to GError describing error
390 void (*send_dtmf_error
) (CallIPCInterface
*call_ipc
,
395 * @brief sends an error reply to ipc
396 * @param call_ipc pointer to call IPC interface struct
397 * @param ipc_data ipc data
398 * @param error pointer to GError describing error
400 void (*emergency_error
) (CallIPCInterface
*call_ipc
,
406 * @brief sends an error reply to ipc
407 * @param call_ipc pointer to call IPC interface struct
408 * @param ipc_data ipc data
409 * @param error pointer to GError describing error
411 void (*set_dtmf_duration_error
) (CallIPCInterface
*call_ipc
,
416 * @brief sends an error reply to ipc
417 * @param call_ipc pointer to call IPC interface struct
418 * @param ipc_data ipc data
419 * @param error pointer to GError describing error
421 void (*get_dtmf_duration_error
) (CallIPCInterface
*call_ipc
,
426 * @brief sends an error reply to ipc
427 * @param call_ipc call IPC interface pointer
428 * @param ipc_data data for ipc
429 * @param error pointer to GError describing error
431 void (*list_calls_error
) (CallIPCInterface
*call_ipc
,
436 * @brief sends an error reply to ipc
437 * @param call_ipc call IPC interface pointer
438 * @param ipc_data data for ipc
439 * @param error pointer to GError describing error
441 void (*set_send_identification_error
) (CallIPCInterface
*call_ipc
,
446 * @brief sends an error reply to ipc
447 * @param call_ipc call IPC interface pointer
448 * @param ipc_data data for ipc
449 * @param error pointer to GError describing error
451 void (*get_send_identification_error
) (CallIPCInterface
*call_ipc
,
455 /********************************Signals***********************************/
460 * @brief call progress signal is emited to provide additional information
463 void (*call_status
) (CallIPCInterface
*call_ipc
,
466 GHashTable
*properties