Move common macro to device-common
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 95791b2..9552c7d 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 6298cb6..cbea257 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 2b323a9..0fd3b4c 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 0037593..a7eeaeb 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 037e489..d9411fc 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 ee59d19..d7f8740 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 58c4c65..ca1da2f 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 1505477..7fe0127 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 f474599..0c53a66 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 022ab05..1a84702 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 35e615e..7146f92 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 30fdb72..c3f825a 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 0613899..319a5d2 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)