* @{
*/
-#ifndef TIZEN_ERROR_STC
-#define TIZEN_ERROR_STC -0x02F80000
-#endif
-
/**
* @brief Enumeration for Smart Traffic Control (STC) error type.
* @since_tizen 4.0
/**
* @brief Called for each available statistics information.
+ * @details One of the following errors is delivered as a result.
+ * #STC_ERROR_NONE Successful \n
+ * #STC_ERROR_INVALID_OPERATION No reply \n
+ * #STC_ERROR_OPERATION_FAILED Operation failed \n
+ * #STC_ERROR_PERMISSION_DENIED Access or permission denied
* @since_tizen 4.0
*
- * @param[in] result The result, one of:\n
- * #STC_ERROR_INVALID_OPERATION No reply\n
- * #STC_ERROR_OPERATION_FAILED Operation failed\n
- * #STC_ERROR_PERMISSION_DENIED Access or permission denied
+ * @param[in] result The result of statistics information getting
* @param[in] info The statistics information handle
* @param[in] user_data The user data passed from the statistics provider function
* @return #STC_CALLBACK_CONTINUE to continue with the next iteration of the loop,
* @see stc_stats_info_get_protocol_type()
* @see stc_stats_info_get_process_state()
* @see stc_get_stats()
- * @see stc_foreach_stats()
* @see stc_get_total_stats()
*/
typedef stc_callback_ret_e (*stc_stats_info_cb)(
stc_error_e result, stc_stats_info_h info, void *user_data);
/**
- * @brief Called when statistics getting is finished.
- * @since_tizen 5.5
- *
- * @param[in] result The result, one of:\n
+ * @brief Called when gathering statistics is completed.
+ * @details One of the following errors is delivered as a result.
* #STC_ERROR_NONE Successful \n
* #STC_ERROR_INVALID_OPERATION No reply \n
* #STC_ERROR_OPERATION_FAILED Operation failed \n
* #STC_ERROR_PERMISSION_DENIED Access or permission denied
+ * @since_tizen 5.5
+ * @remarks @a info will be released by the platform after the callback exits.
+ *
+ * @param[in] result The result of statistics gathering completion
* @param[in] info All statistics information handle
* @param[in] user_data The user data passed from the statistics provider function
*
* @pre stc_get_all_stats() will invoke this callback.
* @see stc_get_all_stats()
*/
-typedef void (*stc_get_stats_finished_cb)(stc_error_e result,
+typedef void (*stc_get_all_stats_finished_cb)(stc_error_e result,
stc_all_stats_info_h info, void *user_data);
/**
* @since_tizen 4.0
* @privlevel public
* @privilege %http://tizen.org/privilege/network.get
- * @remarks You must release @a handle using stc_deinitialize().
+ * @remarks You must release @a stc using stc_deinitialize().
*
* @param[out] stc The STC handle
*
* @see stc_stats_rule_get_iface_type()
* @see stc_stats_rule_get_time_period()
* @see stc_stats_info_cb()
- * @see stc_foreach_stats()
* @see stc_get_total_stats()
*/
int stc_get_stats(stc_h stc, stc_stats_rule_h rule,
stc_stats_info_cb info_cb, void *user_data) TIZEN_DEPRECATED_API;
/**
- * @brief Starts to get all statistics information from rule asynchronously.
+ * @brief Gets all statistics information according to the given rule, asynchronously.
*
* @since_tizen 5.5
* @privlevel public
*
* @param[in] stc The STC handle
* @param[in] rule The statistics rule handle
- * @param[in] finished_cb The callback is called when getting is finished
+ * @param[in] finished_cb The callback is called when information gathering is completed
* @param[in] user_data The user data passed to the callback function
*
* @return 0 on success, otherwise a negative error value
* @retval #STC_ERROR_NOT_SUPPORTED Not supported
* @retval #STC_ERROR_PERMISSION_DENIED Permission denied
*
+ * @post This function invokes stc_get_all_stats_finished_cb().
* @see stc_h
* @see stc_stats_rule_h
* @see stc_initialize()
* @see stc_stats_rule_get_time_interval()
* @see stc_stats_rule_get_iface_type()
* @see stc_stats_rule_get_time_period()
- * @see stc_get_stats_finished_cb()
- * @post This function invokes stc_get_stats_finished_cb().
+ * @see stc_get_all_stats_finished_cb()
*/
int stc_get_all_stats(stc_h stc, stc_stats_rule_h rule,
- stc_get_stats_finished_cb finished_cb, void *user_data);
+ stc_get_all_stats_finished_cb finished_cb, void *user_data);
/**
- * @brief Gets the results of all getting statistics information.
+ * @brief Iterates over the results of getting all statistics information.
*
* @since_tizen 5.5
*
* @retval #STC_ERROR_NOT_INITIALIZED Not initialized
* @retval #STC_ERROR_NOT_SUPPORTED Not supported
*
+ * @pre stc_get_all_stats() needs to be called and data needs to be received
+ * in stc_get_stats_finished_cb() before calling this function.
+ * @post This function invokes stc_stats_info_cb().
* @see stc_get_all_stats()
* @see stc_stats_info_cb()
- * @pre This function needs stc_get_all_stats() before use.
- * @post This function invokes stc_stats_info_cb().
*/
int stc_foreach_all_stats(stc_all_stats_info_h info,
stc_stats_info_cb info_cb, void *user_data);
* @see stc_stats_rule_get_time_period()
* @see stc_stats_info_cb()
* @see stc_get_stats()
- * @see stc_foreach_stats()
*/
int stc_get_total_stats(stc_h stc, stc_stats_rule_h rule,
stc_stats_info_cb info_cb, void *user_data);
/**
* @brief Creates the statistics rule handle.
* @since_tizen 4.0
- * @remarks You must release @a handle using stc_stats_rule_destroy().
+ * @remarks You must release @a rule using stc_stats_rule_destroy().
*
* @param[in] stc The STC handle
* @param[out] rule The statistics rule handle
}
void _stc_callback_set_stats_info(stc_h stc,
- stc_stats_info_cb user_cb, void *user_data)
+ stc_stats_info_cb user_cb, void *user_data)
{
stc_handle_s *handle = (stc_handle_s *)stc;
}
void _stc_callback_set_stats_all_info(stc_h stc,
- stc_stats_info_cb user_cb, void *user_data)
+ stc_stats_info_cb user_cb, void *user_data)
{
stc_handle_s *handle = (stc_handle_s *)stc;
}
void _stc_callback_set_stats_get_all_info(stc_h stc,
- stc_get_stats_finished_cb user_cb, void *user_data)
+ stc_get_all_stats_finished_cb user_cb, void *user_data)
{
stc_handle_s *handle = (stc_handle_s *)stc;
}
void _stc_callback_set_stats_total_info(stc_h stc,
- stc_stats_info_cb user_cb, void *user_data)
+ stc_stats_info_cb user_cb, void *user_data)
{
stc_handle_s *handle = (stc_handle_s *)stc;