summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2018-06-12 11:39:43 +0200
committerLukasz Stanislawski <l.stanislaws@samsung.com>2018-06-12 12:01:17 +0200
commitefa20431292aaa7bfcb0b0cce7a444cd4a130481 (patch)
treeb3ffe4c754a5781d0ea3eb51a33343668c924397
parent5c0406fb2b54861a45dd262eb266ecbffee4ca6f (diff)
downloadttsd-worker-task-efa20431292aaa7bfcb0b0cce7a444cd4a130481.tar.gz
ttsd-worker-task-efa20431292aaa7bfcb0b0cce7a444cd4a130481.tar.bz2
ttsd-worker-task-efa20431292aaa7bfcb0b0cce7a444cd4a130481.zip
interface implementation stub added.
Change-Id: Id011c4315f55344bf64019867880ed35da983b5e
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/report-generator.c103
-rw-r--r--src/report-json-serializer.c58
3 files changed, 163 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 738674f..c733536 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,8 @@ SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
SET(SRCS
task-worker.c
procfs.c
+ report-generator.c
+ report-json-serializer.c
)
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
diff --git a/src/report-generator.c b/src/report-generator.c
index e69de29..e31e915 100644
--- a/src/report-generator.c
+++ b/src/report-generator.c
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "report-generator.h"
+
+report_generator_system_t *report_generator_new_system_report_generator()
+{
+ return NULL;
+}
+
+void report_generator_free_system_generator(report_generator_system_t *generator)
+{
+}
+
+report_generator_process_t *report_generator_new_process_report_generator(int pid)
+{
+ return NULL;
+}
+
+void report_generator_free_process_generator(report_generator_process_t *generator)
+{
+}
+
+report_generator_app_t *report_generator_new_app_report_generator(const char *appid)
+{
+ return NULL;
+}
+
+void report_generator_free_app_generator(report_generator_app_t *generator)
+{
+}
+
+int report_generator_generate_system_cpu_usage_report(
+ report_generator_system_t *generator,
+ int interval,
+ struct system_cpu_usage_report *report)
+{
+ return -1;
+}
+
+int report_generator_generate_percpu_usage_report(
+ report_generator_system_t *generator,
+ int interval,
+ struct system_percpu_usage_report **report)
+{
+ return -1;
+}
+
+int report_generator_generate_system_memory_usage_report(
+ report_generator_system_t *generator,
+ struct system_memory_usage_report *report)
+{
+ return -1;
+}
+
+int report_generator_generate_process_cpu_usage_report(
+ report_generator_process_t *generator,
+ int interval,
+ struct process_cpu_usage_report *report)
+{
+ return -1;
+}
+
+int report_generator_generate_proccess_memory_usage_report(
+ report_generator_process_t *generator,
+ struct process_memory_usage_report *report)
+{
+ return -1;
+}
+
+int report_generator_generate_app_cpu_usage_report(
+ report_generator_app_t *generator,
+ int interval,
+ struct app_cpu_usage_report *report)
+{
+ return -1;
+}
+
+int report_generator_generate_app_memory_usage_report(
+ report_generator_app_t *generator,
+ struct app_memory_usage_report *report)
+{
+ return -1;
+}
+
+int report_generator_generate_load_average_report(struct system_load_average_report *report)
+{
+ return -1;
+}
+
diff --git a/src/report-json-serializer.c b/src/report-json-serializer.c
index e69de29..0001640 100644
--- a/src/report-json-serializer.c
+++ b/src/report-json-serializer.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "report-json-serializer.h"
+
+char *report_json_serializer_serialize_system_load_average_report(struct system_load_average_report *report)
+{
+ return NULL;
+}
+
+char *report_json_serializer_serialize_system_memory_usage_report(struct system_memory_usage_report *report)
+{
+ return NULL;
+}
+
+char *report_json_serializer_serialize_system_cpu_usage_report(struct system_cpu_usage_report *report)
+{
+ return NULL;
+}
+
+char *report_json_serializer_serialize_system_cpus_usage_report(struct system_percpu_usage_report *report)
+{
+ return NULL;
+}
+
+char *report_json_serializer_serialize_process_cpu_usage_report(struct process_cpu_usage_report *report)
+{
+ return NULL;
+}
+
+char *report_json_serializer_serialize_process_memory_usage_report(struct process_memory_usage_report *report)
+{
+ return NULL;
+}
+
+char *report_json_serializer_serialize_app_cpu_usage_report(struct app_cpu_usage_report *report)
+{
+ return NULL;
+}
+
+char *report_json_serializer_serialize_app_memory_usage_report(struct app_memory_usage_report *report)
+{
+ return NULL;
+}
+