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
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
# 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}")
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)
+* 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
#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
#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
*/
-#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__ */
--- /dev/null
+#ifndef __COMMON_H__
+#define __COMMON_H__
+
+FILE * open_proc_oom_adj_file(int pid, const char *mode);
+
+#endif /* __COMMON_H__ */
+
#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,
*/
-#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__ */
* limitations under the License.
*/
-#ifndef __SS_DATA_H__
-#define __SS_DATA_H__
+#ifndef __DATA_H__
+#define __DATA_H__
#include <Ecore.h>
#include <unistd.h>
int noti_fd;
};
-#endif /* __SS_DATA_H__ */
+#endif /* __DATA_H__ */
#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"
*/
-#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();
/* device change init */
int ss_device_change_init(struct ss_main_data *ad);
-#endif /* __SS_DEVICE_HANDLER_H__ */
+#endif /* __DEVICE_HANDLER_H__ */
#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
*/
-#ifndef __SS_LAUNCH_H__
-#define __SS_LAUNCH_H__
+#ifndef __LAUNCH_H__
+#define __LAUNCH_H__
#define SS_LAUNCH_NICE 0x0002
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__ */
*/
-#ifndef __SS_LOG_H__
-#define __SS_LOG_H__
+#ifndef __LOG_H__
+#define __LOG_H__
#include <stdio.h>
#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)
{
#include <heynoti.h>
-#include "ss_log.h"
+#include "log.h"
static int noti_fd;
*/
-#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__ */
#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/"
*/
-#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);
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__ */
#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"
*/
-#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;
void ss_queue_init();
-#endif /* __SS_QUEUE_H__ */
+#endif /* __QUEUE_H__ */
#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];\
*/
-#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__ */
#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
*/
-#ifndef __SS_SYSNOTI_H__
-#define __SS_SYSNOTI_H__
+#ifndef __SYSNOTI_H__
+#define __SYSNOTI_H__
#define SYSMAN_MAXARG 16
int ss_sysnoti_init(void);
-#endif /* __SS_SYSNOTI_H__ */
+#endif /* __SYSNOTI_H__ */
#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
*/
-#ifndef __SS_CPU_HANDLER_H__
-#define __SS_CPU_HANDLER_H__
+#ifndef __CPU_HANDLER_H__
+#define __CPU_HANDLER_H__
int ss_cpu_handler_init(void);
#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"
#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"
#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"
*/
-#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__ */
#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)
*/
-#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__ */
#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
#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>
*/
-#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__ */
#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
#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
}
return -1;
-}
\ No newline at end of file
+}
*/
-#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__ */
+++ /dev/null
-#ifndef _SS_COMMON_H
-#define _SS_COMMON_H
-
-FILE * open_proc_oom_adj_file(int pid, const char *mode);
-
-#endif /* _SS_COMMON_H */
-
#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)
}
return 0;
-}
\ No newline at end of file
+}