refactoring system-server code structure 21/11421/2
authorjy910.yun <jy910.yun@samsung.com>
Mon, 28 Oct 2013 01:51:52 +0000 (10:51 +0900)
committerjy910.yun <jy910.yun@samsung.com>
Mon, 28 Oct 2013 02:11:20 +0000 (11:11 +0900)
make some directory depending on the type of device
 :core(main), battery, bs, cpu, mmc, cpu, proc, ta, time, usb and vibrator
each "c" file move into suitable directory

Signed-off-by: jy910.yun <jy910.yun@samsung.com>
Change-Id: Id4ce8696dbc168f3882c6ed1e777559bf59d35c8

46 files changed:
CMakeLists.txt
packaging/system-server.changes
scripts/mmc-smack-label [moved from mmc-smack-label with 100% similarity]
scripts/movi_format.sh [moved from movi_format.sh with 100% similarity]
scripts/shutdown.sh [moved from shutdown.sh with 100% similarity]
src/battery/lowbat-handler.c [moved from ss_lowbat_handler.c with 98% similarity]
src/bs/bs.c [moved from ss_bs.c with 99% similarity]
src/bs/bs.h [moved from ss_bs.h with 90% similarity]
src/core/common.c [moved from ss_common.c with 100% similarity]
src/core/common.h [new file with mode: 0644]
src/core/core.c [moved from ss_core.c with 96% similarity]
src/core/core.h [moved from ss_core.h with 87% similarity]
src/core/data.h [moved from include/ss_data.h with 97% similarity]
src/core/device-change-handler.c [moved from ss_device_change_handler.c with 99% similarity]
src/core/device-handler.h [moved from ss_device_handler.h with 89% similarity]
src/core/launch.c [moved from ss_launch.c with 99% similarity]
src/core/launch.h [moved from ss_launch.h with 91% similarity]
src/core/log.c [moved from ss_log.c with 100% similarity]
src/core/log.h [moved from ss_log.h with 98% similarity]
src/core/main.c [moved from ss_main.c with 87% similarity]
src/core/noti.c [moved from ss_noti.c with 98% similarity]
src/core/noti.h [moved from ss_noti.h with 91% similarity]
src/core/predefine.c [moved from ss_predefine.c with 98% similarity]
src/core/predefine.h [moved from ss_predefine.h with 90% similarity]
src/core/queue.c [moved from ss_queue.c with 98% similarity]
src/core/queue.h [moved from ss_queue.h with 94% similarity]
src/core/sig-handler.c [moved from ss_sig_handler.c with 98% similarity]
src/core/sig-handler.h [moved from ss_sig_handler.h with 87% similarity]
src/core/sysnoti.c [moved from ss_sysnoti.c with 99% similarity]
src/core/sysnoti.h [moved from ss_sysnoti.h with 90% similarity]
src/cpu/cpu-handler.c [moved from ss_cpu_handler.c with 99% similarity]
src/cpu/cpu-handler.h [moved from ss_cpu_handler.h with 92% similarity]
src/mmc/mmc-handler.c [moved from ss_mmc_handler.c with 99% similarity]
src/proc/lowmem-handler.c [moved from ss_lowmem_handler.c with 98% similarity]
src/proc/pmon-handler.c [moved from ss_pmon_handler.c with 98% similarity]
src/proc/pmon-handler.h [moved from ss_pmon_handler.h with 84% similarity]
src/proc/procmgr.c [moved from ss_procmgr.c with 99% similarity]
src/proc/procmgr.h [moved from ss_procmgr.h with 90% similarity]
src/ta/ta-handler.c [moved from ss_ta_handler.c with 94% similarity]
src/time/time-handler.c [moved from ss_timemgr.c with 98% similarity]
src/time/time-handler.h [moved from ss_timemgr.h with 89% similarity]
src/usb/usb-handler.c [moved from ss_usb_handler.c with 93% similarity]
src/vibrator/vibrator.c [moved from ss_vibrator.c with 98% similarity]
src/vibrator/vibrator.h [moved from ss_vibrator.h with 89% similarity]
ss_common.h [deleted file]
sys_pci_noti/sys_pci_noti.c

