Revert "Add some APIs to clone and destroy statistics info" 43/200443/1
authorJaehyun Kim <jeik01.kim@samsung.com>
Mon, 25 Feb 2019 06:43:49 +0000 (06:43 +0000)
committerJaehyun Kim <jeik01.kim@samsung.com>
Mon, 25 Feb 2019 06:43:49 +0000 (06:43 +0000)
This reverts commit 1c180f38d95990fe85cb4f8754c093fdcb12945a.

Change-Id: Ide0c0bdbd53d282a7765edcc4b762346cf48809b

include/stc.h
src/stc-info.c

index 0b84c17d10f00a419d2d480dab43d4596297b7ab..7cd58c5239842949d7a1a48d167d26d96bdfc3e7 100755 (executable)
@@ -696,43 +696,6 @@ int stc_stats_rule_get_iface_type(stc_stats_rule_h rule,
 int stc_stats_rule_get_time_period(stc_stats_rule_h rule,
                stc_time_period_e *time_period);
 
-/**
- * @brief Clones the statistics info handle.
- * @since_tizen 5.5
- * @remarks You must release @a cloned using stc_stats_info_destroy().
- *
- * @param[in] info            The origin statistics info handle
- * @param[out] cloned         The cloned statistics info handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #STC_ERROR_NONE                    Successful
- * @retval #STC_ERROR_OUT_OF_MEMORY           Out of memory
- * @retval #STC_ERROR_INVALID_PARAMETER       Invalid parameter
- * @retval #STC_ERROR_NOT_SUPPORTED           Not supported
- *
- * @see stc_h
- * @see stc_stats_info_h
- * @see stc_initialize()
- * @see stc_stats_info_destroy()
- */
-int stc_stats_info_clone(stc_stats_info_h info, stc_stats_info_h *cloned);
-
-/**
- * @brief Destroys the statistics info handle.
- * @since_tizen 5.5
- *
- * @param[in] info          The statistics info handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #STC_ERROR_NONE                    Successful
- * @retval #STC_ERROR_INVALID_PARAMETER       Invalid parameter
- * @retval #STC_ERROR_NOT_SUPPORTED           Not supported
- *
- * @see stc_stats_info_h
- * @see stc_stats_info_clone()
- */
-int stc_stats_info_destroy(stc_stats_info_h info);
-
 /**
  * @brief Gets the application ID from statistics information.
  * @since_tizen 4.0
index 140144de3214788956975dbf66b95cfc8f34e88b..affbe89a597df88432fc5355fec69da7ad5da5b8 100755 (executable)
  *  Local Functions Definition
  *****************************************************************************/
 
-EXPORT_API int stc_stats_info_clone(stc_stats_info_h info, stc_stats_info_h *cloned)
-{
-       CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC);
-
-       if (info == NULL || cloned == NULL) {
-               STC_LOGE("Invalid parameter");
-               return STC_ERROR_INVALID_PARAMETER;
-       }
-
-       stc_stats_info_s *stats_info = MALLOC0(stc_stats_info_s, 1);
-       if (!stats_info) {
-               STC_LOGE("Memory allocation failed");
-               return STC_ERROR_OUT_OF_MEMORY;
-       }
-
-       stc_stats_info_s *origin_info = (stc_stats_info_s *)info;
-
-       g_strlcpy(stats_info->app_id, origin_info->app_id, STC_APP_ID_LEN);
-       g_strlcpy(stats_info->iface_name, origin_info->iface_name, STC_IFNAME_LEN);
-       g_strlcpy(stats_info->subscriber_id, origin_info->subscriber_id, STC_SUBSCRIBER_ID_LEN);
-       stats_info->interval.from = origin_info->interval.from;
-       stats_info->interval.to = origin_info->interval.to;
-       stats_info->iface_type = origin_info->iface_type;
-       stats_info->cnt.incoming_bytes = origin_info->cnt.incoming_bytes;
-       stats_info->cnt.outgoing_bytes = origin_info->cnt.outgoing_bytes;
-       stats_info->roaming_type = origin_info->roaming_type;
-       stats_info->protocol_type = origin_info->protocol_type;
-       stats_info->process_state = origin_info->process_state;
-
-       *cloned = (stc_stats_info_h)stats_info;
-
-       STC_LOGI("Stats info successfully cloned");
-
-       return STC_ERROR_NONE;
-}
-
-EXPORT_API int stc_stats_info_destroy(stc_stats_info_h info)
-{
-       CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC);
-
-       if (info == NULL) {
-               STC_LOGE("Invalid parameter");
-               return STC_ERROR_INVALID_PARAMETER;
-       }
-
-       FREE(info);
-
-       STC_LOGI("Stats rule successfully destroyed");
-
-       return STC_ERROR_NONE;
-}
-
 EXPORT_API int stc_stats_info_get_app_id(stc_stats_info_h info, char **app_id)
 {
        CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC);