util: common: Move enum data_type into common.h and rename it 25/276925/4
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 24 Jun 2022 05:29:56 +0000 (14:29 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 5 Jul 2022 01:26:26 +0000 (10:26 +0900)
The previous enum monitor_data_type will be used for all data.
So that move enum monitor_data_type into common.h
and then rename from enum monitor_data_type to enum data_type
with more generic enumeration name. And add new DATA_TYPE_BOOLEAN
for boolean type.

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

index 48315b8..8ff3d85 100644 (file)
@@ -35,6 +35,20 @@ typedef unsigned long long uint64;
 #define BUFF_MAX        255
 #define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
 
+enum data_type {
+       DATA_TYPE_UNKNOWN = 0,
+       DATA_TYPE_INT,
+       DATA_TYPE_INT64,
+       DATA_TYPE_UINT,
+       DATA_TYPE_UINT64,
+       DATA_TYPE_DOUBLE,
+       DATA_TYPE_STRING,
+       DATA_TYPE_ARRAY,
+       DATA_TYPE_PTR,
+       DATA_TYPE_BOOLEAN,
+       DATA_TYPE_NUM
+};
+
 /*
  * One byte digit has 3 position in decimal representation
  * 2 - 5
index 850e8c8..79f9bbd 100644 (file)
 #include <glib.h>
 #include "common.h"
 
-enum monitor_data_type {
-       DATA_TYPE_UNKNOWN = 0,
-       DATA_TYPE_INT,
-       DATA_TYPE_INT64,
-       DATA_TYPE_UINT,
-       DATA_TYPE_UINT64,
-       DATA_TYPE_DOUBLE,
-       DATA_TYPE_STRING,
-       DATA_TYPE_ARRAY,
-       DATA_TYPE_PTR,
-
-       DATA_TYPE_NUM
-};
-
 struct resource;
 struct resource_attribute;