2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.1 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __REPORT_JSON_SERIALIZER_H_
18 #define __REPORT_JSON_SERIALIZER_H_
23 * @brief Serializes system_load_average_report to json string
25 * @param[in] report Report structure with usage data.
27 * @return dynamically allocated string on NULL on error.
28 * @remark returned value should be released with @free
30 char *report_json_serializer_serialize_system_load_average_report(struct system_load_average_report *report);
33 * @brief Serializes system_memory_usage_report to json string
35 * @param[in] report Report structure with usage data.
37 * @return dynamically allocated string on NULL on error.
38 * @remark returned value should be released with @free
40 char *report_json_serializer_serialize_system_memory_usage_report(struct system_memory_usage_report *report);
43 * @brief Serializes system_cpus_usage_report to json string
45 * @param[in] report Report structure with usage data.
47 * @return dynamically allocated string on NULL on error.
48 * @remark returned value should be released with @free
50 char *report_json_serializer_serialize_system_cpu_usage_report(struct system_cpu_usage_report *report);
53 * @brief Serializes system_cpus_usage_report to json string
55 * @param[in] report Report structure with usage data.
57 * @return dynamically allocated string on NULL on error.
58 * @remark returned value should be released with @free
60 char *report_json_serializer_serialize_system_cpus_usage_report(struct system_percpu_usage_report *report);
63 * @brief Serializes process_memory_usage_report to json string
65 * @param[in] report Report structure with usage data.
67 * @return dynamically allocated string on NULL on error.
68 * @remark returned value should be released with @free
70 char *report_json_serializer_serialize_process_cpu_usage_report(struct process_cpu_usage_report *report);
73 * @brief Serializes process_memory_usage_report to json string
75 * @param[in] report Report structure with usage data.
77 * @return dynamically allocated string on NULL on error.
78 * @remark returned value should be released with @free
80 char *report_json_serializer_serialize_process_memory_usage_report(struct process_memory_usage_report *report);
83 * @brief Serializes app_system_cpu_usage_report to json string
85 * @param[in] report Report structure with usage data.
87 * @return dynamically allocated string on NULL on error.
88 * @remark returned value should be released with @free
90 char *report_json_serializer_serialize_apps_cpu_usage_report(struct app_cpu_usage_report *report);
93 * @brief Serializes app_memory_usage_report to json string
95 * @param[in] report Report structure with usage data.
97 * @return dynamically allocated string on NULL on error.
98 * @remark returned value should be released with @free
100 char *report_json_serializer_serialize_apps_memory_usage_report(struct app_memory_usage_report *report);
103 * @brief Serializes app_system_cpu_usage_reports to json string
105 * @param[in] report NULL-terminated array of report structures with usage data.
107 * @return dynamically allocated string on NULL on error.
108 * @remark returned value should be released with @free
110 char *report_json_serializer_serialize_top_cpu_usage_reports(struct app_cpu_usage_report **reports);
113 * @brief Serializes app_memory_usage_reports to json string
115 * @param[in] report NULL-terminated array of report structures with usage data.
117 * @return dynamically allocated string on NULL on error.
118 * @remark returned value should be released with @free
120 char *report_json_serializer_serialize_top_memory_usage_reports(struct app_memory_usage_report **reports);