Update API description 99/317699/1
authorhyunuk.tak <hyunuk.tak@samsung.com>
Fri, 13 Sep 2024 06:03:20 +0000 (15:03 +0900)
committerhyunuk.tak <hyunuk.tak@samsung.com>
Fri, 13 Sep 2024 06:03:23 +0000 (15:03 +0900)
Change-Id: I7c41f07567ecc0a32d0c00ee3b1cf61ab9218633
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
include/stc.h

index 81805a3edc459d471aeb4df14d17d05348805fa9..2208d88f62b5e1653d5274c201613f89aec45057 100755 (executable)
@@ -282,6 +282,9 @@ typedef void (*stc_get_all_stats_finished_cb)(stc_error_e result,
 
 /**
  * @brief Initializes STC (Smart Traffic Control).
+ * @details This function initializes the Smart Traffic
+ *   Control (STC) handle and prepares it for use. It is mandatory
+ *   to call this function before using any other STC functions.
  * @since_tizen 4.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/network.get
@@ -305,6 +308,9 @@ int stc_initialize(stc_h *stc);
 
 /**
  * @brief Deinitializes STC.
+ * @details This function releases the resources associated
+ *   with the given STC handle. It should be called after all STC
+ *   operations are completed to clean up the system resources.
  * @since_tizen 4.0
  *
  * @param[in] stc The STC handle
@@ -422,6 +428,11 @@ int stc_foreach_stats(stc_h stc, stc_stats_rule_h rule,
 
 /**
  * @brief Starts to get statistical information based on the rules asynchronously.
+ * @details This function initiates the process of gathering
+ *   statistical information based on the specified rules. It runs
+ *   in an asynchronous manner, meaning that the function returns
+ *   immediately and the results are provided later via the
+ *   callback function.
  *
  * @since_tizen 5.5
  * @privlevel public
@@ -462,6 +473,11 @@ int stc_get_all_stats(stc_h stc, stc_stats_rule_h rule,
 
 /**
  * @brief Gets all statistical information.
+ * @details This function retrieves all statistical
+ *    information stored in the given handle and iterates over each
+ *    entry, invoking the provided callback function for each item.
+ *    The callback function can then process the individual
+ *    statistics as needed.
  *
  * @since_tizen 5.5
  *
@@ -538,6 +554,11 @@ int stc_get_total_stats(stc_h stc, stc_stats_rule_h rule,
 
 /**
  * @brief Creates the statistics rule handle.
+ * @details This function creates a new statistics rule handle
+ *    which can be used to specify criteria for gathering
+ *    statistical information. The handle is initially empty and
+ *    must be configured with the desired rules before being used
+ *    with other STC functions.
  * @since_tizen 4.0
  * @remarks You must release @a rule using stc_stats_rule_destroy().
  *
@@ -562,6 +583,10 @@ int stc_stats_rule_create(stc_h stc, stc_stats_rule_h *rule);
 
 /**
  * @brief Destroys the statistics rule handle.
+ * @details This function releases the resources associated
+ *    with the given statistics rule handle. It should be called
+ *    after the handle is no longer needed to clean up the system
+ *    resources.
  * @since_tizen 4.0
  *
  * @param[in] rule          The statistics rule handle
@@ -582,6 +607,10 @@ int stc_stats_rule_destroy(stc_stats_rule_h rule);
 
 /**
  * @brief Sets the application ID for statistics rule.
+ * @details This function sets the application ID for the
+ *    given statistics rule handle. The application ID specifies
+ *    which application's traffic statistics should be gathered
+ *    according to the rule.
  * @since_tizen 4.0
  *
  * @param[in] rule          The statistics rule handle
@@ -606,6 +635,10 @@ int stc_stats_rule_set_app_id(stc_stats_rule_h rule,
 
 /**
  * @brief Sets the time interval for statistics rule.
+ * @details This function sets the time interval for the given
+ *    statistics rule handle. The time interval specifies the range
+ *    of time during which the traffic statistics should be gathered
+ *    according to the rule.
  * @since_tizen 4.0
  *
  * @param[in] rule          The statistics rule handle
@@ -631,6 +664,10 @@ int stc_stats_rule_set_time_interval(stc_stats_rule_h rule,
 
 /**
  * @brief Sets the interface type for statistics rule.
+ * @details This function sets the interface type for the
+ *    given statistics rule handle. The interface type specifies
+ *    which network interfaces' traffic statistics should be
+ *    gathered according to the rule.
  * @since_tizen 4.0
  *
  * @param[in] rule          The stats rule handle
@@ -656,6 +693,10 @@ int stc_stats_rule_set_iface_type(stc_stats_rule_h rule,
 
 /**
  * @brief Sets the time period for statistics rule.
+ * @details This function sets the time period for the given
+ *    statistics rule handle. The time period specifies the
+ *    frequency at which the traffic statistics should be gathered
+ *    according to the rule.
  * @since_tizen 4.0
  *
  * @param[in] rule          The statistics rule handle
@@ -681,6 +722,10 @@ int stc_stats_rule_set_time_period(stc_stats_rule_h rule,
 
 /**
  * @brief Gets the application ID for statistics rule.
+ * @details This function retrieves the application ID that
+ *    has been set for the given statistics rule handle. The
+ *    application ID specifies which application's traffic
+ *    statistics should be gathered according to the rule.
  * @since_tizen 4.0
  * @remarks You must release @a app_id using free().
  *
@@ -730,6 +775,10 @@ int stc_stats_rule_get_time_interval(stc_stats_rule_h rule,
 
 /**
  * @brief Gets the interface type for statistics rule.
+ * @details This function retrieves the interface type that
+ *    has been set for the given statistics rule handle. The
+ *    interface type specifies which network interfaces' traffic
+ *    statistics should be gathered according to the rule.
  * @since_tizen 4.0
  *
  * @param[in] rule          The statistics rule handle
@@ -755,6 +804,10 @@ int stc_stats_rule_get_iface_type(stc_stats_rule_h rule,
 
 /**
  * @brief Gets the time period for statistics rule.
+ * @details This function retrieves the time period that has been
+ *    set for the given statistics rule handle. The time period
+ *    specifies the frequency at which the traffic statistics should
+ *    be gathered according to the rule.
  * @since_tizen 4.0
  *
  * @param[in] rule          The statistics rule handle
@@ -780,6 +833,9 @@ int stc_stats_rule_get_time_period(stc_stats_rule_h rule,
 
 /**
  * @brief Clones the statistics info handle.
+ * @details This function creates a new statistics info handle
+ *    that is a copy of the original statistics info handle. The
+ *    cloned handle can be used independently of the original handle.
  * @since_tizen 5.5
  * @remarks You must release @a cloned using stc_stats_info_destroy().
  *
@@ -801,6 +857,9 @@ int stc_stats_info_clone(stc_stats_info_h info, stc_stats_info_h *cloned);
 
 /**
  * @brief Destroys the statistics info handle.
+ * @details This function releases all resources allocated for
+ *    the given statistics info handle. After calling this function,
+ *    the handle becomes invalid and cannot be used further.
  * @since_tizen 5.5
  *
  * @param[in] info          The statistics info handle
@@ -817,6 +876,10 @@ int stc_stats_info_destroy(stc_stats_info_h info);
 
 /**
  * @brief Gets the application ID from statistics information.
+ * @details This function retrieves the application ID that
+ *    corresponds to the given statistics information handle. The
+ *    application ID indicates which application's traffic
+ *    statistics are contained within the handle.
  * @since_tizen 4.0
  * @remarks You must release @a app_id using free().
  *
@@ -839,6 +902,10 @@ int stc_stats_info_get_app_id(stc_stats_info_h info, char **app_id);
 
 /**
  * @brief Gets the interface name from statistics information.
+ * @details This function retrieves the interface name that
+ *    corresponds to the given statistics information handle. The
+ *    interface name indicates which network interface's traffic
+ *    statistics are contained within the handle.
  * @since_tizen 4.0
  * @remarks You must release @a iface_name using free().
  *
@@ -861,6 +928,10 @@ int stc_stats_info_get_iface_name(stc_stats_info_h info, char **iface_name);
 
 /**
  * @brief Gets the time interval from statistics information.
+ * @details This function retrieves the time interval that
+ *    corresponds to the given statistics information handle. The
+ *    time interval indicates the range of time during which the
+ *    traffic statistics were gathered.
  * @since_tizen 4.0
  *
  * @param[in] info          The statistics information handle
@@ -884,6 +955,10 @@ int stc_stats_info_get_time_interval(stc_stats_info_h info,
 
 /**
  * @brief Gets the interface type from statistics information.
+ * @details This function retrieves the interface type that
+ *    corresponds to the given statistics information handle. The
+ *    interface type indicates the type of network interface whose
+ *    traffic statistics are contained within the handle.
  * @since_tizen 4.0
  *
  * @param[in] info          The statistics information handle
@@ -907,6 +982,11 @@ int stc_stats_info_get_iface_type(stc_stats_info_h info,
 
 /**
  * @brief Gets the counters from statistics information.
+ * @details This function retrieves the traffic counters that
+ *    correspond to the given statistics information handle. The
+ *    traffic counters indicate the amount of data transmitted and
+ *    received over the network interface during the specified time
+ *    interval.
  * @since_tizen 4.0
  *
  * @param[in] info          The statistics information handle
@@ -930,6 +1010,11 @@ int stc_stats_info_get_counter(stc_stats_info_h info,
 
 /**
  * @brief Gets the roaming type from statistics information.
+ * @details This function retrieves the roaming type that
+ *    corresponds to the given statistics information handle. The
+ *    roaming type indicates whether the traffic statistics were
+ *    gathered while the device was connected to a cellular network
+ *    or not.
  * @since_tizen 4.0
  *
  * @param[in] info          The statistics information handle
@@ -953,6 +1038,10 @@ int stc_stats_info_get_roaming_type(stc_stats_info_h info,
 
 /**
  * @brief Gets the protocol type from statistics information.
+ * @details This function retrieves the protocol type that
+ *    corresponds to the given statistics information handle. The
+ *    protocol type indicates the specific network protocol whose
+ *    traffic statistics are contained within the handle.
  * @since_tizen 4.0
  *
  * @param[in] info          The statistics information handle
@@ -976,6 +1065,10 @@ int stc_stats_info_get_protocol_type(stc_stats_info_h info,
 
 /**
  * @brief Gets the process state from statistics information.
+ * @details This function retrieves the process state that
+ *    corresponds to the given statistics information handle. The
+ *    process state indicates the current status of the application
+ *    whose traffic statistics are contained within the handle.
  * @since_tizen 4.0
  *
  * @param[in] info          The statistics information handle