resource-monitor: Add systemmonitor privilege 28/280528/1 submit/tizen/20220901.013349
authorChanwoo Choi <cw00.choi@samsung.com>
Wed, 31 Aug 2022 07:52:13 +0000 (16:52 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 31 Aug 2022 07:52:13 +0000 (16:52 +0900)
Add systemmonitor privilege[1] to monitor resource data.
[1] https://www.tizen.org/privilege/systemmonitor

Change-Id: Ice104a12a472766ab2d7795a05c90cb7f8fb2463
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
include/resource-monitor.h

index f089c2c..59cbd86 100644 (file)
@@ -171,6 +171,8 @@ typedef enum {
 /**
  * @brief  Initializes the resource monitor.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @c return value should be released using resource_monitor_exit().
  * @return @c positive integer as resource monitor ID on success, otherwise a negative error value
  * @retval #RESOURCE_MONITOR_ERROR_NONE                         Successful
@@ -184,6 +186,8 @@ int resource_monitor_init(void);
 /**
  * @brief Exits the resource monitor.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     ID of resource monitor which be returned by resource_monitor_init()
  * @return @c 0 on success, otherwise a negative error value
  * @retval #RESOURCE_MONITOR_ERROR_NONE                         Successful
@@ -198,6 +202,8 @@ int resource_monitor_exit(int monitor_id);
 /**
  * @brief Gets the count of supported resources according to resource type.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitorID
  * @param[in] resource_type  Resource type
  * @param[out] resource_count  Resource count retrieved from resource monitor
@@ -214,6 +220,8 @@ int resource_monitor_get_resource_count(int monitor_id, resource_monitor_type_e
 /**
  * @brief Creates resource for given resource_type.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @c return value should be released using resource_delete_resource().
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_type  Resource type
@@ -231,6 +239,8 @@ int resource_monitor_create_resource(int monitor_id, resource_monitor_type_e res
 /**
  * @brief Deletes resource of given resource ID.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @return @c 0 on success, otherwise a negative error value
@@ -247,6 +257,8 @@ int resource_monitor_delete_resource(int monitor_id, int resource_id);
 /**
  * @brief Sets the resource control with value which is different according to resource control id.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] ctrl_id        Resource control ID
@@ -265,6 +277,8 @@ int resource_monitor_set_resource_ctrl(int monitor_id, int resource_id, resource
 /**
  * @brief Sets the interested resource attributes for monitoring.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] attr_mask      Attribute mask including the various attributes
@@ -283,6 +297,8 @@ int resource_monitor_set_resource_attr(int monitor_id, int resource_id, resource
 /**
  * @brief Unsets the interested resource attributes for monitoring.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] attr_mask      Attribute mask including the various attributes
@@ -301,6 +317,8 @@ int resource_monitor_unset_resource_attr(int monitor_id, int resource_id, resour
 /**
  * @brief Checks whether a resource attribute is supported or not.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] attr_id        Resource attribute ID
@@ -320,6 +338,8 @@ int resource_monitor_is_resource_attr_supported(int monitor_id, int resource_id,
 /**
  * @brief Updates the value of interested attributes for all created resource.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @return @c 0 on success, otherwise a negative error value
  * @retval #RESOURCE_MONITOR_ERROR_NONE                         Successful
@@ -337,6 +357,8 @@ int resource_monitor_update(int monitor_id);
 /**
  * @brief Updates the value of interested attributes for a resource.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @return @c 0 on success, otherwise a negative error value
@@ -355,6 +377,8 @@ int resource_monitor_update_resource(int monitor_id, int resource_id);
 /**
  * @brief Gets the int value of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] attr_id        Resource attribute ID
@@ -377,6 +401,8 @@ int resource_monitor_get_value_int(int monitor_id, int resource_id, resource_mon
 /**
  * @brief Gets the int64 value of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] attr_id        Resource attribute ID
@@ -399,6 +425,8 @@ int resource_monitor_get_value_int64(int monitor_id, int resource_id, resource_m
 /**
  * @brief Gets the uint32 value of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] attr_id        Resource attribute ID
@@ -421,6 +449,8 @@ int resource_monitor_get_value_uint32(int monitor_id, int resource_id, resource_
 /**
  * @brief Gets the uint64 value of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] attr_id        Resource attribute ID
@@ -443,6 +473,8 @@ int resource_monitor_get_value_uint64(int monitor_id, int resource_id, resource_
 /**
  * @brief Gets the double value of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
  * @param[in] attr_id        Resource attribute ID
@@ -465,6 +497,8 @@ int resource_monitor_get_value_double(int monitor_id, int resource_id, resource_
 /**
  * @brief Gets the string value of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @a value should be released using free().
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
@@ -488,6 +522,8 @@ int resource_monitor_get_value_string(int monitor_id, int resource_id, resource_
 /**
  * @brief Gets the int array of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @a array should be released using free().
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
@@ -512,6 +548,8 @@ int resource_monitor_get_array_int(int monitor_id, int resource_id, resource_mon
 /**
  * @brief Gets the int64 array of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @a array should be released using free().
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
@@ -536,6 +574,8 @@ int resource_monitor_get_array_int64(int monitor_id, int resource_id, resource_m
 /**
  * @brief Gets the uint32 array of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @a array should be released using free().
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
@@ -560,6 +600,8 @@ int resource_monitor_get_array_uint32(int monitor_id, int resource_id, resource_
 /**
  * @brief Gets the uint64 array of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @a array should be released using free().
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
@@ -584,6 +626,8 @@ int resource_monitor_get_array_uint64(int monitor_id, int resource_id, resource_
 /**
  * @brief Gets the double array of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @a array should be released using free().
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()
@@ -608,6 +652,8 @@ int resource_monitor_get_array_double(int monitor_id, int resource_id, resource_
 /**
  * @brief Gets the string array of resource attribute.
  * @since_tizen 7.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/systemmonitor
  * @remarks The @a array and each data in the array should be released using free().
  * @param[in] monitor_id     Resource monitor ID which be returned by resource_monitor_init()
  * @param[in] resource_id    Resource ID which be returned by resource_monitor_create_resource()