Initialize Tizen 2.3
[framework/telephony/libslp-tapi.git] / mobile / src / tapi_ss.c
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21
22 #include <stdio.h>
23 #include <string.h>
24 #include <stdlib.h>
25
26 #include "tapi_common.h"
27 #include "TapiUtility.h"
28 #include "TelSs.h"
29
30 #include "common.h"
31 #include "tapi_log.h"
32 #include "ITapiSs.h"
33
34 static void on_response_get_ss_barring_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
35 {
36         GError *error = 0;
37         GDBusConnection *conn = 0;
38         struct tapi_resp_data *evt_cb_data = user_data;
39         int result = -1, i = 0;
40         TelSsBarringResp_t resp;
41
42         GVariant *dbus_result = 0, *value = 0;
43         GVariantIter *iter = 0;
44         GVariantIter *iter_row = 0;
45         const gchar *key = 0;
46
47         memset(&resp, '\0', sizeof(TelSsBarringResp_t));
48
49         conn = G_DBUS_CONNECTION (source_object);
50         dbus_result = g_dbus_connection_call_finish(conn, res, &error);
51         CHECK_DEINIT(error);
52
53         if (!dbus_result) {
54                 if (evt_cb_data->cb_fn) {
55                         evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
56                 }
57
58                 if (error)
59                         g_error_free(error);
60
61                 free(evt_cb_data);
62                 return;
63         }
64
65         g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
66
67         resp.record_num = g_variant_iter_n_children(iter);
68
69         while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
70                 while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
71
72                         if ( !g_strcmp0(key, "ss_class") ) {
73                                 resp.record[i].Class = g_variant_get_int32(value);
74                         }
75
76                         if ( !g_strcmp0(key, "ss_status") ) {
77                                 resp.record[i].Status = g_variant_get_int32(value);
78                         }
79
80                         if ( !g_strcmp0(key, "barring_mode") ) {
81                                 resp.record[i].Flavour = g_variant_get_int32(value);
82                         }
83
84                 }
85                 i++;
86                 g_variant_iter_free(iter_row);
87         }
88         g_variant_iter_free(iter);
89
90         if (evt_cb_data->cb_fn) {
91                 evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
92         }
93
94         free(evt_cb_data);
95 }
96
97 static void on_response_change_ss_barring_password(GObject *source_object, GAsyncResult *res, gpointer user_data)
98 {
99         GError *error = 0;
100         GDBusConnection *conn = 0;
101         struct tapi_resp_data *evt_cb_data = user_data;
102         int result = -1;
103
104         GVariant *dbus_result = 0;
105
106         conn = G_DBUS_CONNECTION (source_object);
107         dbus_result = g_dbus_connection_call_finish(conn, res, &error);
108         CHECK_DEINIT(error);
109
110         if (!dbus_result) {
111                 if (evt_cb_data->cb_fn) {
112                         evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
113                 }
114
115                 if (error)
116                         g_error_free(error);
117
118                 free(evt_cb_data);
119                 return;
120         }
121
122         g_variant_get (dbus_result, "(i)",  &result);
123
124         if (evt_cb_data->cb_fn) {
125                 evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
126         }
127
128         free(evt_cb_data);
129 }
130
131 static void on_response_get_ss_forward_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
132 {
133         GError *error = 0;
134         GDBusConnection *conn = 0;
135         struct tapi_resp_data *evt_cb_data = user_data;
136         int result = -1, i = 0;
137         TelSsForwardResp_t resp;
138
139         GVariant *dbus_result = 0, *value = 0;
140         GVariantIter *iter = 0;
141         GVariantIter *iter_row = 0;
142         const gchar *key = 0;
143
144
145         memset(&resp, '\0', sizeof(TelSsForwardResp_t));
146
147         conn = G_DBUS_CONNECTION (source_object);
148         dbus_result = g_dbus_connection_call_finish(conn, res, &error);
149         CHECK_DEINIT(error);
150
151         if (!dbus_result) {
152                 if (evt_cb_data->cb_fn) {
153                         evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
154                 }
155
156                 if (error)
157                         g_error_free(error);
158
159                 free(evt_cb_data);
160                 return;
161         }
162
163         g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
164
165         resp.record_num = g_variant_iter_n_children(iter);
166
167         while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
168                 while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
169
170                         if ( !g_strcmp0(key, "ss_class") ) {
171                                 resp.record[i].Class = g_variant_get_int32(value);
172                         }
173
174                         if ( !g_strcmp0(key, "ss_status") ) {
175                                 resp.record[i].Status = g_variant_get_int32(value);
176                         }
177
178                         if ( !g_strcmp0(key, "forwarding_mode") ) {
179                                 resp.record[i].ForwardCondition = g_variant_get_int32(value);
180                         }
181
182                         if ( !g_strcmp0(key, "no_reply_time") ) {
183                                 resp.record[i].NoReplyWaitTime = g_variant_get_int32(value);
184                         }
185
186                         if ( !g_strcmp0(key, "number_present") ) {
187                                 resp.record[i].bCallForwardingNumberPresent = g_variant_get_int32(value);
188                         }
189
190                         if ( !g_strcmp0(key, "forwarding_number") ) {
191                                 strncpy((char *)resp.record[i].szCallForwardingNumber, g_variant_get_string(value, 0), TAPI_CALL_DIALDIGIT_LEN_MAX );
192                         }
193
194                 }
195                 i++;
196                 g_variant_iter_free(iter_row);
197         }
198         g_variant_iter_free(iter);
199
200         if (evt_cb_data->cb_fn) {
201                 evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
202         }
203
204         free(evt_cb_data);
205 }
206
207 static void on_response_get_ss_waiting_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
208 {
209         GError *error = 0;
210         GDBusConnection *conn = 0;
211         struct tapi_resp_data *evt_cb_data = user_data;
212         int result = -1, i = 0;
213         TelSsWaitingResp_t resp;
214
215         GVariant *dbus_result = 0, *value = 0;
216         GVariantIter *iter = 0;
217         GVariantIter *iter_row = 0;
218         const gchar *key = 0;
219
220
221         memset(&resp, '\0', sizeof(TelSsWaitingResp_t));
222
223         conn = G_DBUS_CONNECTION (source_object);
224         dbus_result = g_dbus_connection_call_finish(conn, res, &error);
225         CHECK_DEINIT(error);
226
227         if (!dbus_result) {
228                 if (evt_cb_data->cb_fn) {
229                         evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
230                 }
231
232                 if (error)
233                         g_error_free(error);
234
235                 free(evt_cb_data);
236                 return;
237         }
238
239         g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
240
241         resp.record_num = g_variant_iter_n_children(iter);
242
243         while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
244                 while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
245
246                         if ( !g_strcmp0(key, "ss_class") ) {
247                                 resp.record[i].Class = g_variant_get_int32(value);
248                         }
249
250                         if ( !g_strcmp0(key, "ss_status") ) {
251                                 resp.record[i].Status = g_variant_get_int32(value);
252                         }
253                 }
254                 i++;
255                 g_variant_iter_free(iter_row);
256         }
257         g_variant_iter_free(iter);
258
259         if (evt_cb_data->cb_fn) {
260                 evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
261         }
262
263         free(evt_cb_data);
264 }
265
266
267 static void on_response_get_ss_cli_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
268 {
269         GError *error = 0;
270         GDBusConnection *conn = 0;
271         struct tapi_resp_data *evt_cb_data = user_data;
272         int result = -1;
273         TelSsCliResp_t resp;
274
275         GVariant *dbus_result = 0;
276
277         memset(&resp, '\0', sizeof(TelSsCliResp_t));
278
279         conn = G_DBUS_CONNECTION (source_object);
280         dbus_result = g_dbus_connection_call_finish(conn, res, &error);
281         CHECK_DEINIT(error);
282
283         if (!dbus_result) {
284                 if (evt_cb_data->cb_fn) {
285                         evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
286                 }
287
288                 if (error)
289                         g_error_free(error);
290
291                 free(evt_cb_data);
292                 return;
293         }
294
295         g_variant_get (dbus_result, "(iii)",  &result, &resp.Type, &resp.Status);
296
297         if (evt_cb_data->cb_fn) {
298                 evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
299         }
300
301         free(evt_cb_data);
302 }
303
304 static void on_response_send_ss_ussd_request(GObject *source_object, GAsyncResult *res, gpointer user_data)
305 {
306         GError *error = 0;
307         GDBusConnection *conn = 0;
308         struct tapi_resp_data *evt_cb_data = user_data;
309         int result = -1;
310         char *tmp_str = 0;
311         TelSsUssdResp_t resp;
312
313         GVariant *dbus_result = 0;
314
315         memset(&resp, '\0', sizeof(TelSsUssdResp_t));
316
317         conn = G_DBUS_CONNECTION (source_object);
318         dbus_result = g_dbus_connection_call_finish(conn, res, &error);
319         CHECK_DEINIT(error);
320
321         if (!dbus_result) {
322                 if (evt_cb_data->cb_fn) {
323                         evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
324                 }
325
326                 if (error)
327                         g_error_free(error);
328
329                 free(evt_cb_data);
330                 return;
331         }
332
333         g_variant_get (dbus_result, "(iiiis)",  &result, &resp.Type, &resp.Status, &resp.Length, &tmp_str);
334
335         if (!result) {
336                 memcpy( resp.szString, tmp_str, resp.Length );
337                 g_free(tmp_str);
338         }
339
340         if (evt_cb_data->cb_fn) {
341                 evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
342         }
343
344         free(evt_cb_data);
345 }
346
347 EXPORT_API int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data)
348 {
349         struct tapi_resp_data *evt_cb_data = 0;
350         GVariant *param = 0;
351         gchar *method = 0;
352
353         dbg("Func Entrance ");
354
355         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
356
357         param = g_variant_new("(iis)", info->Class, info->Type, info->szPassword);
358
359         if ( info->Mode == TAPI_SS_CB_MODE_ACTIVATE ) {
360                 dbg("[ check ] barring activate");
361                 method = "ActivateBarring";
362
363         } else {
364                 dbg("[ check ] barring deactivate");
365                 method = "DeactivateBarring";
366
367         }
368
369         g_dbus_connection_call(handle->dbus_connection,
370                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
371                         method, param, 0,
372                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
373                         on_response_get_ss_barring_status, evt_cb_data );
374
375         return TAPI_API_SUCCESS;
376 }
377
378 EXPORT_API int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data)
379 {
380         struct tapi_resp_data *evt_cb_data = 0;
381         GVariant *param = 0;
382
383         dbg("Func Entrance ");
384
385         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
386
387         param = g_variant_new("(ii)", class, type);
388
389         g_dbus_connection_call(handle->dbus_connection,
390                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
391                         "GetBarringStatus", param, 0,
392                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
393                         on_response_get_ss_barring_status, evt_cb_data );
394
395         return TAPI_API_SUCCESS;
396 }
397
398 /**********************************************************************************************
399  *
400  * This function is used to change call barring password.
401  *
402  * @param       pOldPassword[IN] of type char* Specifies the Old Call Barring Password.
403  * @param       pNewPassword[IN] of type char* Specifies the New Call Barring Password.
404  * @param       pNewPasswordAgain[IN] of type char* Specifies the New Call Barring Password for Confirm.
405  * @return      enum type TapiResult_t Specifies the API's Return result.
406  * @remark
407  *
408  ***********************************************************************************************/
409 EXPORT_API int tel_change_ss_barring_password(TapiHandle *handle,
410                 const char *old_password,
411                 const char *new_password,
412                 const char *new_password_again,
413                 tapi_response_cb callback, void *user_data)
414 {
415         struct tapi_resp_data *evt_cb_data = 0;
416         GVariant *param = 0;
417
418         dbg("Func Entrance ");
419
420         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
421
422         param = g_variant_new("(sss)", old_password, new_password, new_password_again);
423
424         g_dbus_connection_call(handle->dbus_connection,
425                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
426                         "ChangeBarringPassword", param, 0,
427                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
428                         on_response_change_ss_barring_password, evt_cb_data );
429
430         return TAPI_API_SUCCESS;
431 }
432
433 /**********************************************************************************************
434  *
435  * This function is used to Activate or Deactivate the call forwarding feature.
436  *
437  * @param       forwardInfo[IN] of type TelSsForwardInfo_t which specifies the Teleservice and CF flavour, Forwarded to number.
438  * @return      enum type TapiResult_t Specifies the API's Return result.
439  * @remark
440  *
441  ***********************************************************************************************/
442 EXPORT_API int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *info, tapi_response_cb callback, void *user_data)
443 {
444         struct tapi_resp_data *evt_cb_data = 0;
445         GVariant *param = 0;
446         gchar *method = 0;
447
448         dbg("Func Entrance ");
449
450         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
451
452         param = g_variant_new("(iiis)", info->Class, info->Condition, info->NoReplyConditionTimer, info->szPhoneNumber);
453
454         switch ( info->Mode ) {
455                 case TAPI_SS_CF_MODE_DISABLE_EV: {
456                         dbg("[ check ] forwarding deactivate");
457                         method = "DeactivateForwarding";
458                 } break;
459
460                 case TAPI_SS_CF_MODE_ENABLE_EV: {
461                         dbg("[ check ] forwarding activate");
462                         method = "ActivateForwarding";
463                 } break;
464
465                 case TAPI_SS_CF_MODE_REGISTRATION_EV: {
466                         dbg("[ check ] forwarding registration");
467                         method = "RegisterForwarding";
468                 } break;
469
470                 case TAPI_SS_CF_MODE_ERASURE_EV: {
471                         dbg("[ check ] forwarding deregistration");
472                         method = "DeregisterForwarding";
473                 } break;
474
475                 default:
476                         dbg("[ error ] invalid input : (0x%x)", info->Mode);
477                         return TAPI_API_INVALID_INPUT;
478         }
479
480         g_dbus_connection_call(handle->dbus_connection,
481                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
482                         method, param, 0,
483                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
484                         on_response_get_ss_forward_status, evt_cb_data );
485
486         return TAPI_API_SUCCESS;
487 }
488
489 /**********************************************************************************************
490  *
491  * This function is used to interrogate the status of call forwarding feature.
492  *
493  * @param       forwardType[IN] of type TelSsForwardType_t which specifies the telecommunication service.
494  * @param       condition[IN]   is of type TelSsForwardWhen_t specified the CF flavour
495  * @return      enum type TapiResult_t Specifies the API's Return result.
496  * @remark
497  *
498  ***********************************************************************************************/
499 EXPORT_API int tel_get_ss_forward_status(TapiHandle *handle, TelSsClass_t class, TelSsForwardWhen_t condition, tapi_response_cb callback, void *user_data)
500 {
501         struct tapi_resp_data *evt_cb_data = 0;
502         GVariant *param = 0;
503
504         dbg("Func Entrance ");
505
506         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
507
508         param = g_variant_new("(ii)", class, condition);
509
510         g_dbus_connection_call(handle->dbus_connection,
511                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
512                         "GetForwardingStatus", param, 0,
513                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
514                         on_response_get_ss_forward_status, evt_cb_data );
515
516         return TAPI_API_SUCCESS;
517 }
518
519 /**********************************************************************************************
520  *
521  * This function is used to Activate or dectivate call waiting feature.
522  *
523  * @param       waitInfo[IN] of type TelSsWaitingInfo_t which specifies the telecommunication service and mode.
524  * @return      enum type TapiResult_t Specifies the API's Return result.
525  * @remark
526  *
527  ***********************************************************************************************/
528 EXPORT_API int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *info, tapi_response_cb callback, void *user_data)
529 {
530         struct tapi_resp_data *evt_cb_data = 0;
531         GVariant *param = 0;
532         gchar *method = 0;
533
534         dbg("Func Entrance ");
535
536         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
537
538         param = g_variant_new("(i)", info->Class);
539
540         if ( info->Mode == TAPI_SS_CW_MODE_ACTIVATE ) {
541                 dbg("[ check ] waiting activate");
542                 method = "ActivateWaiting";
543
544         } else {
545                 dbg("[ check ] waiting deactivate");
546                 method = "DeactivateWaiting";
547
548         }
549
550         g_dbus_connection_call(handle->dbus_connection,
551                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
552                         method, param, 0,
553                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
554                         on_response_get_ss_waiting_status, evt_cb_data );
555
556         return TAPI_API_SUCCESS;
557 }
558
559 /**********************************************************************************************
560  *
561  * This function is used to interrogate the status of call waiting feature.
562  *
563  * @param       CallType[IN] of type TelSsCallType_t which specifies the telecommunication service .
564  * @return      enum type TapiResult_t Specifies the API's Return result.
565  * @remark
566  *
567  ***********************************************************************************************/
568
569 EXPORT_API int tel_get_ss_waiting_status(TapiHandle *handle, const TelSsClass_t class, tapi_response_cb callback, void *user_data)
570 {
571         struct tapi_resp_data *evt_cb_data = 0;
572         GVariant *param = 0;
573
574         dbg("Func Entrance ");
575
576         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
577
578         param = g_variant_new("(i)", class);
579
580         g_dbus_connection_call(handle->dbus_connection,
581                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
582                         "GetWaitingStatus", param, 0,
583                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
584                         on_response_get_ss_waiting_status, evt_cb_data );
585
586         return TAPI_API_SUCCESS;
587 }
588
589 /**********************************************************************************************
590  *
591  * This function is used to interrogate the status of CLI services feature.
592  *
593  * @param       CliType[IN] of type TelSsCliType_t which specifies the CLI service .
594  * @return      enum type TapiResult_t Specifies the API's Return result.
595  * @remark
596  *
597  ***********************************************************************************************/
598 EXPORT_API int tel_get_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, tapi_response_cb callback, void *user_data)
599 {
600         struct tapi_resp_data *evt_cb_data = 0;
601         GVariant *param = 0;
602
603         dbg("Func Entrance ");
604
605         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
606
607         param = g_variant_new("(i)", type);
608
609         g_dbus_connection_call(handle->dbus_connection,
610                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
611                         "GetCLIStatus", param, 0,
612                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
613                         on_response_get_ss_cli_status, evt_cb_data );
614
615         return TAPI_API_SUCCESS;
616 }
617
618 /**********************************************************************************************
619  *
620  * This function is used to send a USSD string and also the User response for a NW intiated USSD.
621  *
622  * @param       pAppMsg[IN] of type TelSsUssdMsgInfo_t which specifies the USSD String,length of the string, format of the string.
623  * @return      enum type TapiResult_t Specifies the API's Return result.
624  * @remark      TelSsUssdMsgInfo_t ->IndType is not used while calling this function, This is used for sending the response.
625  *                      Limo standard defines only one structure for Request and response.
626  *
627  ***********************************************************************************************/
628 EXPORT_API int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgInfo_t *info, tapi_response_cb callback, void *user_data)
629 {
630         struct tapi_resp_data *evt_cb_data = 0;
631         GVariant *param = 0;
632
633         dbg("Func Entrance ");
634
635         MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
636
637         param = g_variant_new("(iis)", info->Type, info->Length, info->szString);
638
639         g_dbus_connection_call(handle->dbus_connection,
640                         DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
641                         "SendUSSD", param, 0,
642                         G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
643                         on_response_send_ss_ussd_request, evt_cb_data );
644
645         return TAPI_API_SUCCESS;
646 }
647
648 /**********************************************************************************************
649  *
650  * This function is used to Sets AOC information.
651  *
652  * @param       AocType[IN] of type TelSsAocType_t which specifies the which AOC type to read.
653  * @return      enum type TapiResult_t Specifies the API's Return result.
654  * @remark
655  *
656  ***********************************************************************************************/
657 EXPORT_API int tel_get_ss_aoc_info(TapiHandle *handle, TelSsAocType_t AocType, tapi_response_cb callback, void *user_data)
658 {
659         return 0;
660 }
661
662 /**********************************************************************************************
663  *
664  * This function is used to Sets AOC information.
665  *
666  * @param       AocSetInfo[IN] of type TelCallAocInfo_t which specifies the AOC info parameters .
667  * @return      enum type TapiResult_t Specifies the API's Return result.
668  * @remark
669  *
670  ***********************************************************************************************/
671 EXPORT_API int tel_set_ss_aoc_info(TapiHandle *handle, TelCallAocInfo_t *AocSetInfo, tapi_response_cb callback, void *user_data)
672 {
673         return 0;
674 }
675
676 /*      EOF  */