return STC_CALLBACK_CANCEL;
}
-/**
-* @function StcGetTotalStatsCallback
-* @description callback for stc_get_total_stats
-* @parameter stc_error_e
-* @parameter stc_stats_info_h
-* @parameter void*
-* @return stc_callback_ret_e
-*/
-stc_callback_ret_e StcGetTotalStatsCallback(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 StcGetStatsCallback
* @description callback for stc_get_stats
return 0;
}
-//& purpose Gets the total statistics information by interface type asynchronously
-//& type: auto
-/**
-* @testcase ITs_stc_foreach_stats_p
-* @since_tizen 4.0
-* @author SRID(manmohan.k)
-* @reviewer SRID(shobhit.v)
-* @type auto
-* @description Gets the total statistics information by interface type asynchronously
-* @scenario Sets callback for statistics info API \n
-* @scenario Check for callback invocation \n
-* @apicovered stc_get_total_stats
-* @passcase If callback gets called successfully
-* @failcase If fails to called callback
-* @precondition NA
-* @postcondition NA
-*/
-int ITs_stc_get_total_stats_p(void)
-{
- START_TEST;
-
- time_t from, to;
- from = StcMakeTime(2000, 1, 1, 1, 1);
- 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));
-
- g_bCallbackCalled = false;
-
- nRet = stc_get_total_stats(g_hSTC, g_hRule, StcGetTotalStatsCallback, NULL);
- PRINT_RESULT(STC_ERROR_NONE, nRet, "stc_get_total_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_total_stats");
- return 1;
- }
-
- return 0;
-}
-
//& purpose Gets the statistics information an application matched rule asynchronously
//& type: auto
/**
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_stats_p(void);
-extern int ITs_stc_get_total_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);
{"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_stats_p",ITs_stc_foreach_stats_p,ITs_stc_startup,ITs_stc_cleanup},
- {"ITs_stc_get_total_stats_p",ITs_stc_get_total_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},
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_stats_p(void);
-extern int ITs_stc_get_total_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);
{"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_stats_p",ITs_stc_foreach_stats_p,ITs_stc_startup,ITs_stc_cleanup},
- {"ITs_stc_get_total_stats_p",ITs_stc_get_total_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},
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_stats_p(void);
-extern int ITs_stc_get_total_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);
{"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_stats_p",ITs_stc_foreach_stats_p,ITs_stc_startup,ITs_stc_cleanup},
- {"ITs_stc_get_total_stats_p",ITs_stc_get_total_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},