2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://floralicense.org/license/
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.
22 #include <ITapiPhonebook.h>
23 #include <TapiUtility.h>
24 #include <tapi_event.h>
25 #include "cst-tapi-request.h"
26 #include "cst-common.h"
27 #include "cst-common-string.h"
29 static void __cst_send_ss_req_to_telephony_server(CallSettingSSReq_t *req);
30 static int __cst_get_ss_error_from_tapi_error(TelSsCause_t tapi_err);
31 static gboolean __cst_ss_forward_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
32 static gboolean __cst_ss_barring_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
33 static gboolean __cst_ss_waiting_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
34 static void __cst_remove_ss_request(void *data);
36 void _cst_register_tel_event(void *data)
38 ENTER(_cst_register_tel_event);
39 CstUgData_t *ugd = (CstUgData_t *)data;
42 ERR("ugd = NULL, so returning");
46 ugd->tapi_handle = tel_init(NULL);
47 if (ugd->tapi_handle != NULL) {
48 ERR("tel_init() Success, handle created.");
50 ERR("tel_init() failed.");
57 static int __cst_get_tapi_req_ss_class(int basic_service_code)
61 switch (basic_service_code) {
62 case CST_CALLTYPE_VOICE:
63 ss_class = TAPI_SS_CLASS_VOICE;
65 case CST_CALLTYPE_VOICE_LINE2:
66 ss_class = TAPI_SS_CLASS_AUX_VOICE;
68 case CST_CALLTYPE_ALL:
69 ss_class = TAPI_SS_CLASS_ALL_TELE_BEARER;
73 ERR("Invalid Basic Service Code");
79 static int __cst_get_tapi_cf_mode(int cst_action)
84 case CST_ACTION_ACTIVATE:
85 mode = TAPI_SS_CF_MODE_REGISTRATION_EV;
87 case CST_ACTION_DEACTIVATE:
88 mode = TAPI_SS_CF_MODE_ERASURE_EV;
92 ERR("Invalid CF mode");
98 static int __cst_get_tapi_cf_flavour(int cst_cf_flavour)
102 switch (cst_cf_flavour) {
103 case CST_SSTYPE_CF_UNCONDITIONAL:
104 tel_cf_flavour = TAPI_SS_CF_WHEN_CFU;
106 case CST_SSTYPE_CF_BUSY:
107 tel_cf_flavour = TAPI_SS_CF_WHEN_CFB;
109 case CST_SSTYPE_CF_NO_REPLY:
110 tel_cf_flavour = TAPI_SS_CF_WHEN_CFNRy;
112 case CST_SSTYPE_CF_NOT_REACHABLE:
113 tel_cf_flavour = TAPI_SS_CF_WHEN_CFNRc;
117 ERR("Wrong CF flavour");
119 return tel_cf_flavour;
122 static int __cst_get_tapi_cb_mode(int cst_action)
126 switch (cst_action) {
127 case CST_ACTION_ACTIVATE:
128 mode = TAPI_SS_CB_MODE_ACTIVATE;
130 case CST_ACTION_DEACTIVATE:
131 mode = TAPI_SS_CB_MODE_DEACTIVATE;
135 ERR("Invalid CB action");
140 static int __cst_get_tapi_cb_flavour(int cst_cb_flavour)
144 switch (cst_cb_flavour) {
145 case CST_SSTYPE_CB_OC:
146 tel_cb_flavour = TAPI_SS_CB_TYPE_BAOC;
148 case CST_SSTYPE_CB_OIC:
149 tel_cb_flavour = TAPI_SS_CB_TYPE_BOIC;
151 case CST_SSTYPE_CB_OICEH:
152 tel_cb_flavour = TAPI_SS_CB_TYPE_BOIC_NOT_HC;
154 case CST_SSTYPE_CB_IC:
155 tel_cb_flavour = TAPI_SS_CB_TYPE_BAIC;
157 case CST_SSTYPE_CB_ICR:
158 tel_cb_flavour = TAPI_SS_CB_TYPE_BIC_ROAM;
162 ERR("Wrong CB flavour");
164 return tel_cb_flavour;
167 static int __cst_get_tapi_cw_mode(int cst_action)
171 switch (cst_action) {
172 case CST_ACTION_ACTIVATE:
173 mode = TAPI_SS_CW_MODE_ACTIVATE;
175 case CST_ACTION_DEACTIVATE:
176 mode = TAPI_SS_CW_MODE_DEACTIVATE;
180 ERR("Invalid CW action");
185 static gboolean __cst_ss_forward_resp_cb(TapiHandle *handle, int result, void *data, void *user_data)
187 DBG("Enter __cst_ss_forward_resp_cb");
188 TelSsCause_t ss_result = result;
189 TelSsForwardResp_t *cf_data = NULL;
190 CallSettingSSReq_t *req = NULL;
191 CstUgData_t *ugd = NULL;
193 req = (CallSettingSSReq_t *)user_data;
195 ERR("User_data is NULL, returning");
199 ugd = (CstUgData_t *)req->ugd;
201 ERR("ugd is NULL, returning");
205 cf_data = (TelSsForwardResp_t *)data;
206 if (cf_data == NULL) {
207 ERR("data is NULL, returning");
208 __cst_remove_ss_request(ugd);
212 retv_if(req->is_requesting == EINA_FALSE, 0);
213 if (req->is_canceled == EINA_TRUE) {
214 DBG("Req(0x%xp,req_id=%d) was canceled. So It will be removed", req, req->req_id);
215 __cst_remove_ss_request(ugd);
219 if (ss_result != TAPI_SS_SUCCESS) {
220 DBG("Event Status is %d", ss_result);
222 error = __cst_get_ss_error_from_tapi_error(ss_result);
223 DBG("req=0x%p", req);
225 req->func(req->call_type, req->flavour, EINA_FALSE, NULL, error, req->action, req->data, req->waiting_time);
227 __cst_remove_ss_request(ugd);
231 char number[TAPI_CALL_DIALDIGIT_LEN_MAX];
233 Eina_Bool cf_state = EINA_FALSE;
236 int waiting_time = 30;
239 for (i = 0; i < cf_data->record_num; ++i) {
241 DBG("TeleCommService=%d", cf_data->record[i].Class);
242 DBG("SS_Code=%d", cf_data->record[i].ForwardCondition);
243 DBG("SS_Status=%d", cf_data->record[i].Status);
244 switch (cf_data->record[i].Class) {
245 case TAPI_SS_CLASS_VOICE:
246 call_type = CST_CALLTYPE_VOICE;
248 case TAPI_SS_CLASS_AUX_VOICE:
249 call_type = CST_CALLTYPE_VOICE_LINE2;
251 case TAPI_SS_CLASS_ALL_TELE_BEARER:
252 call_type = CST_CALLTYPE_ALL;
255 ERR("Invalid call type");
256 __cst_remove_ss_request(ugd);
260 DBG("req->call_type == %d call_type=%d", req->call_type, call_type);
261 if (req->call_type != call_type && call_type != CST_CALLTYPE_ALL) {
265 switch (cf_data->record[i].ForwardCondition) {
266 case TAPI_SS_CF_WHEN_CFU:
267 cf_flavour = CST_SSTYPE_CF_UNCONDITIONAL;
269 case TAPI_SS_CF_WHEN_CFB:
270 cf_flavour = CST_SSTYPE_CF_BUSY;
272 case TAPI_SS_CF_WHEN_CFNRy:
273 cf_flavour = CST_SSTYPE_CF_NO_REPLY;
274 waiting_time = (int)cf_data->record[i].NoReplyWaitTime;
275 DBG("******** Waiting time =%d **********", waiting_time);
277 case TAPI_SS_CF_WHEN_CFNRc:
278 cf_flavour = CST_SSTYPE_CF_NOT_REACHABLE;
280 case TAPI_SS_CF_WHEN_CF_ALL:
281 cf_flavour = CST_SSTYPE_CF_ALL;
283 case TAPI_SS_CF_WHEN_CFC:
284 cf_flavour = CST_SSTYPE_CF_ALL_CONDITIONAL;
287 ERR("Invalid CF SS_Code");
288 __cst_remove_ss_request(ugd);
292 switch (cf_data->record[i].Status) {
293 case TAPI_SS_STATUS_ACTIVE:
294 case TAPI_SS_STATUS_REGISTERED:
295 cf_state = EINA_TRUE;
297 case TAPI_SS_STATUS_NOTHING:
298 case TAPI_SS_STATUS_PROVISIONED:
299 case TAPI_SS_STATUS_QUIESCENT:
300 cf_state = EINA_FALSE;
303 ERR("Invalid CF SS_status");
304 __cst_remove_ss_request(ugd);
308 if (cf_data->record[i].bCallForwardingNumberPresent == 1) {
309 snprintf(number, TAPI_CALL_DIALDIGIT_LEN_MAX, "%s", cf_data->record[i].szCallForwardingNumber);
312 req->func(call_type, cf_flavour, cf_state, number, CST_ERROR_NONE, req->action, req->data, waiting_time);
315 __cst_remove_ss_request(ugd);
319 static gboolean __cst_ss_barring_resp_cb(TapiHandle *handle, int result, void *data, void *user_data)
322 #ifdef _CALL_SET_BARRING_SUPPORT
323 TelSsCause_t ss_result = result;
324 TelSsBarringResp_t *cb_data = NULL;
325 CallSettingSSReq_t *req = NULL;
326 CstUgData_t *ugd = NULL;
328 req = (CallSettingSSReq_t *)user_data;
330 ERR("User_data is NULL, returning");
334 ugd = (CstUgData_t *)req->ugd;
336 ERR("ugd is NULL, returning");
340 cb_data = (TelSsBarringResp_t *)data;
341 if (cb_data == NULL) {
342 ERR("data is NULL, returning");
343 __cst_remove_ss_request(ugd);
347 retv_if(req->is_requesting == EINA_FALSE, 0);
348 if (req->is_canceled == EINA_TRUE) {
349 __cst_remove_ss_request(ugd);
353 if (ss_result != TAPI_SS_SUCCESS) {
354 DBG("Event Status is %d", ss_result);
356 error = __cst_get_ss_error_from_tapi_error(ss_result);
358 req->func(req->call_type, req->flavour, EINA_FALSE, NULL, error, req->action, req->data, req->waiting_time);
360 __cst_remove_ss_request(ugd);
364 Eina_Bool cb_state = EINA_FALSE;
369 for (i = 0; i < cb_data->record_num; ++i) {
370 DBG("TeleCommService=0x%x", cb_data->record[i].Class);
371 DBG("SS_Code=0x%x", cb_data->record[i].Flavour);
372 DBG("SS_Status=0x%x", cb_data->record[i].Status);
373 switch (cb_data->record[i].Class) {
374 case TAPI_SS_CLASS_VOICE:
375 call_type = CST_CALLTYPE_VOICE;
377 case TAPI_SS_CLASS_AUX_VOICE:
378 call_type = CST_CALLTYPE_VOICE_LINE2;
380 case TAPI_SS_CLASS_ALL_TELE_BEARER:
381 call_type = CST_CALLTYPE_ALL;
384 ERR("Invalid call type");
385 __cst_remove_ss_request(ugd);
389 //If the call type of the record is not same with request, skip below code
390 if (req->call_type != call_type && call_type != CST_CALLTYPE_ALL) {
394 switch (cb_data->record[i].Flavour) {
395 case TAPI_SS_CB_TYPE_BAOC:
396 cb_flavour = CST_SSTYPE_CB_OC;
398 case TAPI_SS_CB_TYPE_BOIC:
399 cb_flavour = CST_SSTYPE_CB_OIC;
401 case TAPI_SS_CB_TYPE_BOIC_NOT_HC:
402 cb_flavour = CST_SSTYPE_CB_OICEH;
404 case TAPI_SS_CB_TYPE_BAIC:
405 cb_flavour = CST_SSTYPE_CB_IC;
407 case TAPI_SS_CB_TYPE_BIC_ROAM:
408 cb_flavour = CST_SSTYPE_CB_ICR;
411 ERR("Invalid CB SS_Code");
412 __cst_remove_ss_request(ugd);
416 switch (cb_data->record[i].Status) {
417 case TAPI_SS_STATUS_ACTIVE:
418 case TAPI_SS_STATUS_REGISTERED:
419 cb_state = EINA_TRUE;
421 case TAPI_SS_STATUS_NOTHING:
422 case TAPI_SS_STATUS_PROVISIONED:
423 case TAPI_SS_STATUS_QUIESCENT:
424 cb_state = EINA_FALSE;
427 ERR("Invalid CB SS_status");
428 __cst_remove_ss_request(ugd);
433 req->func(call_type, cb_flavour, cb_state, NULL, CST_ERROR_NONE, req->action, req->data, req->waiting_time);
434 __cst_remove_ss_request(ugd);
438 DBG("Call Barring Service is not supported in Generic version...");
440 #endif /* _CALL_SET_BARRING_SUPPORT */
444 static gboolean __cst_ss_waiting_resp_cb(TapiHandle *handle, int result, void *data, void *user_data)
446 DBG("Enter __cst_ss_waiting_resp_cb");
447 TelSsCause_t ss_result = result;
448 TelSsWaitingResp_t *cw_data = NULL;
449 CallSettingSSReq_t *req = NULL;
450 CstUgData_t *ugd = NULL;
452 req = (CallSettingSSReq_t *)user_data;
454 ERR("User_data is NULL, returning");
458 ugd = (CstUgData_t *)req->ugd;
460 ERR("ugd is NULL, returning");
464 cw_data = (TelSsWaitingResp_t *)data;
465 if (cw_data == NULL) {
466 ERR("data is NULL, returning");
467 __cst_remove_ss_request(ugd);
471 retv_if(req->is_requesting == EINA_FALSE, 0);
472 if (req->is_canceled == EINA_TRUE) {
473 __cst_remove_ss_request(ugd);
477 if (ss_result != TAPI_SS_SUCCESS) {
478 DBG("Event Status is %d", ss_result);
481 error = __cst_get_ss_error_from_tapi_error(ss_result);
484 req->func(req->call_type, req->flavour, EINA_TRUE, NULL, error, req->action, req->data, req->waiting_time);
486 __cst_remove_ss_request(ugd);
490 DBG("CW Status = %d", cw_data->record[0].Status);
491 retv_if(NULL == req->func, 0);
492 switch (cw_data->record[0].Status) {
493 case TAPI_SS_STATUS_ACTIVE:
494 case TAPI_SS_STATUS_REGISTERED:
495 req->func(req->call_type, req->flavour, EINA_TRUE, NULL, CST_ERROR_NONE, req->action, req->data, req->waiting_time);
497 case TAPI_SS_STATUS_PROVISIONED:
498 case TAPI_SS_STATUS_QUIESCENT:
499 req->func(req->call_type, req->flavour, EINA_FALSE, NULL, CST_ERROR_NONE, req->action, req->data, req->waiting_time);
502 ERR("Call waiting query error");
506 __cst_remove_ss_request(ugd);
510 static void __cst_print_req_queue(Eina_List *queue)
513 CallSettingSSReq_t *req;
514 EINA_LIST_FOREACH(queue, l, req) {
516 DBG("req=0x%p req_id=0x%x requesting=%d canceled=%d flavour=%d", req, req->req_id, req->is_requesting, req->is_canceled, req->flavour);
520 void _cst_cancel_all_ss_request(void *data)
522 ENTER(_cst_cancel_all_ss_request);
523 CstUgData_t *ugd = (CstUgData_t *)data;
527 CallSettingSSReq_t *req;
529 EINA_LIST_FOREACH_SAFE(ugd->req_queue, l, l_next, req) {
531 DBG("Cancel req=0x%p", req);
532 if (req->is_requesting == EINA_TRUE) {
533 req->is_canceled = EINA_TRUE;
536 ugd->req_queue = eina_list_remove_list(ugd->req_queue, l);
539 __cst_print_req_queue(ugd->req_queue);
543 void _cst_add_ss_request(Eina_List **queue, int action_type, int call_type, int flavour, char *number, void *func, void *data, int waiting_time, CstUgData_t *ugd)
545 ENTER(_cst_add_ss_request);
546 ret_if(NULL == data);
547 ret_if(NULL == func);
549 CallSettingSSReq_t *req = (CallSettingSSReq_t *)malloc(sizeof(CallSettingSSReq_t));
551 req->action = action_type;
552 req->original_state = EINA_FALSE;
553 req->call_type = call_type;
554 req->flavour = flavour;
557 req->waiting_time = waiting_time;
559 snprintf(req->number, CST_MAX_PHONE_NUMBER_LEN, "%s", number);
562 DBG("Add req=0x%p", req);
563 req->is_canceled = EINA_FALSE;
564 req->is_requesting = EINA_FALSE;
566 *queue = eina_list_append(*queue, req);
567 cnt = eina_list_count(*queue);
568 DBG("req count=%d", cnt);
570 __cst_send_ss_req_to_telephony_server(req);
575 static void __cst_remove_ss_request(void *data)
577 ENTER(__cst_remove_ss_request);
578 CstUgData_t *ugd = (CstUgData_t *)data;
579 CallSettingSSReq_t *req;
582 ret_if(eina_list_count(ugd->req_queue) == 0);
584 first = eina_list_nth_list(ugd->req_queue, 0);
585 req = (CallSettingSSReq_t *)first->data;
586 DBG("Remove req=0x%p", req);
587 ugd->req_queue = eina_list_remove_list(ugd->req_queue, first);
590 cnt = eina_list_count(ugd->req_queue);
591 DBG("req count=%d", cnt);
594 first = eina_list_nth_list(ugd->req_queue, 0);
595 req = (CallSettingSSReq_t *)first->data;
596 __cst_send_ss_req_to_telephony_server(req);
598 __cst_print_req_queue(ugd->req_queue);
604 static void __cst_send_ss_req_to_telephony_server(CallSettingSSReq_t *req)
606 ENTER(__cst_send_ss_req_to_telephony_server);
607 TelSsForwardInfo_t cf_info;
608 TelSsBarringInfo_t cb_info;
609 TelSsWaitingInfo_t cw_info;
612 CstUgData_t *ugd = req->ugd;
615 DBG("Send req=0x%p action=%d call_type=%d flavour=%d waiting_time=%d", req, req->action, req->call_type, req->flavour, req->waiting_time);
616 req->is_requesting = EINA_TRUE;
618 memset(&cf_info, 0x0, sizeof(TelSsForwardInfo_t));
619 memset(&cb_info, 0x0, sizeof(TelSsBarringInfo_t));
620 memset(&cw_info, 0x0, sizeof(TelSsWaitingInfo_t));
622 switch (req->flavour) {
623 case CST_SSTYPE_CF_UNCONDITIONAL:
624 case CST_SSTYPE_CF_BUSY:
625 case CST_SSTYPE_CF_NO_REPLY:
626 case CST_SSTYPE_CF_NOT_REACHABLE:
627 case CST_SSTYPE_CF_ALL:
628 case CST_SSTYPE_CF_ALL_CONDITIONAL:
629 cf_info.Condition = __cst_get_tapi_cf_flavour(req->flavour);
630 cf_info.Class = __cst_get_tapi_req_ss_class(req->call_type);
631 if (req->action == CST_ACTION_QUERY) {
632 api_ret = tel_get_ss_forward_status(ugd->tapi_handle, cf_info.Class, cf_info.Condition, (tapi_response_cb)__cst_ss_forward_resp_cb, (void *)req);
634 cf_info.Mode = __cst_get_tapi_cf_mode(req->action);
635 if ((req->flavour == CST_SSTYPE_CF_NO_REPLY) && (req->waiting_time > 0)) {
636 cf_info.NoReplyConditionTimer = req->waiting_time;
638 snprintf(cf_info.szPhoneNumber, TAPI_CALL_DIALDIGIT_LEN_MAX, "%s", req->number);
639 api_ret = tel_set_ss_forward(ugd->tapi_handle, &cf_info, (tapi_response_cb)__cst_ss_forward_resp_cb, (void *)req);
642 case CST_SSTYPE_CB_OC:
643 case CST_SSTYPE_CB_OIC:
644 case CST_SSTYPE_CB_OICEH:
645 case CST_SSTYPE_CB_IC:
646 case CST_SSTYPE_CB_ICR:
647 cb_info.Type = __cst_get_tapi_cb_flavour(req->flavour);
648 cb_info.Class = __cst_get_tapi_req_ss_class(req->call_type);
650 DBG("%d <= %d <= %d calltype", TAPI_SS_CLASS_VOICE, cb_info.Class, TAPI_SS_CLASS_ALL_TELE);
651 DBG("%d <= %d <= %d type", TAPI_SS_CB_TYPE_AB, cb_info.Type, TAPI_SS_CB_TYPE_BIC_NOT_SIM);
652 if (req->action == CST_ACTION_QUERY) {
653 /*To do - add callback function*/
654 api_ret = tel_get_ss_barring_status(ugd->tapi_handle, cb_info.Class, cb_info.Type, (tapi_response_cb)__cst_ss_barring_resp_cb, (void *)req);
656 cb_info.Mode = __cst_get_tapi_cb_mode(req->action);
657 DBG("%d <= %d <= %d mode", TAPI_SS_CB_MODE_ACTIVATE, cb_info.Mode, TAPI_SS_CB_MODE_DEACTIVATE);
658 DBG("%d == %d pwd length", strnlen(cb_info.szPassword, 4), TAPI_SS_GSM_BARR_PW_LEN_MAX);
659 memcpy(cb_info.szPassword, req->number, TAPI_SS_GSM_BARR_PW_LEN_MAX);
660 api_ret = tel_set_ss_barring(ugd->tapi_handle, &cb_info, (tapi_response_cb)__cst_ss_barring_resp_cb, (void *)req);
664 cw_info.Class = __cst_get_tapi_req_ss_class(req->call_type);
665 if (req->action == CST_ACTION_QUERY) {
666 api_ret = tel_get_ss_waiting_status(ugd->tapi_handle, cw_info.Class, (tapi_response_cb)__cst_ss_waiting_resp_cb, (void *)req);
668 cw_info.Mode = __cst_get_tapi_cw_mode(req->action);
669 api_ret = tel_set_ss_waiting(ugd->tapi_handle, &cw_info, (tapi_response_cb)__cst_ss_waiting_resp_cb, (void *)req);
674 if (req->req_id != -1) {
675 req->req_id = req_id;
678 if (api_ret != TAPI_API_SUCCESS) {
679 CstGlItemData_t *item_data;
682 req->func(req->call_type, req->flavour, EINA_FALSE, NULL, CST_ERROR_INCORRECT_OPERATION, req->action, req->data, req->waiting_time);
683 item_data = (CstGlItemData_t *)req->data;
684 ugd = (CstUgData_t *)item_data->ugd;
685 __cst_remove_ss_request(ugd);
687 DBG("api_ret=%d req_id=0x%p", api_ret, req_id);
693 static int __cst_get_ss_error_from_tapi_error(TelSsCause_t tapi_err)
695 ENTER(__cst_get_ss_error_from_tapi_error);
699 DBG("Error Code =%d", tapi_err);
702 case TAPI_SS_UNKNOWNSUBSCRIBER:
703 case TAPI_SS_BEARERSERVICENOTPROVISIONED:
704 case TAPI_SS_TELESERVICENOTPROVISIONED:
705 case TAPI_SS_CALLBARRED:
706 case TAPI_SS_ILLEGALSSOPERATION:
707 case TAPI_SS_ERRORSTATUS:
708 case TAPI_SS_FACILITYNOTSUPPORTED:
709 case TAPI_SS_MAXNOMPTYEXCEEDED:
710 case TAPI_SS_RESOURCESNOTAVAILABLE:
711 case TAPI_SS_PWREGISTRATIONFAILURE:
712 case TAPI_SS_SUBSCRIPTIONVIOLATION:
713 case TAPI_SS_NOTAVAILABLE:
714 case TAPI_SS_SYSTEMFAILURE:
715 case TAPI_SS_REJECTEDBYNETWORK:
716 error_code = CST_ERROR_SERVICE_UNAVAILABLE;
718 case TAPI_SS_INCOMPATIBILITY:
719 case TAPI_SS_DATAMISSING:
720 case TAPI_SS_UNEXPECTEDDATAVALUE:
721 error_code = CST_ERROR_INCORRECT_OPERATION;
723 case TAPI_SS_NEGATIVEPWCHECK:
724 error_code = CST_ERROR_INVALID_PASSWORD;
727 case TAPI_SS_NUMBEROFPWATTEMPTSVIOLATION:
728 error_code = CST_ERROR_PASSWORD_BLOCKED;
730 case TAPI_SS_REJECTEDBYUSER:
731 error_code = CST_ERROR_REJECTED_BY_NETWORK;
734 DBG("__cst_get_ss_error_from_tapi_error:undefined =0x%x", tapi_err);
735 error_code = CST_ERROR_UNKNOWN;