From: Lukasz Stanislawski Date: Thu, 15 Nov 2018 09:42:46 +0000 (+0100) Subject: smartmanager-data: fix build on Tizen 5.0 X-Git-Tag: submit/tizen/20190409.085310~1^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbf9312cf3f00141ed719575bf7dd5df64ece688;p=profile%2Fmobile%2Fapps%2Fnative%2Fsettings.git smartmanager-data: fix build on Tizen 5.0 Change-Id: I828e2575626ec0d2e15d614faa4f60fabd9b48b1 --- diff --git a/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c b/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c index b095b12a..884ad4f9 100644 --- a/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c +++ b/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c @@ -249,7 +249,7 @@ static void create_toast_popup(Evas_Object *parent, char *text) } static stc_callback_ret_e _get_and_unset_limit_restrictions_cb( - stc_error_e result, stc_restriction_info_h info, void *user_data) + stc_error_e result, stc_restriction_rule_h info, void *user_data) { int ret = STC_ERROR_NONE; char *app_id = NULL; @@ -257,7 +257,6 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb( int64_t limit = 0; int64_t warning_limit = 0; stc_iface_type_e iface_type = STC_IFACE_UNKNOWN; - stc_restriction_status_e status = STC_RESTRICTION_UNKNOWN; stc_restriction_rule_h rule = NULL; restrictions_result restrictions_res = RESTRICTIONS_ERROR; SmartMgrData *smd = (SmartMgrData *)user_data; @@ -269,7 +268,7 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb( return STC_CALLBACK_CONTINUE; } - ret = stc_restriction_info_get_app_id(info, &app_id); + ret = stc_restriction_rule_get_app_id(info, &app_id); if (STC_ERROR_NONE != ret || !app_id || strcmp("TOTAL_DATACALL", app_id)) { free(app_id); return STC_CALLBACK_CONTINUE; @@ -277,16 +276,9 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb( free(app_id); - ret = stc_restriction_info_get_status(info, &status); + ret = stc_restriction_rule_get_iface_type(info, &iface_type); if (STC_ERROR_NONE != ret) { - SETTING_TRACE_ERROR("stc_restriction_info_get_status error: %s", - get_error_message(ret)); - return STC_CALLBACK_CONTINUE; - } - - ret = stc_restriction_info_get_iface_type(info, &iface_type); - if (STC_ERROR_NONE != ret) { - SETTING_TRACE_ERROR("stc_restriction_info_get_iface_type error: %s", + SETTING_TRACE_ERROR("stc_restriction_rule_get_iface_type error: %s", get_error_message(ret)); return STC_CALLBACK_CONTINUE; } @@ -294,27 +286,27 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb( if (iface_type != STC_IFACE_DATACALL) return STC_CALLBACK_CONTINUE; - ret = stc_restriction_info_get_subscriber_id(info, &subscriber_id); + ret = stc_restriction_rule_get_subscriber_id(info, &subscriber_id); if (STC_ERROR_NONE != ret) { - SETTING_TRACE_ERROR("stc_restriction_info_get_subscriber_id error: %s", + SETTING_TRACE_ERROR("stc_restriction_rule_get_subscriber_id error: %s", get_error_message(ret)); return STC_CALLBACK_CONTINUE; } if (compare_subscriber_ids(smd->selected_sim_subscriber_id, subscriber_id)) { - ret = stc_restriction_info_get_limit(info, &limit); + ret = stc_restriction_rule_get_limit(info, &limit); if (STC_ERROR_NONE != ret) { - SETTING_TRACE_ERROR("stc_restriction_info_get_limit() error: %s", + SETTING_TRACE_ERROR("stc_restriction_rule_get_limit() error: %s", get_error_message(ret)); free(subscriber_id); return STC_CALLBACK_CONTINUE; } - ret = stc_restriction_info_get_warning_limit(info, &warning_limit); + ret = stc_restriction_rule_get_warning_limit(info, &warning_limit); if (STC_ERROR_NONE != ret) { SETTING_TRACE_ERROR( - "stc_restriction_info_get_warning_limit() error: %s", + "stc_restriction_rule_get_warning_limit() error: %s", get_error_message(ret)); free(subscriber_id); return STC_CALLBACK_CONTINUE; @@ -1087,7 +1079,7 @@ static void _softkey_back_cb(void *data, Evas_Object *obj, void *event_info) static Eina_Bool _pop_view_cb(void *data, Elm_Object_Item *it) { SmartMgrData *smd = (SmartMgrData *)data; - retv_if(!smd, FALSE); + retv_if(!smd, EINA_FALSE); smd->selected_sim_subscriber_id = NULL; smd->selected_sim_limits = NULL; diff --git a/smartmanager-data/src/smartmanager-data.c b/smartmanager-data/src/smartmanager-data.c index 1de239fd..3f304d44 100644 --- a/smartmanager-data/src/smartmanager-data.c +++ b/smartmanager-data/src/smartmanager-data.c @@ -25,7 +25,7 @@ static stc_callback_ret_e _stc_stats_info_cb(stc_error_e result, static stc_callback_ret_e _total_stats_cb(stc_error_e result, stc_stats_info_h info, void *user_data); static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, - stc_restriction_info_h info, void *user_data); + stc_restriction_rule_h info, void *user_data); static void _initialize_cycle(Data_Limits_T *limits); static void _read_all_stat_cycles(void); @@ -641,13 +641,12 @@ static stc_callback_ret_e _total_stats_cb(stc_error_e result, } static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, - stc_restriction_info_h info, void *user_data) + stc_restriction_rule_h info, void *user_data) { int ret = STC_ERROR_NONE; char *app_id = NULL; char *subscriber_id = NULL; stc_iface_type_e iface_type = STC_IFACE_UNKNOWN; - stc_restriction_status_e status = STC_RESTRICTION_UNKNOWN; SETTING_TRACE_DEBUG("restriction cb:"); if (STC_ERROR_NONE != result) { @@ -656,7 +655,7 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, return STC_CALLBACK_CONTINUE; } - (void)stc_restriction_info_get_app_id(info, &app_id); + (void)stc_restriction_rule_get_app_id(info, &app_id); if (!app_id || (strcmp("TOTAL_DATACALL", app_id) && strcmp("TOTAL_WIFI", app_id))) { free(app_id); @@ -665,32 +664,25 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, SETTING_TRACE_DEBUG("Obtaining restrictions for: %s", app_id); free(app_id); - ret = stc_restriction_info_get_status(info, &status); - if (STC_ERROR_NONE != ret) { - SETTING_TRACE_ERROR("stc_restriction_info_get_status error: %s", - get_error_message(ret)); - return STC_CALLBACK_CONTINUE; - } - - (void)stc_restriction_info_get_iface_type(info, &iface_type); + (void)stc_restriction_rule_get_iface_type(info, &iface_type); SETTING_TRACE_DEBUG("Obtained iface: %d", iface_type); if (iface_type == STC_IFACE_DATACALL) { - ret = stc_restriction_info_get_subscriber_id(info, &subscriber_id); + ret = stc_restriction_rule_get_subscriber_id(info, &subscriber_id); if (STC_ERROR_NONE == ret) { SETTING_TRACE_DEBUG("Obtained Subscriber ID: %s", subscriber_id); if (compare_subscriber_ids(ad.subscriber_id_1, subscriber_id)) { - (void)stc_restriction_info_get_limit(info, + (void)stc_restriction_rule_get_limit(info, &(ad.sim_1_limits.limit)); - (void)stc_restriction_info_get_warning_limit(info, + (void)stc_restriction_rule_get_warning_limit(info, &(ad.sim_1_limits.warning)); ad.main_view_update_type = MV_UPDATE_SIM_1_WARN_N_LIMIT; } if (compare_subscriber_ids(ad.subscriber_id_2, subscriber_id)) { - (void)stc_restriction_info_get_limit(info, + (void)stc_restriction_rule_get_limit(info, &(ad.sim_2_limits.limit)); - (void)stc_restriction_info_get_warning_limit(info, + (void)stc_restriction_rule_get_warning_limit(info, &(ad.sim_2_limits.warning)); ad.main_view_update_type = MV_UPDATE_SIM_2_WARN_N_LIMIT; } @@ -703,9 +695,9 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, } if (iface_type == STC_IFACE_WIFI) { - (void)stc_restriction_info_get_limit(info, + (void)stc_restriction_rule_get_limit(info, &(ad.wifi_limits.limit)); - (void)stc_restriction_info_get_warning_limit(info, + (void)stc_restriction_rule_get_warning_limit(info, &(ad.wifi_limits.warning)); ad.main_view_update_type = MV_UPDATE_WIFI_WARN_N_LIMIT; setting_view_update(ad.main_view, &ad); diff --git a/smartmanager-data/src/smartmanager-utils.c b/smartmanager-data/src/smartmanager-utils.c index 66b33e6b..b8a9d984 100644 --- a/smartmanager-data/src/smartmanager-utils.c +++ b/smartmanager-data/src/smartmanager-utils.c @@ -20,7 +20,7 @@ static bool _get_total_stats(stc_h stc, stc_iface_type_e iface_type, stc_stats_info_cb stats_cb, void *cb_data, time_t t_from, time_t t_to); static bool _get_restrictions(stc_h stc, stc_iface_type_e iface_type, - stc_restriction_info_cb restrictions_cb, + stc_restriction_rule_cb restrictions_cb, void *restriction_info_cb_data); int get_days_in_current_month() @@ -170,12 +170,12 @@ bool get_wifi_apps_list(stc_h stc, stc_stats_info_cb stats_cb, time_t t_from, NULL, t_from, t_to); } -bool get_sim_restrictions(stc_h stc, stc_restriction_info_cb restrictions_cb) +bool get_sim_restrictions(stc_h stc, stc_restriction_rule_cb restrictions_cb) { return _get_restrictions(stc, STC_IFACE_DATACALL, restrictions_cb, NULL); } -bool get_wifi_restrictions(stc_h stc, stc_restriction_info_cb restrictions_cb) +bool get_wifi_restrictions(stc_h stc, stc_restriction_rule_cb restrictions_cb) { return _get_restrictions(stc, STC_IFACE_WIFI, restrictions_cb, NULL); } @@ -278,7 +278,7 @@ static bool _get_total_stats(stc_h stc, stc_iface_type_e iface_type, } static bool _get_restrictions(stc_h stc, stc_iface_type_e iface_type, - stc_restriction_info_cb restrictions_cb, + stc_restriction_rule_cb restrictions_cb, void *restriction_info_cb_data) { int ret = STC_ERROR_NONE; @@ -439,7 +439,7 @@ restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, } bool unset_mobile_limit_restrictions(stc_h stc_handle, - stc_restriction_info_cb _get_and_unset_limit_restrictions_cb, void *data) + stc_restriction_rule_cb _get_and_unset_limit_restrictions_cb, void *data) { return _get_restrictions(stc_handle, STC_IFACE_DATACALL, _get_and_unset_limit_restrictions_cb, data);