index f6f6a9f..1892dae 100755 (executable)
@@ -6,28 +6,28 @@ SET(DEVICED_NAME deviced)
 SET(VERSION 0.1.0)
 
 SET(SRCS
-       ss_main.c
-       ss_sysnoti.c
-       ss_launch.c
-       ss_queue.c
-       ss_core.c
-       ss_sig_handler.c
-       ss_log.c
-       ss_device_change_handler.c
-       ss_predefine.c
-       ss_noti.c
-       ss_lowbat_handler.c
-       ss_lowmem_handler.c
-       ss_pmon_handler.c
-       ss_mmc_handler.c
-       ss_usb_handler.c
-       ss_ta_handler.c
-       ss_bs.c
-       ss_procmgr.c
-       ss_timemgr.c
-       ss_cpu_handler.c
-       ss_common.c
-       ss_vibrator.c)
+       src/core/main.c
+       src/core/sysnoti.c
+       src/core/launch.c
+       src/core/queue.c
+       src/core/core.c
+       src/core/sig-handler.c
+       src/core/log.c
+       src/core/device-change-handler.c
+       src/core/predefine.c
+       src/core/noti.c
+       src/battery/lowbat-handler.c
+       src/proc/lowmem-handler.c
+       src/proc/pmon-handler.c
+       src/mmc/mmc-handler.c
+       src/usb/usb-handler.c
+       src/ta/ta-handler.c
+       src/bs/bs.c
+       src/proc/procmgr.c
+       src/time/time-handler.c
+       src/cpu/cpu-handler.c
+       src/core/common.c
+       src/vibrator/vibrator.c)
 
 # libdeviced
 SET(DEVICED_SRCS
@@ -36,12 +36,12 @@ SET(DEVICED_SRCS
 SET(DEVICED_HEADERS
        src/deviced/dd-battery.h)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src)
 
 # libdeviced
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src/deviced)
 
-SET(MOVINAND_FORMAT movi_format.sh)
+SET(MOVINAND_FORMAT scripts/movi_format.sh)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED
@@ -67,9 +67,7 @@ ENDFOREACH(flag)
 
 # libdeviced
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
-
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions")
-
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 MESSAGE("FLAGS: ${CMAKE_C_FLAGS}")
@@ -108,8 +106,8 @@ INSTALL(FILES ${MOVINAND_FORMAT} DESTINATION bin)
 INSTALL(FILES ${UDEV_RULES} DESTINATION ${UDEV_RULES_PATH})
 INSTALL(FILES system-server.conf DESTINATION /etc/dbus-1/system.d)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/system-server.rule DESTINATION /opt/etc/smack/accesses.d)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mmc-smack-label DESTINATION bin)
-INSTALL(PROGRAMS shutdown.sh DESTINATION /usr/lib/system-server)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/mmc-smack-label DESTINATION bin)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/shutdown.sh DESTINATION /usr/lib/system-server)
 
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/systemd/system-server.service DESTINATION /usr/lib/systemd/system)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/systemd/system-server.socket  DESTINATION /usr/lib/systemd/system)
index d048d0a..31be7ce 100644 (file)
@@ -1,3 +1,6 @@
+* Mon Oct 27 2013 Jiyoung Yun <jy910.yun@samsung.com> accepted/tizen/20130912.195534@09ee5a9
+- refactoring system-server code structure
+
 * Thu Aug 22 2013 Maciej Wereski <m.wereski@partner.samsung.com> accepted/tizen/20130710.221248@1177917
 - Move rc.shutdown from system-plugin-slp
 
