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*
/**
* @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*
/**
* @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*
/**
* @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*
/**
* @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*
/**
* @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*
/**
* @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*
/**
* @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*
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
/**
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);
{"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},
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);
{"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},
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);
{"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},