Move common macro to device-common 27/253527/1 accepted/tizen/unified/20210215.130939 submit/tizen/20210215.055935
authorlokilee73 <changjoo.lee@samsung.com>
Mon, 15 Feb 2021 02:30:51 +0000 (11:30 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Mon, 15 Feb 2021 02:30:55 +0000 (11:30 +0900)
Change-Id: Ia506fbf4ddc5020df1c63c229fcd90afe702a36d
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
14 files changed:
CMakeLists.txt
hw/battery/CMakeLists.txt
hw/battery/battery.c
hw/common/common.h [deleted file]
hw/dbus.c
hw/display/CMakeLists.txt
hw/display/display.c
hw/external_connection/CMakeLists.txt
hw/external_connection/external_connection.c
hw/haptic/CMakeLists.txt
hw/haptic/emulator.c
hw/usb_gadget/CMakeLists.txt
hw/usb_gadget/usb_gadget.c
packaging/device-manager-plugin-emul.spec

index 95791b27eee320520298761cf7f3cb4d4dcd8b0a..9552c7d1404401a8007ad69aa7678cbfb38f2244 100644 (file)
@@ -14,7 +14,7 @@ IF(ENABLE_DLOG STREQUAL on)
 ENDIF()
 
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog)
+pkg_check_modules(pkgs REQUIRED hal-backend-device-common)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 6298cb65e1b7c1b97c2f6d31942222a31ef5fbba..cbea2579580686aec6e8339e119324f8a855ceca 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-battery C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-battery_pkgs REQUIRED dlog glib-2.0 gio-2.0)
+pkg_check_modules(hal-backend-device-battery_pkgs REQUIRED hal-backend-device-common glib-2.0 gio-2.0)
 
 FOREACH(flag ${hal-backend-device-battery_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 2b323a9a89abd914d2c97f9cb7ff9378ea8a726a..0fd3b4c0097f4ef6abfb1bd37ca5d1029ce46544 100644 (file)
@@ -29,7 +29,8 @@
 #include <libsyscommon/file.h>
 
 #include "../dbus.h"
-#include "common.h"
+
+#include </hal/include/device/hal-backend-common.h>
 
 #define BATTERY_BUS      "org.tizen.system.deviced"
 #define BATTERY_OBJECT   "/Org/Tizen/System/DeviceD/SysNoti"
diff --git a/hw/common/common.h b/hw/common/common.h
deleted file mode 100644 (file)
index 413ed8a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-#ifndef __HAL_BACKEND_COMMON_H__
-#define __HAL_BACKEND_COMMON_H__
-
-#ifdef FEATURE_DLOG
-    #define LOG_TAG "HAL_BACKEND_DEVICE"
-    #include <dlog.h>
-    #define _D(fmt, args...)    SLOGD(fmt, ##args)
-    #define _I(fmt, args...)    SLOGI(fmt, ##args)
-    #define _W(fmt, args...)    SLOGW(fmt, ##args)
-    #define _E(fmt, args...)    SLOGE(fmt, ##args)
-#else
-    #define _D(x, ...)
-    #define _I(x, ...)
-    #define _W(x, ...)
-    #define _E(x, ...)
-#endif
-
-
-#define EXPORT __attribute__ ((visibility("default")))
-
-#endif /* __HAL_BACKEND_COMMON_H__ */
index 0037593eedd3e301d67f22d8220f89add966efb0..a7eeaeb8c55889e67ece97625eaf9b9ad0b2bd8c 100644 (file)
--- a/hw/dbus.c
+++ b/hw/dbus.c
@@ -17,7 +17,8 @@
  */
 
 #include "dbus.h"
-#include "common.h"
+
+#include </hal/include/device/hal-backend-common.h>
 
 int register_dbus_signal(const char *object,
                const char *iface, const char *signal,
index 037e489aea6401f05ccf36ba631885c93a765675..d9411fc4de90564b3b765d08e5945a235cb32962 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-display C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-display_pkgs REQUIRED dlog)
+pkg_check_modules(hal-backend-device-display_pkgs REQUIRED hal-backend-device-common)
 
 FOREACH(flag ${display_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index ee59d193c15cb6f16cbe5fa47881352f2304dfc1..d7f8740686545526b0f1207d07a936b990f43df2 100644 (file)
@@ -27,7 +27,7 @@
 #include <hal/hal-common-interface.h>
 #include <libsyscommon/file.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #ifndef BACKLIGHT_PATH
 #define BACKLIGHT_PATH  "/sys/class/backlight/emulator"
index 58c4c656356ed4ee8980fad8a8ccef19efc0b33f..ca1da2ffe487752a28f231f9584243da12c23a22 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-external-connection C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-external-connection_pkgs REQUIRED dlog glib-2.0 gio-2.0)
+pkg_check_modules(hal-backend-device-external-connection_pkgs REQUIRED hal-backend-device-common glib-2.0 gio-2.0)
 
 FOREACH(flag ${hal-backend-device-external-connection_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 1505477a26c0a2177a7ebdfd74e9219cacbadf3e..7fe0127e8be378f373b2d9513ae82a7ad8d1f364 100644 (file)
@@ -30,7 +30,8 @@
 #include <libsyscommon/file.h>
 
 #include "../dbus.h"
-#include "common.h"
+
+#include </hal/include/device/hal-backend-common.h>
 
 #ifndef ARRAY_SIZE
 #define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
index f474599d73dad18784323ef705b13be6fed9873b..0c53a66a6164cddf8f633a7c3940c4f6d6b34d36 100644 (file)
@@ -3,11 +3,9 @@ PROJECT(hal-backend-device-haptic C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(haptic_pkgs REQUIRED
-               dlog
+               hal-backend-device-common
                glib-2.0
                libsyscommon
                capi-system-info)
index 022ab051e1ad201aecd416217e94db31912dc6e6..1a84702c6353426cfd84f0b2648be1fa9c2b5aaf 100644 (file)
@@ -21,7 +21,8 @@
 #include <system_info.h>
 #include <libsyscommon/list.h>
 #include <hal/device/hal-haptic-interface.h>
-#include "common.h"
+
+#include </hal/include/device/hal-backend-common.h>
 
 static GList *handle_list;
 static int unique_number = 0;
index 35e615ed7b7c081e7212c5540b463a8ea2d1a6f2..7146f9274aec0423e685fc811f867d2dd81b01f6 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-usb-gadget C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-usb-gadget_pkgs REQUIRED dlog hal-backend-device-common)
+pkg_check_modules(hal-backend-device-usb-gadget_pkgs REQUIRED hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-usb-gadget_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 30fdb725e2a651520f4c89df5efd5eab780959a9..c3f825ac6cd0a6e8f59dff5c9b777deb75f52054 100644 (file)
@@ -21,8 +21,7 @@
 #include <hal/device/hal-usb_gadget-interface.h>
 
 #include </hal/include/device/hal-backend-common-usb_gadget.h>
-
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 static int dummy_enable(void)
 {
index 06138998e16b467964cba09dda28dba339607b38..319a5d2eab971b74dd8326b126e35ec5f7d32b71 100644 (file)
@@ -8,7 +8,6 @@ Source0:            %{name}-%{version}.tar.gz
 Requires(post):     /sbin/ldconfig
 Requires(postun):   /sbin/ldconfig
 BuildRequires:      cmake
-BuildRequires:      pkgconfig(dlog)
 BuildRequires:      pkgconfig(glib-2.0)
 BuildRequires:      pkgconfig(gio-2.0)
 BuildRequires:      pkgconfig(hal-api-common)