similarity index 100%
rename from mmc-smack-label
rename to scripts/mmc-smack-label
similarity index 100%
rename from movi_format.sh
rename to scripts/movi_format.sh
similarity index 100%
rename from shutdown.sh
rename to scripts/shutdown.sh
similarity index 98%
rename from ss_lowbat_handler.c
rename to src/battery/lowbat-handler.c
index 5f97290..07b30bd 100755 (executable)
 #include <vconf.h>
 #include <sysman.h>
 #include <fcntl.h>
+#include <device-node.h>
 
-#include "ss_log.h"
-#include "ss_launch.h"
-#include "ss_noti.h"
-#include "ss_queue.h"
-#include "device-node.h"
-#include "include/ss_data.h"
+#include "core/log.h"
+#include "core/launch.h"
+#include "core/noti.h"
+#include "core/queue.h"
+#include "core/data.h"
 
 #define BAT_MON_INTERVAL               30
 #define BAT_MON_INTERVAL_MIN           2
similarity index 99%
rename from ss_bs.c
rename to src/bs/bs.c
index 20a2c3e..33ec8cd 100644 (file)
--- a/ss_bs.c
@@ -30,8 +30,8 @@
 #include <dirent.h>
 #include <Ecore_File.h>
 
-#include "ss_log.h"
-#include "ss_launch.h"
+#include "core/log.h"
+#include "core/launch.h"
 
 #define CRASH_PID_MAX 7
 #define CRASH_MODE_MAX 2
similarity index 90%
rename from ss_bs.h
rename to src/bs/bs.h
index b7cc77f..c4ca9ce 100644 (file)
--- a/ss_bs.h
@@ -15,9 +15,9 @@
  */
 
 
-#ifndef __SS_BS_H__
-#define __SS_BS_H__
+#ifndef __BS_H__
+#define __BS_H__
 
 int ss_bs_init(void);
 
-#endif /* __SS_BS_H__ */
+#endif /* __BS_H__ */
similarity index 100%
rename from ss_common.c
rename to src/core/common.c
diff --git a/src/core/common.h b/src/core/common.h
new file mode 100644 (file)
index 0000000..6f1c2d7
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __COMMON_H__
+#define __COMMON_H__
+
+FILE * open_proc_oom_adj_file(int pid, const char *mode);
+
+#endif /* __COMMON_H__ */
+
similarity index 96%
rename from ss_core.c
rename to src/core/core.c
index a5fb577..3474d2c 100644 (file)
--- a/ss_core.c
 
 
 #include <sysman.h>
