* limitations under the License.
*/
-#ifndef __resource_SYSTEM_RESOURCE_MONITOR_H__
-#define __resource_SYSTEM_RESOURCE_MONITOR_H__
+#ifndef __TIZEN_SYSTEM_MONITOR_RESOURCE_MONITOR_H__
+#define __TIZEN_SYSTEM_MONITOR_RESOURCE_MONITOR_H__
+
+#include <tizen.h>
#include <sys/types.h>
#include <pass/resource-monitor.h>
*/
/**
- * @brief Define the supported resource type for monitoring
+ * @brief Define the error value.
+ * @since_tizen 7.0
+ */
+enum {
+ RESOURCE_MONITOR_ERROR_NONE = TIZEN_ERROR_NONE,
+ RESOURCE_MONITOR_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,
+ RESOURCE_MONITOR_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,
+ RESOURCE_MONITOR_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA,
+ RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,
+};
+
+/**
+ * @brief Define the supported resource type for monitoring.
* @since_tizen 7.0
*/
enum {
};
/**
- * @brief Define the supported attributes and controls for CPU resource type
+ * @brief Define the supported attributes and controls for CPU resource type.
* @since_tizen 7.0
*/
enum {
};
/**
- * @brief Define the supported attributes and controls for Memory bus resource type
+ * @brief Define the supported attributes and controls for Memory bus resource type.
* @since_tizen 7.0
*/
enum {
};
/**
- * @brief Define the supported attributes and controls for GPU resource type
+ * @brief Define the supported attributes and controls for GPU resource type.
* @since_tizen 7.0
*/
enum {
};
/**
- * @brief Define the supported attributes for Memory resource type
+ * @brief Define the supported attributes for Memory resource type.
* @since_tizen 7.0
*/
enum {
};
/**
- * @brief Define the supported attributes for Battery resource type
+ * @brief Define the supported attributes for Battery resource type.
* @since_tizen 7.0
*/
enum {
};
/**
- * @brief Define the supported attributes and controls for Display resource type
+ * @brief Define the supported attributes and controls for Display resource type.
* @since_tizen 7.0
*/
enum {
};
/**
- * @brief Define the supported attributes for System resource type
+ * @brief Define the supported attributes for System resource type.
* @since_tizen 7.0
*/
enum {
/**
- * @brief Define the supported attributes for Disk resource type
+ * @brief Define the supported attributes for Disk resource type.
* @since_tizen 7.0
*/
enum {
*/
/**
- * @brief Initialize the resource monitor
+ * @brief Initializes the resource monitor.
* @since_tizen 7.0
+ * @remarks The @c return value should be released using resourc_monitor_exit().
* @return @c positive integer as resource monitor id on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_init(void);
/**
- * @brief Exit the resource monitor
- * @param[in] Id of resource monitor which be returnted by resource_monitor_init
+ * @brief Exits the resource monitor.
+ * @since_tizen 7.0
+ * @param[in] id Id of resource monitor which be returnted by resource_monitor_init()
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_exit(int id);
/**
- * @brief Get the count of supported resources according to resource type
- * @param[in] Resource monitor id
- * @param[in] Resource type
- * @param[out] Resource count retrived from resource monitor
+ * @brief Gets the count of supported resources according to resource type.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_type Resource type
+ * @param[out] resource_count Resource count retrived from resource monitor
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_get_resource_count(int id, int resource_type, int *resource_count);
/**
- * @brief Create resource for given resource_type
- * @param[in] Resource monitor id which be returnted by resource_monitor_init
- * @param[in] Resource type
+ * @brief Creates resource for given resource_type.
+ * @since_tizen 7.0
+ * @remarks The @c return value should be released using resourc_delete_resource().
+ * @param[in] id Resource monitor id which be returnted by resource_monitor_init()
+ * @param[in] resource_type Resource type
* @return @c positive integer as resource id on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_create_resource(int id, int resource_type);
/**
- * @brief Delete resource of given resource id
- * @param[in] Resource monitor id which be returnted by resource_monitor_init
- * @param[in] Resource id
+ * @brief Deletes resource of given resource id.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id which be returnted by resource_monitor_init()
+ * @param[in] resource_id Resource id
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_delete_resource(int id, int resource_id);
/**
- * @brief Set the resource control with value which is diffierential according to resource control id
- * @param[in] Resource monitor id
- * @param[in] Resource id
- * @param[in] Resource control id
- * @param[in] Value for resource control id
+ * @brief Sets the resource control with value which is diffierential according to resource control id.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] ctrl_id Resource control id
+ * @param[in] value Value for resource control id
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_set_resource_ctrl(int id, int resource_id, u_int64_t ctrl_id, int value);
/**
- * @brief Set the interested attributes for monitoring
- * @param[in] Resource monitor id
- * @param[in] Resource id
- * @param[in] Attribute mask including the various attributes
+ * @brief Sets the interested attributes for monitoring.
+ * @since_tizen 7.0
+ * @remarks Should be released using resource_monitor_unset_resource_attr().
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_mask Attribute mask including the various attributes
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_set_resource_attr(int id, int resource_id, u_int64_t attr_mask);
/**
- * @brief Unset the interested attributes for monitoring
- * @param[in] Resource monitor id
- * @param[in] Resource id
- * @param[in] Attribute mask including the various attributes
+ * @brief Unsets the interested attributes for monitoring.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_mask Attribute mask including the various attributes
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_unset_resource_attr(int id, int resource_id, u_int64_t attr_mask);
/**
- * @brief Check whether a resouce attribute is supported or not
- * @param[in] Resource monitor id
- * @param[in] Resource id
- * @param[in] Resource attribute id
+ * @brief Checks whether a resouce attribute is supported or not.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] supported Resource attributes is either supported or not (@c true == supporeted, @c false = not supported)
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
-bool resource_monitor_is_resource_attr_supported(int id, int resource_id, u_int64_t attr_id);
+int resource_monitor_is_resource_attr_supported(int id, int resource_id, u_int64_t attr_id, bool *supported);
/**
- * @brief Update value of the interested attributes for all created resource
- * @param[in] Resource monitor id
+ * @brief Updates the value of interested attributes for all created resource.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_update(int id);
/**
- * @brief Update value of the interested attributes for a resource
- * @param[in] Resource monitor id
- * @param[in] Resource id
+ * @brief Updates the value of interested attributes for a resource.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
* @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
*/
int resource_monitor_update_resource(int id, int resource_id);
/**
- * @brief Get [int/int64/uint/uint64/double/string] value of resource attribute
- * @details resource_monitor_get_value_string returns the value stored on allocated memory.
- * After using the value, must need to free the allocated memory of value.
- * @param[in] Resource monitor id
- * @param[in] Resource id
- * @param[in] Resource attribute id
- * @param[out] Value retrieved from resource attribute
- * @return @ 0 on success, otherwise a negative error value
- */
-int resource_monitor_get_value_int(int id, int resource_id, u_int64_t attr, int32_t *value);
-int resource_monitor_get_value_int64(int id, int resource_id, u_int64_t attr, int64_t *value);
-int resource_monitor_get_value_uint(int id, int resource_id, u_int64_t attr, u_int32_t *value);
-int resource_monitor_get_value_uint64(int id, int resource_id, u_int64_t attr, u_int64_t *value);
-int resource_monitor_get_value_double(int id, int resource_id, u_int64_t attr, double *value);
-int resource_monitor_get_value_string(int id, int resource_id, u_int64_t attr, char **value);
-
-/**
- * @brief Get [int/int64/uint/uint64/double/string] array of resource attribute
- * @details All get_array return the value stored on allocated memory.
- * After using the value, must need to free the allocated memory of value.
- * @param[in] Resource monitor id
- * @param[in] Resource id
- * @param[in] Resource attribute id
- * @param[out] Array retrieved from resource attribute
- * @param[out] Length of array
- * @return @ 0 on success, otherwise a negative error value
- */
-int resource_monitor_get_array_int(int id, int res_id, u_int64_t attr, int32_t **array, int *length);
-int resource_monitor_get_array_int64(int id, int res_id, u_int64_t attr, int64_t **array, int *length);
-int resource_monitor_get_array_uint(int id, int res_id, u_int64_t attr, u_int32_t **array, int *length);
-int resource_monitor_get_array_uint64(int id, int res_id, u_int64_t attr, u_int64_t **array, int *length);
-int resource_monitor_get_array_double(int id, int res_id, u_int64_t attr, double **array, int *length);
-int resource_monitor_get_array_string(int id, int res_id, u_int64_t attr, char ***array, int *length);
+ * @brief Gets the int value of resource attribute.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] value Value retrieved from resource attribute
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_value_int(int id, int resource_id, u_int64_t attr_id, int32_t *value);
+
+/**
+ * @brief Gets the int64 value of resource attribute.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] value Value retrieved from resource attribute
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_value_int64(int id, int resource_id, u_int64_t attr_id, int64_t *value);
+
+/**
+ * @brief Gets the uint value of resource attribute.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] value Value retrieved from resource attribute
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_value_uint(int id, int resource_id, u_int64_t attr_id, u_int32_t *value);
+
+/**
+ * @brief Gets the uint64 value of resource attribute.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] value Value retrieved from resource attribute
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_value_uint64(int id, int resource_id, u_int64_t attr_id, u_int64_t *value);
+
+/**
+ * @brief Gets the double value of resource attribute.
+ * @since_tizen 7.0
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] value Value retrieved from resource attribute
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_value_double(int id, int resource_id, u_int64_t attr_id, double *value);
+
+/**
+ * @brief Gets the string value of resource attribute.
+ * @since_tizen 7.0
+ * @remarks The @a value should be released using free().
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] value Value retrieved from resource attribute
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_value_string(int id, int resource_id, u_int64_t attr_id, char **value);
+
+/**
+ * @brief Gets the int array of resource attribute.
+ * @since_tizen 7.0
+ * @remarks The @a array should be released using free().
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] array Array retrieved from resource attribute
+ * @param[out] length Length of array
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_array_int(int id, int resource_id, u_int64_t attr_id, int32_t **array, int *length);
+
+/**
+ * @brief Gets the int64 array of resource attribute.
+ * @since_tizen 7.0
+ * @remarks The @a array should be released using free().
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] array Array retrieved from resource attribute
+ * @param[out] length Length of array
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_array_int64(int id, int resource_id, u_int64_t attr_id, int64_t **array, int *length);
+
+/**
+ * @brief Gets the uint array of resource attribute.
+ * @since_tizen 7.0
+ * @remarks The @a array should be released using free().
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] array Array retrieved from resource attribute
+ * @param[out] length Length of array
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_array_uint(int id, int resource_id, u_int64_t attr_id, u_int32_t **array, int *length);
+
+/**
+ * @brief Gets the uint64 array of resource attribute.
+ * @since_tizen 7.0
+ * @remarks The @a array should be released using free().
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] array Array retrieved from resource attribute
+ * @param[out] length Length of array
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_array_uint64(int id, int resource_id, u_int64_t attr_id, u_int64_t **array, int *length);
+
+/**
+ * @brief Gets the double array of resource attribute.
+ * @since_tizen 7.0
+ * @remarks The @a array should be released using free().
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] array Array retrieved from resource attribute
+ * @param[out] length Length of array
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_array_double(int id, int resource_id, u_int64_t attr_id, double **array, int *length);
+
+/**
+ * @brief Gets the string array of resource attribute.
+ * @since_tizen 7.0
+ * @remarks The @a array should be released using free().
+ * @param[in] id Resource monitor id
+ * @param[in] resource_id Resource id
+ * @param[in] attr_id Resource attribute id
+ * @param[out] array Array retrieved from resource attribute
+ * @param[out] length Length of array
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RESOURCE_MONITOR_ERROR_NONE Successful
+ * @retval #RESOURCE_MONITOR_ERROR_NOT_SUPPORTED Not Supported
+ * @retval #RESOURCE_MONITOR_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #RESOURCE_MONITOR_ERROR_NO_DATA Empty Data
+ * @retval #RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY Out of Memory
+ */
+int resource_monitor_get_array_string(int id, int resource_id, u_int64_t attr_id, char ***array, int *length);
/**
* @}
}
#endif
-#endif /* __resource_SYSTEM_RESOURCE_MONITOR_H__ */
+#endif /* __TIZEN_SYSTEM_MONITOR_RESOURCE_MONITOR_H__ */
return pass_resource_monitor_unset_resource_attr(id, resource_id, attr_mask);
}
-bool resource_monitor_is_resource_attr_supported(int id, int resource_id, u_int64_t attr_id)
+int resource_monitor_is_resource_attr_supported(int id, int resource_id, u_int64_t attr_id, bool *supported)
{
- return pass_resource_monitor_is_resource_attr_supported(id, resource_id, attr_id);
+ return pass_resource_monitor_is_resource_attr_supported(id, resource_id, attr_id, supported);
}
int resource_monitor_update(int id)
return resource_monitor_update_resource(id, resource_id);
}
-int resource_monitor_get_value_int(int id, int resource_id, u_int64_t attr, int32_t *value)
+int resource_monitor_get_value_int(int id, int resource_id, u_int64_t attr_id, int32_t *value)
{
- return pass_resource_monitor_get_value_int(id, resource_id, attr, value);
+ return pass_resource_monitor_get_value_int(id, resource_id, attr_id, value);
}
-int resource_monitor_get_value_int64(int id, int resource_id, u_int64_t attr, int64_t *value)
+int resource_monitor_get_value_int64(int id, int resource_id, u_int64_t attr_id, int64_t *value)
{
- return pass_resource_monitor_get_value_int64(id, resource_id, attr, value);
+ return pass_resource_monitor_get_value_int64(id, resource_id, attr_id, value);
}
-int resource_monitor_get_value_uint(int id, int resource_id, u_int64_t attr, u_int32_t *value)
+int resource_monitor_get_value_uint(int id, int resource_id, u_int64_t attr_id, u_int32_t *value)
{
- return pass_resource_monitor_get_value_uint(id, resource_id, attr, value);
+ return pass_resource_monitor_get_value_uint(id, resource_id, attr_id, value);
}
-int resource_monitor_get_value_uint64(int id, int resource_id, u_int64_t attr, u_int64_t *value)
+int resource_monitor_get_value_uint64(int id, int resource_id, u_int64_t attr_id, u_int64_t *value)
{
- return pass_resource_monitor_get_value_uint64(id, resource_id, attr, value);
+ return pass_resource_monitor_get_value_uint64(id, resource_id, attr_id, value);
}
-int resource_monitor_get_value_double(int id, int resource_id, u_int64_t attr, double *value)
+int resource_monitor_get_value_double(int id, int resource_id, u_int64_t attr_id, double *value)
{
- return pass_resource_monitor_get_value_double(id, resource_id, attr, value);
+ return pass_resource_monitor_get_value_double(id, resource_id, attr_id, value);
}
-int resource_monitor_get_value_string(int id, int resource_id, u_int64_t attr, char **value)
+int resource_monitor_get_value_string(int id, int resource_id, u_int64_t attr_id, char **value)
{
- return pass_resource_monitor_get_value_string(id, resource_id, attr, value);
+ return pass_resource_monitor_get_value_string(id, resource_id, attr_id, value);
}
-int resource_monitor_get_array_int(int id, int res_id, u_int64_t attr, int32_t **array, int *length)
+int resource_monitor_get_array_int(int id, int resource_id, u_int64_t attr_id, int32_t **array, int *length)
{
- return pass_resource_monitor_get_array_int(id, res_id, attr, array, length);
+ return pass_resource_monitor_get_array_int(id, resource_id, attr_id, array, length);
}
-int resource_monitor_get_array_int64(int id, int res_id, u_int64_t attr, int64_t **array, int *length)
+int resource_monitor_get_array_int64(int id, int resource_id, u_int64_t attr_id, int64_t **array, int *length)
{
- return pass_resource_monitor_get_array_int64(id, res_id, attr, array, length);
+ return pass_resource_monitor_get_array_int64(id, resource_id, attr_id, array, length);
}
-int resource_monitor_get_array_uint(int id, int res_id, u_int64_t attr, u_int32_t **array, int *length)
+int resource_monitor_get_array_uint(int id, int resource_id, u_int64_t attr_id, u_int32_t **array, int *length)
{
- return pass_resource_monitor_get_array_uint(id, res_id, attr, array, length);
+ return pass_resource_monitor_get_array_uint(id, resource_id, attr_id, array, length);
}
-int resource_monitor_get_array_uint64(int id, int res_id, u_int64_t attr, u_int64_t **array, int *length)
+int resource_monitor_get_array_uint64(int id, int resource_id, u_int64_t attr_id, u_int64_t **array, int *length)
{
- return pass_resource_monitor_get_array_uint64(id, res_id, attr, array, length);
+ return pass_resource_monitor_get_array_uint64(id, resource_id, attr_id, array, length);
}
-int resource_monitor_get_array_double(int id, int res_id, u_int64_t attr, double **array, int *length)
+int resource_monitor_get_array_double(int id, int resource_id, u_int64_t attr_id, double **array, int *length)
{
- return pass_resource_monitor_get_array_double(id, res_id, attr, array, length);
+ return pass_resource_monitor_get_array_double(id, resource_id, attr_id, array, length);
}
-int resource_monitor_get_array_string(int id, int res_id, u_int64_t attr, char ***array, int *length)
+int resource_monitor_get_array_string(int id, int resource_id, u_int64_t attr_id, char ***array, int *length)
{
- return pass_resource_monitor_get_array_string(id, res_id, attr, array, length);
+ return pass_resource_monitor_get_array_string(id, resource_id, attr_id, array, length);
}