plugin-api: Change the header including style and remove duplicate common.h 69/297669/2
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 22 Aug 2023 10:43:10 +0000 (19:43 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 22 Aug 2023 10:48:44 +0000 (19:48 +0900)
In order to specify the path of header file, change the header including
style as following and the remove the duplicated common.h including log
macro.

- Before header including style
  #include "syscommon-plugin-common.h"
  #include "syscommon-plugin-common-interface.h"

- After header including style
  #include <system/syscommon-plugin-common.h>
  #include <system/syscommon-plugin-common-interface.h>

Change-Id: I723114be26e7891661dcc7ac02fd7d1ceb8dc0a1
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
26 files changed:
src/plugin-api/common/CMakeLists.txt
src/plugin-api/common/include/system/syscommon-plugin-common-interface.h [moved from src/plugin-api/common/include/syscommon-plugin-common-interface.h with 100% similarity]
src/plugin-api/common/include/system/syscommon-plugin-common.h [moved from src/plugin-api/common/include/syscommon-plugin-common.h with 100% similarity]
src/plugin-api/common/src/common.h
src/plugin-api/common/src/syscommon-plugin-api-conf.c
src/plugin-api/common/src/syscommon-plugin-api-conf.h
src/plugin-api/common/src/syscommon-plugin-api-list.h
src/plugin-api/deviced/CMakeLists.txt
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-battery-interface.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-battery-interface.h with 100% similarity]
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-battery.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-battery.h with 100% similarity]
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-common-interface.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-common-interface.h with 100% similarity]
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-display-interface.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-display-interface.h with 100% similarity]
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-display.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-display.h with 93% similarity]
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-input-interface.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-input-interface.h with 100% similarity]
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-input.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-input.h with 100% similarity]
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-power-interface.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h with 100% similarity]
src/plugin-api/deviced/include/system/syscommon-plugin-deviced-power.h [moved from src/plugin-api/deviced/include/syscommon-plugin-deviced-power.h with 100% similarity]
src/plugin-api/deviced/src/common.h [deleted file]
src/plugin-api/deviced/src/syscommon-plugin-deviced-battery.c
src/plugin-api/deviced/src/syscommon-plugin-deviced-display.c
src/plugin-api/deviced/src/syscommon-plugin-deviced-input.c
src/plugin-api/resourced/CMakeLists.txt
src/plugin-api/resourced/include/system/syscommon-plugin-resourced-memory-lmk-interface.h [moved from src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk-interface.h with 100% similarity]
src/plugin-api/resourced/include/system/syscommon-plugin-resourced-memory-lmk.h [moved from src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h with 100% similarity]
src/plugin-api/resourced/src/common.h [deleted file]
src/plugin-api/resourced/src/syscommon-plugin-resourced-memory-lmk.c

index 666d51f..d6eea2b 100644 (file)
@@ -47,7 +47,7 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_LDFLAGS}
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
 
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/system/
        DESTINATION ${INCLUDEDIR}
        FILES_MATCHING PATTERN "*.h")
 
index a89fe09..44e99fd 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <stdbool.h>
 
-#include "syscommon-plugin-common.h"
+#include <system/syscommon-plugin-common.h>
 
 #ifdef __cplusplus
 extern "C" {
index 19daa1a..0525b0a 100644 (file)
@@ -27,8 +27,8 @@
 #include <gio/gio.h>
 #include <glib-object.h>
 
-#include "syscommon-plugin-common.h"
-#include "syscommon-plugin-common-interface.h"
+#include <system/syscommon-plugin-common.h>
+#include <system/syscommon-plugin-common-interface.h>
 
 #include "common.h"
 #include "syscommon-plugin-api-conf.h"
index 20e8b32..17dbbe8 100644 (file)
@@ -28,7 +28,7 @@
 #include <gio/gio.h>
 #include <glib-object.h>
 
-#include "syscommon-plugin-common-interface.h"
+#include <system/syscommon-plugin-common-interface.h>
 
 #ifdef __cplusplus
 extern "C" {
index 29562d1..9271370 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef __SYSCOMMON_PLUGIN_API_LIST_H__
 #define __SYSCOMMON_PLUGIN_API_LIST_H__
 
-#include "syscommon-plugin-common.h"
+#include <system/syscommon-plugin-common.h>
 
 #include "common.h"
 
index 644c594..c51dce5 100644 (file)
@@ -53,7 +53,7 @@ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${PLUGIN_API_DEVICED_VE
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PLUGIN_API_DEVICED_MAJORVER})
 
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/system/
        DESTINATION ${INCLUDEDIR}
        FILES_MATCHING PATTERN "*.h"
 )