-#include "include/ss_data.h"
-#include "ss_queue.h"
-#include "ss_log.h"
-#include "ss_predefine.h"
-#include "ss_core.h"
+#include "data.h"
+#include "queue.h"
+#include "log.h"
+#include "predefine.h"
+#include "core.h"
 
 enum ss_core_cmd_type {
        SS_CORE_ACT_RUN,
similarity index 87%
rename from ss_core.h
rename to src/core/core.h
index d35e345..34f5501 100644 (file)
--- a/ss_core.h
  */
 
 
-#ifndef __SS_CORE_H__
-#define __SS_CORE_H__
+#ifndef __CORE_H__
+#define __CORE_H__
 
-#include "include/ss_data.h"
+#include "data.h"
 
 int ss_core_action_run();
 int ss_core_action_clear(int pid);
 int ss_core_init(struct ss_main_data *ad);
 
-#endif /* __SS_CORE_H__ */
+#endif /* __CORE_H__ */
similarity index 97%
rename from include/ss_data.h
rename to src/core/data.h
index 0a08245..bc6ecb2 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __SS_DATA_H__
-#define __SS_DATA_H__
+#ifndef __DATA_H__
+#define __DATA_H__
 
 #include <Ecore.h>
 #include <unistd.h>
@@ -108,4 +108,4 @@ struct ss_main_data {
        int noti_fd;
 };
 
-#endif /* __SS_DATA_H__ */
+#endif /* __DATA_H__ */
similarity index 99%
rename from ss_device_change_handler.c
rename to src/core/device-change-handler.c
index 9129a24..36ec7a7 100755 (executable)
 #include <bundle.h>
 #include <dirent.h>
 #include <libudev.h>
-#include "ss_queue.h"
-#include "ss_log.h"
-#include "ss_device_handler.h"
-#include "device-node.h"
-#include "ss_noti.h"
-#include "include/ss_data.h"
+#include <device-node.h>
+#include "queue.h"
+#include "log.h"
+#include "device-handler.h"
+#include "noti.h"
+#include "data.h"
 #include "sys_pci_noti/sys_pci_noti.h"
-#include "ss_predefine.h"
+#include "predefine.h"
 #define BUFF_MAX               255
 #define SYS_CLASS_INPUT                "/sys/class/input"
 #define USBCON_EXEC_PATH       PREFIX"/bin/usb-server"
similarity index 89%
rename from ss_device_handler.h
rename to src/core/device-handler.h
index d31f46b..7ebafd3 100644 (file)
  */
 
 
-#ifndef __SS_DEVICE_HANDLER_H__
-#define __SS_DEVICE_HANDLER_H__
+#ifndef __DEVICE_HANDLER_H__
+#define __DEVICE_HANDLER_H__
 
-#include "include/ss_data.h"
+#include "data.h"
 
 /* MMC functions */
 int ss_mmc_init();
@@ -46,4 +46,4 @@ int ss_ta_init();
 /* device change init */
 int ss_device_change_init(struct ss_main_data *ad);
 
-#endif /* __SS_DEVICE_HANDLER_H__ */
+#endif /* __DEVICE_HANDLER_H__ */
similarity index 99%
rename from ss_launch.c
rename to src/core/launch.c
index 24b77c8..aeab227 100644 (file)
@@ -25,8 +25,8 @@
 #include <stdlib.h>
 
 #include "vconf-keys.h"
-#include "ss_log.h"
-#include "ss_launch.h"
+#include "log.h"
+#include "launch.h"
 
 #define MAX_ARGS 255
 
similarity index 91%
rename from ss_launch.h
rename to src/core/launch.h
index 209d383..e69fc83 100644 (file)
@@ -15,8 +15,8 @@
  */
 
 
-#ifndef __SS_LAUNCH_H__
-#define __SS_LAUNCH_H__
+#ifndef __LAUNCH_H__
+#define __LAUNCH_H__
 
 #define SS_LAUNCH_NICE          0x0002
 
@@ -24,4 +24,4 @@ int ss_launch_if_noexist(const char *execpath, const char *arg, ...);
 int ss_launch_evenif_exist(const char *execpath, const char *arg, ...);
 int ss_launch_after_kill_if_exist(const char *execpath, const char *arg, ...);
 
-#endif /* __SS_LAUNCH_H__ */
+#endif /* __LAUNCH_H__ */
similarity index 100%
rename from ss_log.c
rename to src/core/log.c
similarity index 98%
rename from ss_log.h
rename to src/core/log.h
index db769d0..4cc97c6 100644 (file)
--- a/ss_log.h
@@ -15,8 +15,8 @@
  */
 
 
-#ifndef __SS_LOG_H__
-#define __SS_LOG_H__
+#ifndef __LOG_H__
+#define __LOG_H__
 
 #include <stdio.h>
 
similarity index 87%
rename from ss_main.c
rename to src/core/main.c
index d103b50..abd8917 100644 (file)
--- a/ss_main.c
 #include <heynoti.h>
 #include <sys/reboot.h>
 
-#include "ss_log.h"
-#include "ss_core.h"
-#include "ss_sig_handler.h"
-#include "ss_device_handler.h"
-#include "ss_pmon_handler.h"
-#include "ss_sysnoti.h"
-#include "ss_noti.h"
-#include "ss_queue.h"
-#include "ss_predefine.h"
-#include "ss_bs.h"
-#include "ss_procmgr.h"
-#include "ss_timemgr.h"
-#include "ss_cpu_handler.h"
-#include "include/ss_data.h"
+#include "log.h"
+#include "core.h"
+#include "sig-handler.h"
+#include "device-handler.h"
+#include "proc/pmon-handler.h"
+#include "sysnoti.h"
+#include "noti.h"
+#include "queue.h"
+#include "predefine.h"
+#include "bs/bs.h"
+#include "proc/procmgr.h"
+#include "time/time-handler.h"
+#include "cpu/cpu-handler.h"
+#include "data.h"
 
 static void fini(struct ss_main_data *ad)
 {
similarity index 98%
rename from ss_noti.c
rename to src/core/noti.c
index c9ed285..9de6a7c 100644 (file)
--- a/ss_noti.c
@@ -16,7 +16,7 @@
 
 
 #include <heynoti.h>
-#include "ss_log.h"
+#include "log.h"
 
 static int noti_fd;
 
similarity index 91%
rename from ss_noti.h
rename to src/core/noti.h
index 8040035..025e616 100644 (file)
--- a/ss_noti.h
  */
 
 
-#ifndef __SS_NOTI_H__
-#define __SS_NOTI_H__
+#ifndef __NOTI_H__
+#define __NOTI_H__
 
 int ss_noti_getfd(void);
 int ss_noti_send(char *filename);
 int ss_noti_add(const char *noti, void (*cb) (void *), void *data);
 int ss_noti_init(void);
 
-#endif /* __SS_NOTI_H__ */
+#endif /* __NOTI_H__ */
similarity index 98%
rename from ss_predefine.c
rename to src/core/predefine.c
index 82980e0..50e2660 100644 (file)
 #include <sys/time.h>
 #include <mntent.h>
 #include <sys/mount.h>
-
-#include "ss_log.h"
-#include "ss_launch.h"
-#include "ss_queue.h"
-#include "ss_device_handler.h"
-#include "device-node.h"
-#include "ss_predefine.h"
-#include "ss_procmgr.h"
-#include "ss_vibrator.h"
-#include "include/ss_data.h"
-#include "ss_common.h"
+#include <device-node.h>
+
+#include "log.h"
+#include "launch.h"
+#include "queue.h"
+#include "device-handler.h"
+#include "predefine.h"
+#include "proc/procmgr.h"
+#include "vibrator/vibrator.h"
+#include "data.h"
+#include "common.h"
 
 #define PREDEFINE_SO_DIR               PREFIX"/lib/ss_predefine/"
 
similarity index 90%
rename from ss_predefine.h
rename to src/core/predefine.h
index 1548ec7..eb7bed9 100644 (file)
@@ -15,8 +15,8 @@
  */
 
 
-#ifndef __SS_PREDEFINE_H__
-#define __SS_PREDEFINE_H__
+#ifndef __PREDEFINE_H__
+#define __PREDEFINE_H__
 #include <bundle.h>
 
 int call_predefine_action(int argc, char **argv);
@@ -24,4 +24,4 @@ void ss_predefine_internal_init(void);
 int is_power_off(void);
 void predefine_pm_change_state(unsigned int s_bits);
 int predefine_control_launch(char *popup_name, bundle *b);
-#endif /* __SS_PREDEFINE_H__ */
+#endif /* __PREDEFINE_H__ */
similarity index 98%
rename from ss_queue.c
rename to src/core/queue.c
index 4269d10..d8f0bce 100644 (file)
 
 #include <sysman.h>
 #include <dlfcn.h>
-#include "include/ss_data.h"
-#include "ss_core.h"
-#include "ss_queue.h"
-#include "ss_log.h"
+#include "data.h"
+#include "core.h"
+#include "queue.h"
+#include "log.h"
 
 #define SS_PREDEFINE_ACT_FUNC_STR              "ss_predefine_action"
 #define SS_IS_ACCESSIBLE_FUNC_STR              "ss_is_accessible"
similarity index 94%
rename from ss_queue.h
rename to src/core/queue.h
index 6b9d899..e7778ab 100644 (file)
  */
 
 
-#ifndef __SS_QUEUE_H__
-#define __SS_QUEUE_H__
+#ifndef __QUEUE_H__
+#define __QUEUE_H__
 
-#include "ss_sysnoti.h"
+#include "sysnoti.h"
 
 struct ss_action_entry {
        int owner_pid;
@@ -63,4 +63,4 @@ int ss_run_queue_del_bypid(int pid);
 
 void ss_queue_init();
 
-#endif /* __SS_QUEUE_H__ */
+#endif /* __QUEUE_H__ */
similarity index 98%
rename from ss_sig_handler.c
rename to src/core/sig-handler.c
index b81dc55..0e5c3f1 100644 (file)
@@ -18,7 +18,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include "ss_core.h"
+#include "core.h"
 
 #define PRT_TRACE_ERR(format, args...) do { \
        char buf[255];\
similarity index 87%
rename from ss_sig_handler.h
rename to src/core/sig-handler.h
index 08ab66f..2b4e4de 100644 (file)
@@ -15,9 +15,9 @@
  */
 
 
-#ifndef __SS_SIG_HANDLER_H__
-#define __SS_SIG_HANDLER_H__
+#ifndef __SIG_HANDLER_H__
+#define __SIG_HANDLER_H__
 
 void ss_signal_init(void);
 
-#endif /*  __SS_SIG_HANDLER_H__ */
+#endif /*  __SIG_HANDLER_H__ */
similarity index 99%
rename from ss_sysnoti.c
rename to src/core/sysnoti.c
index ec93479..a1f740c 100755 (executable)
@@ -22,9 +22,9 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <sys/stat.h>
-#include "include/ss_data.h"
-#include "ss_log.h"
-#include "ss_queue.h"
+#include "data.h"
+#include "log.h"
+#include "queue.h"
 
 #define SYSNOTI_SOCKET_PATH "/tmp/sn"
 #define RETRY_READ_COUNT       5
similarity index 90%
rename from ss_sysnoti.h
rename to src/core/sysnoti.h
index e76d156..2095038 100644 (file)
@@ -15,8 +15,8 @@
  */
 
 
-#ifndef __SS_SYSNOTI_H__
-#define __SS_SYSNOTI_H__
+#ifndef __SYSNOTI_H__
+#define __SYSNOTI_H__
 
 #define SYSMAN_MAXARG  16
 
@@ -31,4 +31,4 @@ struct sysnoti {
 
 int ss_sysnoti_init(void);
 
-#endif /* __SS_SYSNOTI_H__ */
+#endif /* __SYSNOTI_H__ */
similarity index 99%
rename from ss_cpu_handler.c
rename to src/cpu/cpu-handler.c
index e9a808e..53eec05 100644 (file)
 
 
 #include <fcntl.h>
+#include <device-node.h>
+#include <vconf.h>
 
-#include "device-node.h"
-#include "ss_log.h"
-#include "include/ss_data.h"
-#include "vconf.h"
+#include "core/log.h"
+#include "core/data.h"
 
 #define DEFAULT_MAX_CPU_FREQ           1200000
 #define DEFAULT_MIN_CPU_FREQ           100000
similarity index 92%
rename from ss_cpu_handler.h
rename to src/cpu/cpu-handler.h
index 7c72eb7..9ff9f56 100644 (file)
@@ -15,8 +15,8 @@
  */
 
 
-#ifndef __SS_CPU_HANDLER_H__
-#define __SS_CPU_HANDLER_H__
+#ifndef __CPU_HANDLER_H__
+#define __CPU_HANDLER_H__
 
 int ss_cpu_handler_init(void);
 
similarity index 99%
rename from ss_mmc_handler.c
rename to src/mmc/mmc-handler.c
index 126175d..831dc0b 100644 (file)
@@ -25,9 +25,9 @@
 #include <dirent.h>
 #include <sys/statfs.h>
 #include <bundle.h>
-#include "ss_log.h"
-#include "ss_device_handler.h"
-#include "ss_predefine.h"
+#include "core/log.h"
+#include "core/device-handler.h"
+#include "core/predefine.h"
 
 #define VCONFKEY_INTERNAL_PRIVATE_MMC_ID       "db/private/sysman/mmc_device_id"
 
similarity index 98%
rename from ss_lowmem_handler.c
rename to src/proc/lowmem-handler.c
index fb6db58..c76b605 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/shm.h>
+#include <device-node.h>
 
-#include "device-node.h"
-#include "ss_log.h"
-#include "ss_noti.h"
-#include "ss_queue.h"
-#include "include/ss_data.h"
+#include "core/log.h"
+#include "core/noti.h"
+#include "core/queue.h"
+#include "core/data.h"
 
 #define DELETE_SM              "sh -c "PREFIX"/bin/delete.sm"
 
similarity index 98%
rename from ss_pmon_handler.c
rename to src/proc/pmon-handler.c
index c5476be..6371556 100644 (file)
 #include <limits.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <device-node.h>
 
-#include "device-node.h"
-#include "ss_log.h"
-#include "ss_launch.h"
-#include "include/ss_data.h"
-#include "ss_common.h"
+#include "core/log.h"
+#include "core/launch.h"
+#include "core/data.h"
+#include "core/common.h"
 
 #define PMON_PERMANENT_DIR     "/tmp/permanent"
 
similarity index 84%
rename from ss_pmon_handler.h
rename to src/proc/pmon-handler.h
index 70c7fe4..0eed81b 100644 (file)
  */
 
 
-#ifndef __SS_PMON_HANDLER_H__
-#define __SS_PMON_HANDLER_H__
+#ifndef __PMON_HANDLER_H__
+#define __PMON_HANDLER_H__
 
-#include "include/ss_data.h"
+#include "core/data.h"
 
 int ss_pmon_init(struct ss_main_data *ad);
 
-#endif /* __SS_PMON_HANDLER_H__ */
+#endif /* __PMON_HANDLER_H__ */
similarity index 99%
rename from ss_procmgr.c
rename to src/proc/procmgr.c
index de789eb..d951760 100755 (executable)
@@ -23,9 +23,9 @@
 #include <device-node.h>
 
 #include <sysman.h>
-#include "include/ss_data.h"
-#include "ss_queue.h"
-#include "ss_log.h"
+#include "core/data.h"
+#include "core/queue.h"
+#include "core/log.h"
 
 #define LIMITED_BACKGRD_NUM 15
 #define MAX_BACKGRD_OOMADJ (OOMADJ_BACKGRD_UNLOCKED + LIMITED_BACKGRD_NUM)
similarity index 90%
rename from ss_procmgr.h
rename to src/proc/procmgr.h
index d874e51..1e47671 100644 (file)
  */
 
 
-#ifndef __SS_PROCMGR_H__
-#define __SS_PROCMGR_H__
+#ifndef __PROCMGR_H__
+#define __PROCMGR_H__
 
 int ss_process_manager_init(void);
 
 int get_app_oomadj(int pid, int *oomadj);
 int set_app_oomadj(int pid, int new_oomadj);
 
-#endif /* __SS_PROCMGR_H__ */
+#endif /* __PROCMGR_H__ */
similarity index 94%
rename from ss_ta_handler.c
rename to src/ta/ta-handler.c
index ac1e38a..d28349a 100644 (file)
 #include <pmapi.h>
 #include <vconf.h>
 #include <sysman.h>
+#include <device-node.h>
 
-#include "device-node.h"
-#include "ss_log.h"
-#include "include/ss_data.h"
+#include "core/log.h"
+#include "core/data.h"
 
 #define RETRY  3
 
similarity index 98%
rename from ss_timemgr.c
rename to src/time/time-handler.c
index cecbbb1..367554b 100644 (file)
@@ -25,9 +25,9 @@
 #include <vconf.h>
 
 #include <sysman.h>
-#include "include/ss_data.h"
-#include "ss_queue.h"
-#include "ss_log.h"
+#include "core/data.h"
+#include "core/queue.h"
+#include "core/log.h"
 
 #include <time.h>
 #include <sys/ioctl.h>
similarity index 89%
rename from ss_timemgr.h
rename to src/time/time-handler.h
index 223f31e..6bcd49a 100644 (file)
@@ -15,9 +15,9 @@
  */
 
 
-#ifndef __SS_TIMEMGR_H__
-#define __SS_TIMEMGR_H__
+#ifndef __TIMEMGR_H__
+#define __TIMEMGR_H__
 
 int ss_time_manager_init(void);
 
-#endif /* __SS_TIMEMGR_H__ */
+#endif /* __TIMEMGR_H__ */
similarity index 93%
rename from ss_usb_handler.c
rename to src/usb/usb-handler.c
index 815aca7..f2b1238 100644 (file)
 #include <pmapi.h>
 #include <vconf.h>
 #include <sysman.h>
+#include <device-node.h>
 
-#include "ss_log.h"
-#include "device-node.h"
-#include "ss_launch.h"
-#include "include/ss_data.h"
+#include "core/log.h"
+#include "core/launch.h"
+#include "core/data.h"
 
 #define USBCON_EXEC_PATH       PREFIX"/bin/usb-server"
 #define RETRY                  3
similarity index 98%
rename from ss_vibrator.c
rename to src/vibrator/vibrator.c
index 9d5c7c8..30ca3cd 100644 (file)
@@ -18,9 +18,9 @@
 #include <glib.h>
 #include <device-node.h>
 
-#include "ss_log.h"
-#include "ss_predefine.h"
-#include "include/ss_data.h"
+#include "core/log.h"
+#include "core/predefine.h"
+#include "core/data.h"
 
 #ifndef MERGE_BTW_APPLICATIONS
 #define MERGE_BTW_APPLICATIONS
@@ -309,4 +309,4 @@ int haptic_def_predefine_action(int argc, char **argv)
        }
 
        return -1;
-}
\ No newline at end of file
+}
similarity index 89%
rename from ss_vibrator.h
rename to src/vibrator/vibrator.h
index 43c98c5..b6b8638 100644 (file)
@@ -15,9 +15,9 @@
  */
 
 
-#ifndef __SS_VIBRATOR_H__
-#define __SS_VIBRATOR_H__
+#ifndef __VIBRATOR_H__
+#define __VIBRATOR_H__
 
 int haptic_def_predefine_action(int argc, char **argv);
 
-#endif /* __SS_VIBRATOR_H__ */
+#endif /* __VIBRATOR_H__ */
diff --git a/ss_common.h b/ss_common.h
deleted file mode 100644 (file)
index a7af544..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _SS_COMMON_H
-#define _SS_COMMON_H
-
-FILE * open_proc_oom_adj_file(int pid, const char *mode);
-
-#endif /* _SS_COMMON_H */
-
index 919b82d..56ff61a 100755 (executable)
@@ -21,7 +21,7 @@
 #include <vconf.h>
 #include <syspopup_caller.h>
 #include <notification.h>
-#include "ss_log.h"
+#include "core/log.h"
 #include "sys_pci_noti.h"
 
 static void show_tickernoti(char *msg)
@@ -80,4 +80,4 @@ int main(int argc, char *argv[])
        }
 
        return 0;
-}
\ No newline at end of file
+}