From: manoj Date: Mon, 7 Oct 2019 06:46:20 +0000 (+0530) Subject: [ITC][stc][ACR-1421][Deprecate CAPI to get statistics info] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a378b32fdd816c0efb2acbfc28ce13fbd5567138;p=test%2Ftct%2Fnative%2Fapi.git [ITC][stc][ACR-1421][Deprecate CAPI to get statistics info] Change-Id: If32cfe54b2b195e7fb0e2fe8e2f30aed7fdf6480 Signed-off-by: manoj --- diff --git a/src/itc/stc/ITs-stc.c b/src/itc/stc/ITs-stc.c index e093b6ae6..b4f3a6346 100755 --- a/src/itc/stc/ITs-stc.c +++ b/src/itc/stc/ITs-stc.c @@ -81,25 +81,9 @@ void StcGetStatsFinishedCallback(stc_error_e result, stc_all_stats_info_h info, return; } -/** -* @function StcGetStatsCallback -* @description callback for stc_get_stats -* @parameter stc_error_e -* @parameter stc_stats_info_h -* @parameter void* -* @return stc_callback_ret_e -*/ -stc_callback_ret_e StcGetStatsCallback(stc_error_e result, stc_stats_info_h info, void *user_data) -{ - g_bCallbackCalled = true; - FPRINTF("[Line : %d][%s] Callback invoked\\n", __LINE__, API_NAMESPACE); - QUIT_GMAIN_LOOP; - return STC_CALLBACK_CANCEL; -} - /** * @function StcStatsInfoGetAppIdCallback -* @description callback for stc_get_stats to het App Id +* @description callback for stc stats info to het App Id * @parameter stc_error_e * @parameter stc_stats_info_h * @parameter void* @@ -147,7 +131,7 @@ stc_callback_ret_e StcStatsInfoGetAppIdCallback(stc_error_e result, stc_stats_in /** * @function StcStatsInfoGetIfaceNameCallback -* @description callback for stc_get_stats to get Iface Name +* @description callback for stc stats info to get Iface Name * @parameter stc_error_e * @parameter stc_stats_info_h * @parameter void* @@ -195,7 +179,7 @@ stc_callback_ret_e StcStatsInfoGetIfaceNameCallback(stc_error_e result, stc_stat /** * @function StcStatsInfoGetTimeIntervalCallback -* @description callback for stc_get_stats to get Time Interval +* @description callback for stc stats info to get Time Interval * @parameter stc_error_e * @parameter stc_stats_info_h * @parameter void* @@ -236,7 +220,7 @@ stc_callback_ret_e StcStatsInfoGetTimeIntervalCallback(stc_error_e result, stc_s /** * @function StcStatsInfoGetIfaceTypeCallback -* @description callback for stc_get_stats to get Iface Type +* @description callback for stc stats info to get Iface Type * @parameter stc_error_e * @parameter stc_stats_info_h * @parameter void* @@ -275,7 +259,7 @@ stc_callback_ret_e StcStatsInfoGetIfaceTypeCallback(stc_error_e result, stc_stat /** * @function StcStatsInfoGetCounterCallback -* @description callback for stc_get_stats to get Counter +* @description callback for stc stats info to get Counter * @parameter stc_error_e * @parameter stc_stats_info_h * @parameter void* @@ -316,7 +300,7 @@ stc_callback_ret_e StcStatsInfoGetCounterCallback(stc_error_e result, stc_stats_ /** * @function StcStatsInfoGetRoamingTypeCallback -* @description callback for stc_get_stats to get Roamimng Type +* @description callback for stc stats info to get Roamimng Type * @parameter stc_error_e * @parameter stc_stats_info_h * @parameter void* @@ -355,7 +339,7 @@ stc_callback_ret_e StcStatsInfoGetRoamingTypeCallback(stc_error_e result, stc_st /** * @function StcStatsInfoGetProtocolTypeCallback -* @description callback for stc_get_stats to get protocol type +* @description callback for stc stats info to get protocol type * @parameter stc_error_e * @parameter stc_stats_info_h * @parameter void* @@ -394,7 +378,7 @@ stc_callback_ret_e StcStatsInfoGetProtocolTypeCallback(stc_error_e result, stc_s /** * @function StcStatsInfoGetProcessStateCallback -* @description callback for stc_get_stats to get process state +* @description callback for stc stats info to get process state * @parameter stc_error_e * @parameter stc_stats_info_h * @parameter void* @@ -997,54 +981,6 @@ int ITs_stc_get_all_stats_p(void) return 0; } -//& purpose Gets the statistics information an application matched rule asynchronously -//& type: auto -/** -* @testcase ITs_stc_get_stats_p -* @since_tizen 4.0 -* @author SRID(manmohan.k) -* @reviewer SRID(shobhit.v) -* @type auto -* @description Gets the statistics information an application matched rule asynchronously -* @scenario Sets callback for statistics info API \n -* @scenario Check for callback invocation \n -* @apicovered stc_get_stats -* @passcase If callback gets called successfully -* @failcase If fails to called callback -* @precondition NA -* @postcondition NA -*/ -int ITs_stc_get_stats_p(void) -{ - START_TEST; - - time_t from, to; - - from = StcMakeTime(STC_YEAR, STC_MONTH, STC_DAY, STC_HOUR, STC_MIN); - time(&to); - - int nRet = stc_stats_rule_set_time_interval(g_hRule, from, to); - PRINT_RESULT(STC_ERROR_NONE, nRet, "stc_stats_rule_set_time_interval", StcGetError(nRet)); - - nRet = stc_stats_rule_set_app_id(g_hRule, STC_ALL_APP); - PRINT_RESULT(STC_ERROR_NONE, nRet, "stc_stats_rule_set_app_id", StcGetError(nRet)); - - g_bCallbackCalled = false; - - nRet = stc_get_stats(g_hSTC, g_hRule, StcGetStatsCallback, (void *)STATS_INFO_IFACE_NAME); - PRINT_RESULT(STC_ERROR_NONE, nRet, "stc_get_stats", StcGetError(nRet)); - - RUN_GMAIN_LOOP; - - if(g_bCallbackCalled == false) - { - FPRINTF("[Line : %d][%s] Callback not invoked for %s\\n", __LINE__, API_NAMESPACE, "stc_get_stats"); - return 1; - } - - return 0; -} - //& purpose Gets the application ID from statistics information //& type: auto /** diff --git a/src/itc/stc/tct-stc-native_mobile.h b/src/itc/stc/tct-stc-native_mobile.h index a9d0cda0e..6c245efe3 100755 --- a/src/itc/stc/tct-stc-native_mobile.h +++ b/src/itc/stc/tct-stc-native_mobile.h @@ -29,7 +29,6 @@ extern int ITs_stc_stats_rule_set_get_time_interval_p(void); extern int ITs_stc_stats_rule_set_get_iface_type_p(void); extern int ITs_stc_stats_rule_set_get_time_period_p(void); extern int ITs_stc_foreach_all_stats_p(void); -extern int ITs_stc_get_stats_p(void); extern int ITs_stc_stats_info_get_app_id_p(void); extern int ITs_stc_stats_info_get_iface_name_p(void); extern int ITs_stc_stats_info_get_time_interval_p(void); @@ -49,7 +48,6 @@ testcase tc_array[] = { {"ITs_stc_stats_rule_set_get_iface_type_p",ITs_stc_stats_rule_set_get_iface_type_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_rule_set_get_time_period_p",ITs_stc_stats_rule_set_get_time_period_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_foreach_all_stats_p",ITs_stc_foreach_all_stats_p,ITs_stc_startup,ITs_stc_cleanup}, - {"ITs_stc_get_stats_p",ITs_stc_get_stats_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_app_id_p",ITs_stc_stats_info_get_app_id_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_iface_name_p",ITs_stc_stats_info_get_iface_name_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_time_interval_p",ITs_stc_stats_info_get_time_interval_p,ITs_stc_startup,ITs_stc_cleanup}, diff --git a/src/itc/stc/tct-stc-native_tizeniot.h b/src/itc/stc/tct-stc-native_tizeniot.h index a9d0cda0e..6c245efe3 100755 --- a/src/itc/stc/tct-stc-native_tizeniot.h +++ b/src/itc/stc/tct-stc-native_tizeniot.h @@ -29,7 +29,6 @@ extern int ITs_stc_stats_rule_set_get_time_interval_p(void); extern int ITs_stc_stats_rule_set_get_iface_type_p(void); extern int ITs_stc_stats_rule_set_get_time_period_p(void); extern int ITs_stc_foreach_all_stats_p(void); -extern int ITs_stc_get_stats_p(void); extern int ITs_stc_stats_info_get_app_id_p(void); extern int ITs_stc_stats_info_get_iface_name_p(void); extern int ITs_stc_stats_info_get_time_interval_p(void); @@ -49,7 +48,6 @@ testcase tc_array[] = { {"ITs_stc_stats_rule_set_get_iface_type_p",ITs_stc_stats_rule_set_get_iface_type_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_rule_set_get_time_period_p",ITs_stc_stats_rule_set_get_time_period_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_foreach_all_stats_p",ITs_stc_foreach_all_stats_p,ITs_stc_startup,ITs_stc_cleanup}, - {"ITs_stc_get_stats_p",ITs_stc_get_stats_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_app_id_p",ITs_stc_stats_info_get_app_id_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_iface_name_p",ITs_stc_stats_info_get_iface_name_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_time_interval_p",ITs_stc_stats_info_get_time_interval_p,ITs_stc_startup,ITs_stc_cleanup}, diff --git a/src/itc/stc/tct-stc-native_wearable.h b/src/itc/stc/tct-stc-native_wearable.h index a9d0cda0e..6c245efe3 100755 --- a/src/itc/stc/tct-stc-native_wearable.h +++ b/src/itc/stc/tct-stc-native_wearable.h @@ -29,7 +29,6 @@ extern int ITs_stc_stats_rule_set_get_time_interval_p(void); extern int ITs_stc_stats_rule_set_get_iface_type_p(void); extern int ITs_stc_stats_rule_set_get_time_period_p(void); extern int ITs_stc_foreach_all_stats_p(void); -extern int ITs_stc_get_stats_p(void); extern int ITs_stc_stats_info_get_app_id_p(void); extern int ITs_stc_stats_info_get_iface_name_p(void); extern int ITs_stc_stats_info_get_time_interval_p(void); @@ -49,7 +48,6 @@ testcase tc_array[] = { {"ITs_stc_stats_rule_set_get_iface_type_p",ITs_stc_stats_rule_set_get_iface_type_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_rule_set_get_time_period_p",ITs_stc_stats_rule_set_get_time_period_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_foreach_all_stats_p",ITs_stc_foreach_all_stats_p,ITs_stc_startup,ITs_stc_cleanup}, - {"ITs_stc_get_stats_p",ITs_stc_get_stats_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_app_id_p",ITs_stc_stats_info_get_app_id_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_iface_name_p",ITs_stc_stats_info_get_iface_name_p,ITs_stc_startup,ITs_stc_cleanup}, {"ITs_stc_stats_info_get_time_interval_p",ITs_stc_stats_info_get_time_interval_p,ITs_stc_startup,ITs_stc_cleanup},