From: sinikang Date: Wed, 20 Sep 2017 07:02:18 +0000 (+0900) Subject: Add test menu for telephony_sim_get_subscriber_id() X-Git-Tag: submit/tizen/20170920.092413^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd1a9e8644a8a21558e1034a13808adb9c77215e;p=platform%2Fcore%2Fapi%2Ftelephony.git Add test menu for telephony_sim_get_subscriber_id() Change-Id: Ia071d90e607ca219ff835de7d757d4cc118ab9df --- diff --git a/packaging/capi-telephony.spec b/packaging/capi-telephony.spec index 29fd78d..98deba8 100644 --- a/packaging/capi-telephony.spec +++ b/packaging/capi-telephony.spec @@ -1,6 +1,6 @@ Name: capi-telephony Summary: Telephony Core API -Version: 0.1.77 +Version: 0.1.78 Release: 1 Group: System/Libraries License: Apache-2.0 diff --git a/test_src/sim.c b/test_src/sim.c index 92268a7..3100d07 100644 --- a/test_src/sim.c +++ b/test_src/sim.c @@ -235,6 +235,25 @@ static int run_sim_get_subs_number(MManager *mm, struct menu_data *menu) return 0; } +static int run_sim_get_subs_id(MManager *mm, struct menu_data *menu) +{ + telephony_handle_list_s *handle_list = menu_manager_ref_user_data(mm); + int ret; + char *subs_id; + + msg("call telephony_sim_get_subscriber_id()"); + + ret = telephony_sim_get_subscriber_id(handle_list->handle[subs_type], &subs_id); + if (ret != TELEPHONY_ERROR_NONE) { + msg("telephony_sim_get_subscriber_id() failed!!! (ret:%d,%s)", ret, get_error_message(ret)); + return 0; + } + + msg(" - subscriber_id = %s", subs_id); + + return 0; +} + static int run_sim_get_lock_state(MManager *mm, struct menu_data *menu) { telephony_handle_list_s *handle_list = menu_manager_ref_user_data(mm); @@ -301,9 +320,10 @@ struct menu_data menu_sim[] = { {"6", "telephony_sim_get_state", NULL, run_sim_get_state, NULL}, {"7", "telephony_sim_get_application_list", NULL, run_sim_get_app_list, NULL}, {"8", "telephony_sim_get_subscriber_number", NULL, run_sim_get_subs_number, NULL}, - {"9", "telephony_sim_get_lock_state", NULL, run_sim_get_lock_state, NULL}, - {"10", "telephony_sim_get_group_id1", NULL, run_sim_get_group_id1, NULL}, - {"11", "telephony_sim_get_call_forwarding_indicator_state", NULL, run_sim_get_call_forward_ind_state, NULL}, + {"9", "telephony_sim_get_subscriber_id", NULL, run_sim_get_subs_id, NULL}, + {"10", "telephony_sim_get_lock_state", NULL, run_sim_get_lock_state, NULL}, + {"11", "telephony_sim_get_group_id1", NULL, run_sim_get_group_id1, NULL}, + {"12", "telephony_sim_get_call_forwarding_indicator_state", NULL, run_sim_get_call_forward_ind_state, NULL}, {NULL, }, };