pass: Make include directory containing the exported header files 35/168335/1
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 26 Jan 2018 00:57:48 +0000 (09:57 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 26 Jan 2018 01:15:37 +0000 (10:15 +0900)
Existing *.[ch] files uses the following type in order to include
the header file which is located in the outside directory. But it is
not proper method for including the header file.
- #include "core/*.h:

Make 'include' directory containing the all exported header files
and move the exported header files under 'include/' as following:
- src/core/*.h   -> include/pass/log.h
- src/shared/*.h -> include/pass/*.h
- src/hal/hal.h  -> include/pass/hal/hal.h

Change-Id: I68f6ad4c711b50a1d48bee3785d5657a8b58c963
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
25 files changed:
CMakeLists.txt
include/pass/common.h [moved from src/core/common.h with 100% similarity]
include/pass/config-parser.h [moved from src/core/config-parser.h with 100% similarity]
include/pass/device-notifier.h [moved from src/core/device-notifier.h with 100% similarity]
include/pass/devices.h [moved from src/core/devices.h with 100% similarity]
include/pass/gdbus-util.h [moved from src/core/gdbus-util.h with 100% similarity]
include/pass/hal/hal.h [moved from src/hal/hal.h with 100% similarity]
include/pass/log.h [moved from src/shared/log.h with 100% similarity]
src/core/common.c
src/core/config-parser.c
src/core/device-notifier.c
src/core/devices.c
src/core/gdbus-util.c
src/core/main.c
src/hal/CMakeLists.txt
src/hal/hal.c
src/pass/pass-gov.c
src/pass/pass-hal.c
src/pass/pass-hal.h
src/pass/pass-parser.c
src/pass/pass-pmqos.c
src/pass/pass.c
src/pass/pass.h
src/pmqos/pmqos-parser.c
src/pmqos/pmqos.c

index 048523b..1b6053f 100644 (file)
@@ -87,8 +87,7 @@ SET(SRCS
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src/pass)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src/hal)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
 SET(PKG_MODULES
        vconf
similarity index 100%
rename from src/core/common.h
rename to include/pass/common.h
similarity index 100%
rename from src/core/devices.h
rename to include/pass/devices.h
similarity index 100%
rename from src/hal/hal.h
rename to include/pass/hal/hal.h
similarity index 100%
rename from src/shared/log.h
rename to include/pass/log.h
index b75a016..a0ee779 100644 (file)
@@ -34,9 +34,8 @@
 #include <poll.h>
 #include <mntent.h>
 
-#include "shared/log.h"
-
-#include "common.h"
+#include <pass/log.h>
+#include <pass/common.h>
 
 #define BUFF_MAX       255
 
index d0e2632..b13a5b2 100644 (file)
@@ -20,9 +20,8 @@
 #include <string.h>
 #include <errno.h>
 
-#include "shared/log.h"
-
-#include "config-parser.h"
+#include <pass/log.h>
+#include <pass/config-parser.h>
 
 #define BUFF_MAX       255
 #define MAX_SECTION    64
index 4a03ead..2c6e99b 100644 (file)
 
 #include <glib.h>
 
-#include "shared/log.h"
-
-#include "device-notifier.h"
-#include "common.h"
+#include <pass/common.h>
+#include <pass/device-notifier.h>
+#include <pass/log.h>
 
 #define DEVICE_NOTIFIER_MAX_COUNT      255
 
index 46ca468..42e193c 100644 (file)
 #include <glib.h>
 #include <stdio.h>
 
-#include "shared/log.h"
-
-#include "common.h"
-#include "devices.h"
+#include <pass/common.h>
+#include <pass/devices.h>
+#include <pass/log.h>
 
 static const struct device_ops default_ops = {
        .name = "default-ops",
index 0702dc2..42d21b8 100644 (file)
@@ -19,8 +19,8 @@
 #include <errno.h>
 #include <stdbool.h>
 
-#include "gdbus-util.h"
-#include "shared/log.h"
+#include <pass/gdbus-util.h>
+#include <pass/log.h>
 
 static GDBusConnection *g_dbus_sys_conn = NULL;
 
index 9b56d8c..a3c2542 100644 (file)
 #include <gio/gio.h>
 #include <sys/reboot.h>
 
-#include "shared/log.h"
-
-#include "common.h"
-#include "device-notifier.h"
-#include "devices.h"
-#include "gdbus-util.h"
+#include <pass/common.h>
+#include <pass/device-notifier.h>
+#include <pass/devices.h>
+#include <pass/gdbus-util.h>
+#include <pass/log.h>
 
 #define PASS_DBUS_BUS_NAME     "org.tizen.system.pass"
 
index ade8159..c0f1fbc 100755 (executable)
@@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 PROJECT(pass-hal-devel C)
 
 SET(HAL_HEADERS
-       hal.h
+       ../../include/pass/hal/hal.h
        hal-log.h
 )
 
index 2f65a71..beadab5 100644 (file)
@@ -24,7 +24,8 @@
 #include <errno.h>
 #include <linux/limits.h>
 
-#include "hal.h"
+#include <pass/hal/hal.h>
+
 #include "hal-log.h"
 
 #ifndef EXPORT
index 19febfd..6601220 100644 (file)
 #include <stdlib.h>
 #include <sys/time.h>
 
+#include <pass/device-notifier.h>
+#include <pass/config-parser.h>
+
 #include "pass.h"
 #include "pass-gov.h"
 #include "pass-pmqos.h"
 #include "pass-hal.h"
 #include "pass-rescon.h"
 
-#include "core/device-notifier.h"
-#include "core/config-parser.h"
-
 #define PASS_CPU_STATS_MAX_COUNT       20
 
 struct pass_governor {
index 48d1e33..0d91fcc 100644 (file)
 #include <errno.h>
 #include <fcntl.h>
 
+#include <pass/common.h>
+
 #include "pass.h"
 #include "pass-hal.h"
 
-#include "core/common.h"
-
 static struct pass_resource_dvfs_ops *get_dvfs(struct pass_resource *res,
                                                int res_type)
 {
index 172b0a4..8d1fd6f 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __PASS_HAL__
 #define __PASS_HAL__
 
-#include "hal/hal.h"
+#include <pass/hal/hal.h>
 
 /***
  * Functions for all H/W resources
index 12e6ce7..57a08cc 100644 (file)
 #include <errno.h>
 #include <fcntl.h>
 
-#include "pass.h"
+#include <pass/common.h>
+#include <pass/config-parser.h>
+#include <pass/hal/hal.h>
 
-#include "core/common.h"
-#include "core/config-parser.h"
-#include "hal/hal.h"
+#include "pass.h"
 
 #define MAX_NUM                                255
 #define MIN_TIMEOUT_SEC                0.2
index 22668b2..64606f0 100644 (file)
 #include <stdlib.h>
 #include <sys/time.h>
 
+#include <pass/device-notifier.h>
+#include <pass/config-parser.h>
+
 #include "pass.h"
 #include "pass-gov.h"
 #include "pass-rescon.h"
 
-#include "core/device-notifier.h"
-#include "core/config-parser.h"
-
 /****************************************************************************
  *                             PASS Notifier                                *
  * - DEVICE_NOTIFIER_PMQOS                                                  *
index 9cf90d2..c85d440 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <pass/common.h>
+#include <pass/device-notifier.h>
+#include <pass/devices.h>
+#include <pass/gdbus-util.h>
+
 #include "pass.h"
 #include "pass-parser.h"
 #include "pass-hal.h"
 #include "pass-gov.h"
 
-#include "core/device-notifier.h"
-#include "core/devices.h"
-#include "core/common.h"
-#include "core/gdbus-util.h"
-
 #define DBUS_CORE_I_START_HANDLER              "handle_start"
 #define DBUS_CORE_I_STOP_HANDLER               "handle_stop"
 #define DBUS_CORE_I_NUM_SIGNALS                        2
index c5959fd..adaffcd 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <glib.h>
 
-#include "shared/log.h"
+#include <pass/log.h>
 
 #define BUFF_MAX               255
 
index 6d6b83c..8352f08 100644 (file)
@@ -24,8 +24,8 @@
 #include <errno.h>
 #include <string.h>
 
-#include "core/config-parser.h"
-#include "shared/log.h"
+#include <pass/log.h>
+#include <pass/config-parser.h>
 
 #include "pmqos.h"
 
index 78854dd..88d19ab 100644 (file)
 #include <stdio.h>
 #include <limits.h>
 
-#include "core/gdbus-util.h"
-#include "core/devices.h"
-#include "core/common.h"
-#include "core/device-notifier.h"
-#include "shared/log.h"
+#include <pass/common.h>
+#include <pass/devices.h>
+#include <pass/device-notifier.h>
+#include <pass/gdbus-util.h>
+#include <pass/log.h>
 
 #include "pmqos.h"