@@ -29,8 +29,8 @@
 extern "C" {
 #endif
 
-#include "syscommon-plugin-deviced-common-interface.h"
-#include "syscommon-plugin-deviced-display-interface.h"
+#include <system/syscommon-plugin-deviced-common-interface.h>
+#include <system/syscommon-plugin-deviced-display-interface.h>
 
 /**
  * @brief Get the backend data of deviced-display module
diff --git a/src/plugin-api/deviced/src/common.h b/src/plugin-api/deviced/src/common.h
deleted file mode 100644 (file)
index 236c616..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * MIT License
- *
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is furnished
- * to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef __COMMON_H__
-#define __COMMON_H__
-
-#ifdef ENABLE_DLOG
-#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(fmt, args...) do { } while(0)
-#define _I(fmt, args...) do { } while(0)
-#define _W(fmt, args...) do { } while(0)
-#define _E(fmt, args...) do { } while(0)
-#endif
-
-#endif /* __COMMON_H__ */
index f242f2d..bf459ae 100644 (file)
  */
 #include <glib.h>
 
-#include "syscommon-plugin-common.h"
+#include <libsyscommon/log.h>
 
-#include "common.h"
-#include "syscommon-plugin-deviced-battery.h"
-#include "syscommon-plugin-deviced-battery-interface.h"
+#include <system/syscommon-plugin-common.h>
+#include <system/syscommon-plugin-deviced-battery.h>
+#include <system/syscommon-plugin-deviced-battery-interface.h>
 
 #ifndef EXPORT
 #define EXPORT __attribute__((visibility("default")))
index ba04d4e..8819c47 100644 (file)
  */
 #include <glib.h>
 
-#include "syscommon-plugin-common.h"
+#include <libsyscommon/log.h>
 
-#include "common.h"
-#include "syscommon-plugin-deviced-display.h"
-#include "syscommon-plugin-deviced-display-interface.h"
+#include <system/syscommon-plugin-common.h>
+#include <system/syscommon-plugin-deviced-display.h>
+#include <system/syscommon-plugin-deviced-display-interface.h>
 
 #ifndef EXPORT
 #define EXPORT __attribute__((visibility("default")))
index 350e574..2e74d8c 100644 (file)
  */
 #include <glib.h>
 
-#include "syscommon-plugin-common.h"
+#include <libsyscommon/log.h>
 
-#include "common.h"
-#include "syscommon-plugin-deviced-input.h"
-#include "syscommon-plugin-deviced-input-interface.h"
+#include <system/syscommon-plugin-common.h>
+#include <system/syscommon-plugin-deviced-input.h>
+#include <system/syscommon-plugin-deviced-input-interface.h>
 
 #ifndef EXPORT
 #define EXPORT __attribute__((visibility("default")))
index 9060f8e..d595753 100644 (file)
@@ -52,7 +52,7 @@ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${PLUGIN_API_RESOURCED_
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PLUGIN_API_RESOURCED_MAJORVER})
 
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/system/
        DESTINATION ${INCLUDEDIR}
        FILES_MATCHING PATTERN "*.h"
 )
diff --git a/src/plugin-api/resourced/src/common.h b/src/plugin-api/resourced/src/common.h
deleted file mode 100644 (file)
index 236c616..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * MIT License
- *
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is furnished
- * to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef __COMMON_H__
-#define __COMMON_H__
-
-#ifdef ENABLE_DLOG
-#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(fmt, args...) do { } while(0)
-#define _I(fmt, args...) do { } while(0)
-#define _W(fmt, args...) do { } while(0)
-#define _E(fmt, args...) do { } while(0)
-#endif
-
-#endif /* __COMMON_H__ */
index 431625a..0d97201 100644 (file)
 #include <assert.h>
 #include <glib.h>
 
-#include "syscommon-plugin-common.h"
+#include <libsyscommon/log.h>
 
-#include "common.h"
-#include "syscommon-plugin-resourced-memory-lmk.h"
-#include "syscommon-plugin-resourced-memory-lmk-interface.h"
+#include <system/syscommon-plugin-common.h>
+#include <system/syscommon-plugin-resourced-memory-lmk.h>
+#include <system/syscommon-plugin-resourced-memory-lmk-interface.h>
 
 #ifndef EXPORT
 #define EXPORT __attribute__((visibility("default")))