shared: Replace device_notifier_type with the libsyscommon 43/297343/1
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 17 Aug 2023 05:48:27 +0000 (14:48 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Thu, 17 Aug 2023 05:48:27 +0000 (14:48 +0900)
The prefix DEVICE_NOTIFIER has been replaced with DEVICE'D'_NOTIFIER.

Change-Id: Ie2600c7846ca9ac898b3b20f69e36bc8c45f9b3e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
59 files changed:
conf/battery.conf
plugins/iot-headed/display/key-filter.c
plugins/iot-headless/input/input-config.c
plugins/iot-headless/input/input-config.h
plugins/iot-headless/input/input-handler.c
plugins/mobile/battery/battery-notification.c
plugins/mobile/display/key-filter.c
plugins/tv/display/key-filter.c
plugins/wearable/display/auto-brightness-sensorhub.c
plugins/wearable/display/auto-brightness.c
plugins/wearable/display/bezel.c
plugins/wearable/display/core.c
plugins/wearable/display/device-interface.c
plugins/wearable/display/display-handler.c
plugins/wearable/display/enhance.c
plugins/wearable/display/hbm.c
plugins/wearable/display/key-filter.c
plugins/wearable/display/lbm.c
plugins/wearable/display/powersaver.c
plugins/wearable/display/swim.c
src/battery/battery-parser.c
src/battery/battery.h
src/battery/lowbat-handler.c
src/battery/power-supply.c
src/core/delayed-init-notifier.c
src/core/event-handler.c
src/core/main.c
src/core/udev.c
src/cpu/pmqos.c
src/display/ambient-mode.c
src/display/display-backlight.c
src/display/display-dbus.c
src/display/display-lock.c
src/display/display-misc.c
src/display/display-panel.c
src/display/display-signal.c
src/display/display-state-transition.c
src/display/display.c
src/display/lock-detector.c
src/extcon/cradle.c
src/extcon/extcon.c
src/led/touch-key.c
src/power/power-boot.c
src/power/power-doze.c
src/power/power-event-lock.c
src/power/power-off.c
src/power/power-suspend.c
src/power/power.c
src/power/power.h
src/shared/device-notifier.h
src/shared/event.c
src/thermal/thermal.c
src/time/time-handler.c
src/touchscreen/sensitivity.c
src/touchscreen/touchscreen.c
src/tzip/tzip.c
src/usb-gadget/usb-debug.c
src/usb-gadget/usb-tethering.c
src/usb-host/usb-host.c

index 381d99e922b5d5caa43629c80c245961ce7adbdf..5014c414a30ca9a023fc68401e228a678f6443f0 100644 (file)
@@ -21,13 +21,13 @@ ChargerWakeLockEnabled=yes
 #[EventAction]
 #Name=CHARGER_CONNECTED
 #Enum=2001
-#DeviceNotifier=DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED
+#DeviceNotifier=DEVICED_NOTIFIER_BATTERY_CHARGER_CONNECTED
 #ActionBroadcast=yes
 #WakeLockDurationSec=5
 
 #[EventAction]
 #Name=CHARGER_DISCONNECTED
 #Enum=2002
-#DeviceNotifier=DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED
+#DeviceNotifier=DEVICED_NOTIFIER_BATTERY_CHARGER_DISCONNECTED
 #ActionBroadcast=yes
 #WakeLockDurationSec=5
index c5a1d8fbde0743c189ff98734449c4985916d8ac..4baa6c30c387392add505a195deca126303ea1ac 100644 (file)
@@ -168,7 +168,7 @@ static void longkey_pressed(void)
 
 static gboolean longkey_restore_cb(void *data)
 {
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
        longkey_restore_id = 0;
 
        return G_SOURCE_REMOVE;
@@ -574,7 +574,7 @@ static void update_vital_state(struct input_event *pinput)
            pinput->value == KEY_RELEASED && pinput->code == KEY_MENU)) {
                /* Enable all services upon receiving user input, else maintain same state */
                type = VITAL_EXIT;
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_VITAL_STATE, &type);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_VITAL_STATE, &type);
        }
 }
 
@@ -787,8 +787,8 @@ static void __CONSTRUCTOR__ initialize(void)
        display_add_actor(&display_powerkey_actor);
        display_add_actor(&display_menukey_actor);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
 
        input_register_event_callback(check_key_filter, NULL, NULL, NULL);
 }
index 2848af72ca1a4eadbcabe5ce4ce8d4966eaf2547..9e6f15c482b0363e02ac6d0e2648ef65d7d32800 100644 (file)
@@ -149,7 +149,7 @@ static void parse_change_state(struct input_event_unit *ieu, const char *action)
        char next[16] = { 0, };
 
        if (sscanf(action, "%15[^,],%15s", curr, next) == 2) {
-               ieu->notifier = DEVICE_NOTIFIER_REQUEST_TRANSITION_STATE;
+               ieu->notifier = DEVICED_NOTIFIER_REQUEST_TRANSITION_STATE;
                /* append transition info to ieu->user_data */
                add_action_transition_info(ieu, curr, next);
        } else {
index 4f03f30d7c969f5737b5fac661ad28b758411b57..0c62b8ca0eba635f99fd5365b281369e501d77b6 100644 (file)
@@ -57,7 +57,7 @@ struct input_event_unit {
        int broadcast;
 
        /* which action to do on receiving an event */
-       enum device_notifier_type notifier;
+       enum deviced_notifier notifier;
        void *user_data;
 
        /* hold wakelock for a duration on detecting the event */
index 5249314d92832c605e6deb85767621ef0815526e..8e5b803d97ed055c74964ceb503ece3f0722c561 100644 (file)
@@ -138,7 +138,7 @@ static void input_handler_process_key(struct timeval time, unsigned short type,
 
        /* acquire tmplock on pressing key */
        if (keyvalue == KEY_PRESSED)
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_KEY_PRESS, (void *)(intptr_t) keycode);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_KEY_PRESS, (void *)(intptr_t) keycode);
 
        /* process all registered event to the keycode */
        ic = find_input_config(keycode);
@@ -149,7 +149,7 @@ static void input_handler_process_key(struct timeval time, unsigned short type,
 
        /* release tmplock on releasing key */
        if (keyvalue == KEY_RELEASED)
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_KEY_RELEASE, (void *)(intptr_t) keycode);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_KEY_RELEASE, (void *)(intptr_t) keycode);
 }
 
 static int input_handler_init(void *data)
index f9856f70042b47bacb3f595d454d16b4b84264e4..ddf24621b84568574c4738fbb1d66e003e922e13 100644 (file)
@@ -333,7 +333,7 @@ static gboolean health_timer_cb(void *data)
                return G_SOURCE_REMOVE;
 
        CRITICAL_LOG("Popup: Battery health status is not good, %s.", battery->health_s);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_HEALTH, (void *)&battery->health);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_HEALTH, (void *)&battery->health);
        battery_pm_change_internal(DEVICED_EVENT_MISC_POPUP, LCD_DIM);
        display_lock_request_unlock_with_option(DEVICED_EVENT_MISC_POPUP, LCD_OFF, PM_SLEEP_MARGIN);
        display_lock_request_lock_with_option(DEVICED_EVENT_MISC_POPUP, LCD_DIM, STAY_CUR_STATE, 0);
index cb38e6ac56f63347aeb03d7fc43bcc4b27d0136a..0a4d1df4c2a1ed21b80f95fece7828d3aa4ca0eb 100644 (file)
@@ -158,7 +158,7 @@ static void longkey_pressed(void)
 
 static gboolean longkey_restore_cb(void *data)
 {
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
        longkey_restore_id = 0;
 
        return G_SOURCE_REMOVE;
@@ -606,7 +606,7 @@ static void update_vital_state(struct input_event *pinput)
            pinput->value == KEY_RELEASED && pinput->code == KEY_MENU)) {
                /* Enable all services upon receiving user input, else maintain same state */
                type = VITAL_EXIT;
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_VITAL_STATE, &type);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_VITAL_STATE, &type);
        }
 }
 
@@ -811,8 +811,8 @@ static void __CONSTRUCTOR__ initialize(void)
        display_add_actor(&display_powerkey_actor);
        display_add_actor(&display_menukey_actor);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
 
        input_register_event_callback(check_key_filter, NULL, NULL, NULL);
 }
index ec5c859e03f43b5f88ffc5d501c51060a73a7f6a..becd49efeb0c1313d6526b6bcf885801b5dae254 100644 (file)
@@ -167,7 +167,7 @@ static void longkey_pressed(void)
 
 static gboolean longkey_restore_cb(void *data)
 {
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
        longkey_restore_id = 0;
 
        return G_SOURCE_REMOVE;
@@ -573,7 +573,7 @@ static void update_vital_state(struct input_event *pinput)
            pinput->value == KEY_RELEASED && pinput->code == KEY_MENU)) {
                /* Enable all services upon receiving user input, else maintain same state */
                type = VITAL_EXIT;
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_VITAL_STATE, &type);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_VITAL_STATE, &type);
        }
 }
 
@@ -778,8 +778,8 @@ static void __CONSTRUCTOR__ initialize(void)
        display_add_actor(&display_powerkey_actor);
        display_add_actor(&display_menukey_actor);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
 
        input_register_event_callback(check_key_filter, NULL, NULL, NULL);
 }
index d61cabc6c1d92af326f4c24b649a4c31dc3c62c9..2e867c2acd33884215f0eb23ccead22d6839a704 100644 (file)
@@ -243,7 +243,7 @@ int auto_brightness_control(enum brightness_request_e request, int set_brightnes
                        lbm_set_state(false);
                        change_flag(&lbm, 0);
 
-                       /* called by DEVICE_NOTIFIER_LCD_OFF_COMPLETE, no need to change brightness */
+                       /* called by DEVICED_NOTIFIER_LCD_OFF_COMPLETE, no need to change brightness */
                        if (get_pm_cur_state() != DEVICED_DISPLAY_STATE_ON)
                                return 0;
 
@@ -269,7 +269,7 @@ int auto_brightness_control(enum brightness_request_e request, int set_brightnes
                if (!lbm && hold_brt) {
                        change_flag(&hold_brt, 0);
 
-                       /* called by DEVICE_NOTIFIER_LCD_OFF_COMPLETE, no need to change brightness */
+                       /* called by DEVICED_NOTIFIER_LCD_OFF_COMPLETE, no need to change brightness */
                        if (get_pm_cur_state() != DEVICED_DISPLAY_STATE_ON)
                                return 0;
 
@@ -358,8 +358,8 @@ int prepare_level_handler(void)
        vconf_notify_key_changed(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT,
                                 set_automatic_state_cb, NULL);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD_OFF, display_off_changed);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD_OFF_COMPLETE, display_off_complete_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD_OFF, display_off_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD_OFF_COMPLETE, display_off_complete_changed);
 
        return 0;
 }
@@ -370,8 +370,8 @@ void exit_level_handler(void)
                                 set_automatic_state_cb);
        set_default_brightness();
 
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_LCD_OFF, display_off_changed);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_LCD_OFF_COMPLETE, display_off_complete_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_LCD_OFF, display_off_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_LCD_OFF_COMPLETE, display_off_complete_changed);
 }
 
 static void __CONSTRUCTOR__ initialize(void)
index 9006673e7877334e96efe9d787a4d48b4b11c7a8..855212b576340ac9f9e92e6de80f61cbdad76fe7 100644 (file)
@@ -664,16 +664,16 @@ static void auto_brightness_init(void *data)
        g_display_plugin.set_autobrightness_min = set_autobrightness_min;
        g_display_plugin.reset_autobrightness_min = reset_autobrightness_min;
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, lcd_changed_cb);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, lcd_changed_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 }
 
 static void auto_brightness_exit(void *data)
 {
        exit_lsensor();
 
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_LCD, lcd_changed_cb);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_LCD, lcd_changed_cb);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 }
 
 static const struct display_ops display_autobrightness_ops = {
index 2868f0764177b0045135392b94d73085ff08ee23..b1a6ac4d44c8097906ff9e503cde24689fd22707 100644 (file)
@@ -63,7 +63,7 @@ static void bezel_changed_cb(keynode_t *key_nodes, void *data)
        _I("Bezel wakeup condition: %d", bezel_wakeup);
        display_state_transition_request_state_transition_with_option(DEVICED_EVENT_INPUT_BEZEL, LCD_NORMAL);
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BEZEL_WAKEUP, (void *)((intptr_t)bezel_wakeup));
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BEZEL_WAKEUP, (void *)((intptr_t)bezel_wakeup));
 }
 
 static void theater_changed_cb(keynode_t *key_nodes, void *data)
index ce097f99918ad40757702f2c63a2d0c4f3948a39..30d2d576d3ff3fcdba1c999589f585d216d3bd7e 100644 (file)
@@ -294,7 +294,7 @@ static void lcd_off_procedure(enum device_flags flag)
 
        /* notification */
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LCD_OFF, NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LCD_OFF, NULL);
 
        if (lcdon_broadcast) {
                broadcast_lcd_off(SIGNAL_PRE, flags);
@@ -327,7 +327,7 @@ static void lcd_off_procedure(enum device_flags flag)
                broadcast_lcd_off_late(flags);
        } else {
                broadcast_lcd_off(SIGNAL_POST, flags);
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LCD_OFF_COMPLETE, NULL);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LCD_OFF_COMPLETE, NULL);
        }
 
        enter_doze();
@@ -701,7 +701,7 @@ static int default_action(int timeout)
                        power_get_wakeup_reason(), NULL);
                set_setting_pmstate(get_pm_cur_state());
                pm_cur_state = get_pm_cur_state();
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LCD, (void *)&pm_cur_state);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LCD, (void *)&pm_cur_state);
        }
 
        if ((get_pm_old_state() == DEVICED_DISPLAY_STATE_ON) && (get_pm_cur_state() != DEVICED_DISPLAY_STATE_ON)) {
@@ -978,7 +978,7 @@ static void display_init(void *data)
 
        register_kernel_uevent_control(&sec_dsim_uevent_ops);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD_AUTOBRT_SENSING, display_auto_brightness_sensing);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD_AUTOBRT_SENSING, display_auto_brightness_sensing);
 
        init_setting(update_setting);
        init_sysfs(flags);
index ef892bf9f1fd5be2ba37d62c02d72818bdea55e3..f7e5cf9a5159b4ea212ce3beed7d43feef9b53f9 100644 (file)
@@ -102,7 +102,7 @@ static int set_brightness(int val)
 
        update_bds_brightness_record(val);
        _I("set brightness %d (default:%d)", val, default_brightness);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS, (void *)&val);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_DISPLAY_BRIGHTNESS, (void *)&val);
 
        return hal_device_display_set_brightness(val);
 }
index bad84078575dc3ae5c5bfece8980aca188375040..4a5ddc5430d60d94b9dbd92963e3e2d3629bd685 100644 (file)
@@ -95,7 +95,7 @@ static GVariant *dbus_autobrightnesschanged(GDBusConnection *conn,
                autobrt_timer = 0;
        }
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LCD_AUTOBRT_SENSING, NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LCD_AUTOBRT_SENSING, NULL);
 
        /* When display state changes from AOD to LCDON, brightness change
                * effect seems sluggish because of heavy load of jobs for turning on
@@ -194,7 +194,7 @@ static void display_handler_init(void *data)
        int ret;
 
        prepare_level_handler();
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, display_state_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, display_state_changed);
 
        aod_clock_displayed = false;
        ret = gdbus_signal_subscribe(NULL,
index b6682ad9666d10c09c8c789bcd974bd1d683e9ea..598c5a6814e2d1717cfdf5bc2b8f90335e820da4 100644 (file)
@@ -112,7 +112,7 @@ static void enhance_init(void *data)
        int state;
 
        /* register notifier */
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, enhance_lcd_state_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, enhance_lcd_state_changed);
 
        ret = vconf_notify_key_changed(VCONF_HIGH_CONTRAST,
            enhance_high_contrast_cb, NULL);
@@ -154,7 +154,7 @@ static void enhance_init(void *data)
 static void enhance_exit(void *data)
 {
        /* unregister notifier */
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_LCD, enhance_lcd_state_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_LCD, enhance_lcd_state_changed);
 
        vconf_ignore_key_changed(VCONF_HIGH_CONTRAST, enhance_high_contrast_cb);
        vconf_ignore_key_changed(VCONF_GREYSCALE, enhance_greyscale_cb);
index 243159e45ab96c2066449f011009b45c4dd278e1..d62d74df2005aed49e6f98e394b44505613ed0e3 100644 (file)
@@ -405,7 +405,7 @@ static void hbm_init(void *data)
                _E("Failed to register dbus object.");
 
        /* register notifier */
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, display_state_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, display_state_changed);
 
        /* double check to guarantee HBMOFF before DPMS OFF */
        display_panel_register_dpms_checklist(DPMS_OFF, dpms_check_hbm_off);
@@ -414,7 +414,7 @@ static void hbm_init(void *data)
 static void hbm_exit(void *data)
 {
        /* unregister notifier */
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_LCD, display_state_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_LCD, display_state_changed);
 
        /*
         * set default brightness
index 7484c22c985df3c967f30e10f98f9fd804da9b30..d9dc9e876b494e076f4e59f0cc20d543eed489b9 100644 (file)
@@ -139,7 +139,7 @@ static void longkey_pressed(void)
 
 static gboolean longkey_restore_cb(void *data)
 {
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
        longkey_restore_id = 0;
 
        return G_SOURCE_REMOVE;
@@ -517,7 +517,7 @@ static void update_vital_state(struct input_event *pinput)
            pinput->value == KEY_RELEASED && pinput->code == KEY_MENU)) {
                /* Enable all services upon receiving user input, else maintain same state */
                type = VITAL_EXIT;
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_VITAL_STATE, &type);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_VITAL_STATE, &type);
        }
 }
 
@@ -711,8 +711,8 @@ static void __CONSTRUCTOR__ initialize(void)
        display_add_actor(&display_powerkey_actor);
        display_add_actor(&display_menukey_actor);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
 
        input_register_event_callback(check_key_filter, NULL, NULL, NULL);
 }
index bb47be1be59455f7a1e2dcb9a9c8a2cb1f0e77f1..8f2f4d942c73f1160a35fb9c62812d03f63bd2ae 100644 (file)
@@ -128,7 +128,7 @@ static int lbm_set_brightness(int val)
        system_brightness = val;
 
        _I("Set brightness(LBM on) system=%d, real=%d.", val, brt);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS, (void *)&val);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_DISPLAY_BRIGHTNESS, (void *)&val);
 
        return hal_device_display_set_brightness(brt);
 }
index 0e117ac1b7d37e50d7ac4d957a765562a68ffa6f..95cdcb1ca725b0ee31dd8e474f8370c1d7eb5911 100644 (file)
@@ -43,7 +43,7 @@ static int set_powersaver_mode(int mode)
        if (mode == POWERSAVER_ENHANCED)
                pmqos = true;
        _D("Powersaver mode %d pmqos %d.", mode, pmqos);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_ULTRAPOWERSAVING, (void *)&pmqos);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_ULTRAPOWERSAVING, (void *)&pmqos);
 
        display_backlight_set_force_brightness(0);
        set_force_lcdtimeout(0);
@@ -127,7 +127,7 @@ static int delayed_init_done(void *data)
        }
 
        _D("Powersaver mode on, %d.", mode);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_PMQOS_ULTRAPOWERSAVING, (void *)&pmqos);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_PMQOS_ULTRAPOWERSAVING, (void *)&pmqos);
        ret = set_powersaver_mode(mode);
        if (ret < 0)
                _E("Failed to update powersaver state, %d.", ret);
@@ -137,7 +137,7 @@ out:
 
 static void powersaver_init(void *data)
 {
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 }
 
 static void powersaver_exit(void *data)
index 5d73c2201e7b89a2fa10bde7491b9f0e85e3166c..9f1962e9a838524ddb45dce9b9d2e1b29c7547b1 100644 (file)
@@ -130,7 +130,7 @@ static void swim_init(void *data)
        if (ret <= 0)
                _E("Failed to register signal handler: %d", ret);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LONGKEY_RESTORE, swim_restore_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LONGKEY_RESTORE, swim_restore_cb);
 }
 
 static const struct device_ops swim_device_ops = {
index e0370d5211435647394926ee5f0134a739769c62..dc6e8400d187e3fdec6edcdc378053484eb490e2 100644 (file)
 static void parse_device_notifier(struct battery_config_charger_event_handler *handler,
                                const char *notifier)
 {
-       if (MATCH(notifier, "DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED"))
-               handler->notifier = DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED;
-       else if (MATCH(notifier, "DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED"))
-               handler->notifier = DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED;
+       if (MATCH(notifier, "DEVICED_NOTIFIER_BATTERY_CHARGER_CONNECTED"))
+               handler->notifier = DEVICED_NOTIFIER_BATTERY_CHARGER_CONNECTED;
+       else if (MATCH(notifier, "DEVICED_NOTIFIER_BATTERY_CHARGER_DISCONNECTED"))
+               handler->notifier = DEVICED_NOTIFIER_BATTERY_CHARGER_DISCONNECTED;
 }
 
 static void parse_event_action_property(gpointer data, gpointer user_data)
index 2a6caa1d5727dc699c6c833a4bdbeec55a5926b4..90110f90be7b4f5a302cc06b5c8d078e0f8c0e2e 100644 (file)
@@ -42,7 +42,7 @@ enum battery_option_type {
 struct battery_config_charger_event_handler {
        char *name;
        int id;
-       enum device_notifier_type notifier;
+       enum deviced_notifier notifier;
 
        /* broadcast upon occuring this event */
        int broadcast;
index 8a75bc40f04a029aa7554fc6c24c0578942c2f60..5ea5bc1c8d7f5be39b539c09e8511711fd6579a3 100644 (file)
@@ -547,7 +547,7 @@ static int lowbat_process(int bat_percent, void *ad)
                low_bat = true;
 
        if (low_bat_old != low_bat) {
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LOWBAT, (void *)&low_bat);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LOWBAT, (void *)&low_bat);
                low_bat_old = low_bat;
        }
 
@@ -613,7 +613,7 @@ static int lowbat_monitor_init(void *data)
        lowbat_initialized(&status);
 
        /* it's called just this once. */
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_POWER_SUPPLY, lowbat_monitor_init);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_POWER_SUPPLY, lowbat_monitor_init);
 
        /* load battery configuration file */
        battery_parser_load_config(&battery_info);
@@ -687,8 +687,8 @@ static void lowbat_init(void *data)
 {
        int ret;
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_POWER_SUPPLY, lowbat_monitor_init);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_POWER_SUPPLY, lowbat_monitor_init);
 
        ret = gdbus_add_object(NULL, DEVICED_PATH_BATTERY, &dbus_interface);
        if (ret < 0)
index d5f0b792d20d263370e4075468d4f0e4209920db..433e3a20b88d5169996f8a18a2a9444cabef7a48 100644 (file)
@@ -361,7 +361,7 @@ static void noti_batt_full(void)
                power_supply_noti(DEVICE_NOTI_BATT_FULL, DEVICE_NOTI_OFF);
                bat_full_noti = 0;
                /* off the full charge state */
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_FULLBAT, (void *)&bat_full_noti);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_FULLBAT, (void *)&bat_full_noti);
        }
        if (battery.charge_full && bat_full_noti == 0) {
                power_supply_noti(DEVICE_NOTI_BATT_FULL, DEVICE_NOTI_ON);
@@ -373,7 +373,7 @@ static void noti_batt_full(void)
                        _I("Block LCD.");
 
                /* on the full charge state */
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_FULLBAT, (void *)&bat_full_noti);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_FULLBAT, (void *)&bat_full_noti);
        }
 }
 
@@ -415,11 +415,11 @@ static void update_present(enum battery_noti_status status)
        old_battery.present = battery.present;
        if (status == DEVICE_NOTI_ON) {
                battery_pm_change_internal(DEVICED_EVENT_MISC_POPUP, LCD_DIM);
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_PRESENT, (void *)&battery.present);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_PRESENT, (void *)&battery.present);
                display_lock_request_lock_with_option(DEVICED_EVENT_MISC_POPUP, LCD_DIM, STAY_CUR_STATE, 0);
        } else {
                battery_pm_change_internal(DEVICED_EVENT_MISC_POPUP, LCD_NORMAL);
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_PRESENT, (void *)&battery.present);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_PRESENT, (void *)&battery.present);
                display_lock_request_unlock_with_option(DEVICED_EVENT_MISC_POPUP, LCD_DIM, PM_SLEEP_MARGIN);
        }
        if (battery_plgn->changed_battery_cf)
@@ -433,7 +433,7 @@ static void launch_health_popup(void)
 
        launching_health_popup = true;
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_HEALTH, (void *)&battery.health);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_HEALTH, (void *)&battery.health);
        battery_pm_change_internal(DEVICED_EVENT_MISC_POPUP, LCD_NORMAL);
        battery_pm_change_internal(DEVICED_EVENT_MISC_POPUP, LCD_DIM);
        display_lock_request_unlock_with_option(DEVICED_EVENT_MISC_POPUP, LCD_OFF, PM_SLEEP_MARGIN);
@@ -467,7 +467,7 @@ static void update_health(enum battery_noti_status status)
                        abnormal_health_popup_timer = g_timeout_add_seconds(ABNORMAL_CHECK_TIMER_INTERVAL, health_popup_cb, NULL);
        } else {
                battery_pm_change_internal(DEVICED_EVENT_MISC_POPUP, LCD_NORMAL);
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_HEALTH, (void *)&battery.health);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_HEALTH, (void *)&battery.health);
                display_lock_request_unlock_with_option(DEVICED_EVENT_MISC_POPUP, LCD_DIM, PM_SLEEP_MARGIN);
                display_lock_request_unlock_with_option(DEVICED_EVENT_MISC_POPUP, LCD_OFF, PM_SLEEP_MARGIN);
                health_status_broadcast();
@@ -529,7 +529,7 @@ static void check_abnormal_status(void)
                        return;
                notify_status = DEVICE_NOTI_ON;
 
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_OVP, (void *)&battery.health);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_OVP, (void *)&battery.health);
 
                if (battery_plgn->update_ovp)
                        battery_plgn->update_ovp(DEVICE_NOTI_ON);
@@ -543,7 +543,7 @@ static void check_abnormal_status(void)
                        return;
                notify_status = DEVICE_NOTI_OFF;
 
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_OVP, (void *)&battery.health);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_OVP, (void *)&battery.health);
 
                if (battery_plgn->update_ovp)
                        battery_plgn->update_ovp(DEVICE_NOTI_OFF);
@@ -722,13 +722,13 @@ static void process_power_supply(void *data)
                if (battery.charger_connected == 0) {
                        CRITICAL_LOG("Battery charger disconnected");
                        event_system_send(SYS_EVENT_BATTERY_CHARGER_STATUS, EVT_KEY_BATTERY_CHARGER_STATUS, EVT_VAL_BATTERY_CHARGER_CONNECTED);
-                       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED, NULL);
-                       notify_charger_event(DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED);
+                       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_CHARGER_DISCONNECTED, NULL);
+                       notify_charger_event(DEVICED_NOTIFIER_BATTERY_CHARGER_DISCONNECTED);
                } else if (battery.charger_connected == 1) {
                        CRITICAL_LOG("Battery charger connected");
                        event_system_send(SYS_EVENT_BATTERY_CHARGER_STATUS, EVT_KEY_BATTERY_CHARGER_STATUS, EVT_VAL_BATTERY_CHARGER_DISCONNECTED);
-                       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED, NULL);
-                       notify_charger_event(DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED);
+                       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_CHARGER_CONNECTED, NULL);
+                       notify_charger_event(DEVICED_NOTIFIER_BATTERY_CHARGER_CONNECTED);
                } else {
                        _E("Invalid charger connected");
                }
@@ -782,9 +782,9 @@ static void process_power_supply(void *data)
 
        check_abnormal_status();
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_POWER_SUPPLY, NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_POWER_SUPPLY, NULL);
        if (old_battery.charge_now != battery.charge_now) {
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_BATTERY_CHARGING, &battery.charge_now);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_BATTERY_CHARGING, &battery.charge_now);
                old_battery.charge_now = battery.charge_now;
        }
 
@@ -1201,7 +1201,7 @@ static GVariant *dbus_get_battery_info(GDBusConnection *conn,
        const char *str;
        struct battery_info info = {0, };
 
-       if (old_state == DEVICE_NOTIFIER_STATE_STOP)
+       if (old_state == DEVICED_NOTIFIER_STATE_STOP)
                goto out;
 
        if (battery_initialized)
@@ -1295,7 +1295,7 @@ static int delayed_init_done(void *data)
 {
        static int done;
        int retval;
-       device_notifier_state_e state = DEVICE_NOTIFIER_STATE_START;
+       device_notifier_state_e state = DEVICED_NOTIFIER_STATE_START;
 
        if (data == NULL)
                return done;
@@ -1327,7 +1327,7 @@ static int delayed_init_done(void *data)
                        CHARGE_MISC_EVENT_SIGNAL, battery.misc,
                        CHARGE_HEALTH_SIGNAL, battery.health, battery.health_s);
 
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 
        return done;
 }
@@ -1482,9 +1482,9 @@ static int event_handler_state_changed(void *data)
 
        old_state = state;
 
-       if (state == DEVICE_NOTIFIER_STATE_START)
+       if (state == DEVICED_NOTIFIER_STATE_START)
                add_power_supply_handler();
-       else if (state == DEVICE_NOTIFIER_STATE_STOP)
+       else if (state == DEVICED_NOTIFIER_STATE_STOP)
                remove_power_supply_handler();
 
        return 0;
@@ -1505,9 +1505,9 @@ static void power_supply_init(void *data)
        /* process check battery timer until booting done */
        power_supply_timer_start();
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_EVENT_HANDLER, event_handler_state_changed);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, handle_display_state_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_EVENT_HANDLER, event_handler_state_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, handle_display_state_changed);
 
        ret = gdbus_add_object(NULL, DEVICED_PATH_BATTERY, &dbus_interface);
        if (ret < 0)
@@ -1520,10 +1520,10 @@ static void power_supply_init(void *data)
 
 static void power_supply_exit(void *data)
 {
-       device_notifier_state_e state = DEVICE_NOTIFIER_STATE_STOP;
+       device_notifier_state_e state = DEVICED_NOTIFIER_STATE_STOP;
 
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_EVENT_HANDLER, event_handler_state_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_EVENT_HANDLER, event_handler_state_changed);
 
        event_handler_state_changed((void *)&state);
 
index 92f5470122111216c5ff9aa4777ec6245e7d59c5..6f0754b2478ffa4c121fc3cc3b68e6b9e094be71 100644 (file)
@@ -67,7 +67,7 @@ static gboolean delayed_init_timer_cb(void *data)
        _I("delayed init");
 
        done = 1;
-       syscommon_notifier_emit_notify_once(DEVICE_NOTIFIER_DELAYED_INIT, (void *)&done);
+       syscommon_notifier_emit_notify_once(DEVICED_NOTIFIER_DELAYED_INIT, (void *)&done);
 
        return G_SOURCE_REMOVE;
 }
@@ -81,7 +81,7 @@ static void delayed_init_done_notifier_init(void *data)
                _I("restart booting done");
                return;
        }
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
        delayed_init_timer = g_timeout_add_seconds(DELAYED_INIT_WAIT_TIME,
                                                delayed_init_timer_cb, NULL);
 
index cdd6bfc33e8350f9caf64372788c8a1e5858731c..21095ea32ae53834fad2ccdb9e880f07ca9df371 100644 (file)
 #include "shared/device-notifier.h"
 #include "log.h"
 
-static device_notifier_state_e state = DEVICE_NOTIFIER_STATE_STOP;
+static device_notifier_state_e state = DEVICED_NOTIFIER_STATE_STOP;
 
 static GVariant *dbus_start_event_handler(GDBusConnection *conn,
        const gchar *sender, const gchar *path, const gchar *iface, const gchar *name,
        GVariant *param, GDBusMethodInvocation *invocation, gpointer user_data)
 {
-       if (state != DEVICE_NOTIFIER_STATE_START) {
+       if (state != DEVICED_NOTIFIER_STATE_START) {
                _D("Start event-handler.");
-               state = DEVICE_NOTIFIER_STATE_START;
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_EVENT_HANDLER, (void *)&state);
+               state = DEVICED_NOTIFIER_STATE_START;
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_EVENT_HANDLER, (void *)&state);
        }
        return g_variant_new("(i)", 0);
 }
@@ -44,10 +44,10 @@ static GVariant *dbus_stop_event_handler(GDBusConnection *conn,
        const gchar *sender, const gchar *path, const gchar *iface, const gchar *name,
        GVariant *param, GDBusMethodInvocation *invocation, gpointer user_data)
 {
-       if (state != DEVICE_NOTIFIER_STATE_STOP) {
+       if (state != DEVICED_NOTIFIER_STATE_STOP) {
                _D("Stop event-handler.");
-               state = DEVICE_NOTIFIER_STATE_STOP;
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_EVENT_HANDLER, (void *)&state);
+               state = DEVICED_NOTIFIER_STATE_STOP;
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_EVENT_HANDLER, (void *)&state);
        }
        return g_variant_new("(i)", 0);
 }
@@ -95,7 +95,7 @@ static void event_handler_init(void *data)
        if (ret < 0)
                _E("Failed to init dbus method: %d", ret);
 
-       state = DEVICE_NOTIFIER_STATE_START;
+       state = DEVICED_NOTIFIER_STATE_START;
 }
 
 static const struct device_ops event_handler_device_ops = {
index 7c560ad79f2309004fa585053ba19ffa3bd93b8a..d040c23a1bfb7c80bd718bab7fc791ae76b49af7 100644 (file)
@@ -89,7 +89,7 @@ static void deviced_dbus_name_acquired(GDBusConnection *connection, const gchar
        if (ret == 1) {
                /* Restarted: deviced was terminated */
                _I("Notify relaunch.");
-               syscommon_notifier_emit_notify_once(DEVICE_NOTIFIER_DELAYED_INIT, &ret);
+               syscommon_notifier_emit_notify_once(DEVICED_NOTIFIER_DELAYED_INIT, &ret);
        }
 
        _I("sd_notify(READY=1)");
index 81f3da8b86c6045fe4678d6f10b1f64adfc962ac..a9661e6af3088f9277c0591bcaa6d900441b4978 100644 (file)
@@ -266,10 +266,10 @@ static int device_event_handler(void *data)
 {
        device_notifier_state_e state = *(device_notifier_state_e *)data;
 
-       if (state == DEVICE_NOTIFIER_STATE_START) {
+       if (state == DEVICED_NOTIFIER_STATE_START) {
                uevent_control_start(KERNEL, &kevent);
                uevent_control_start(UDEV, &uevent);
-       } else if (state == DEVICE_NOTIFIER_STATE_STOP) {
+       } else if (state == DEVICED_NOTIFIER_STATE_STOP) {
                uevent_control_stop(&kevent);
                uevent_control_stop(&uevent);
        }
@@ -286,8 +286,8 @@ static int device_change_poweroff(void *data)
 
 static void udev_init(void *data)
 {
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_POWEROFF, device_change_poweroff);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_EVENT_HANDLER, device_event_handler);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_POWEROFF, device_change_poweroff);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_EVENT_HANDLER, device_event_handler);
 
        if (uevent_control_start(KERNEL, &kevent) != 0)
                _E("Failed to init uevent kernel control.");
@@ -298,8 +298,8 @@ static void udev_init(void *data)
 
 static void udev_exit(void *data)
 {
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_EVENT_HANDLER, device_event_handler);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_POWEROFF, device_change_poweroff);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_EVENT_HANDLER, device_event_handler);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_POWEROFF, device_change_poweroff);
 }
 
 static const struct device_ops udev_device_ops = {
index c832ce7fe52c0762a8bfdb41fcd14ce17b8a249f..7182b045635e2fc250006537cb66de449eee38a0 100644 (file)
@@ -217,8 +217,8 @@ static int delayed_init_done(void *data)
        _I("Booting done.");
 
        /* register notifier for each event */
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_CPU_BOOST_LOWBAT, pmqos_lowbat);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_CPU_BOOST_POWEROFF, pmqos_poweroff);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_CPU_BOOST_LOWBAT, pmqos_lowbat);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_CPU_BOOST_POWEROFF, pmqos_poweroff);
 
 out:
        return done;
@@ -238,15 +238,15 @@ static void pmqos_init(void *data)
        if (ret < 0)
                _E("Failed to init dbus method: %d", ret);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 }
 
 static void pmqos_exit(void *data)
 {
        /* unregister notifier for each event */
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_CPU_BOOST_LOWBAT, pmqos_lowbat);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_CPU_BOOST_POWEROFF, pmqos_poweroff);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_CPU_BOOST_LOWBAT, pmqos_lowbat);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_CPU_BOOST_POWEROFF, pmqos_poweroff);
 }
 
 static const struct device_ops pmqos_device_ops = {
index b5cbfe2ba4887a6c05d50a1a5551d0a1bd852b49..672204854b93db882df883f2e91ab7aba7098256 100644 (file)
@@ -99,7 +99,7 @@ static void ambient_set_condition(keynode_t *key_nodes, void *data)
        _I("Ambient mode condition is %d.", ambient_condition);
 
        state = (ambient_condition == 0 ? 0 : 1);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_DISPLAY_AMBIENT_CONDITION, (void *)&state);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_DISPLAY_AMBIENT_CONDITION, (void *)&state);
 
        display_plugin_set_dim_state(state);
 }
@@ -129,7 +129,7 @@ int ambient_set_state(int on)
 
        ambient_state = on;
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_DISPLAY_AMBIENT_STATE, (void *)&ambient_state);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_DISPLAY_AMBIENT_STATE, (void *)&ambient_state);
 
        return 0;
 }
index 6aeb355c4d65bbca07880e21e3e279d66267b23c..7e29b59e935eb3f7d70caf30eb9ccd606b17a2a4 100644 (file)
@@ -143,7 +143,7 @@ int display_backlight_set_brightness(int brightness)
        brightness = brightness * max_brightness / 100;
 
        _I("set brightness %d (default:%d)", brightness, default_brightness);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS, (void *)&brightness);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_DISPLAY_BRIGHTNESS, (void *)&brightness);
 
        return hal_device_display_set_brightness(brightness);
 }
index bfeb6fc3babd6327645a706dabe7d6f6602d5a9b..c8ca11a5971b62716c6568c063f52121430b073f 100644 (file)
@@ -1483,11 +1483,11 @@ static void changestate_signal_handler(GDBusConnection  *conn,
        if (!strcmp(state, "bg")) {
                _D("process(%d) was going background.", pid);
                set_app_state(pid, APPLICATION_BACKGROUND);
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_APPLICATION_BACKGROUND, &pid);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_APPLICATION_BACKGROUND, &pid);
        } else if (!strcmp(state, "fg")) {
                _D("process(%d) was going foreground.", pid);
                set_app_state(pid, APPLICATION_FOREGROUND);
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_APPLICATION_FOREGROUND, &pid);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_APPLICATION_FOREGROUND, &pid);
        }
 
 out:
@@ -1511,7 +1511,7 @@ static void app_terminate_signal_handler(GDBusConnection  *conn,
        }
 
        set_app_state(pid, APPLICATION_TERMINATED);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_APPLICATION_TERMINATED, &pid);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_APPLICATION_TERMINATED, &pid);
 }
 
 /*
index 77189f1c48ecd395206bf80d4e09e1ceb3e74c72..bb12c2d1c119597a2e95f8ebf2733287bc3ec10b 100644 (file)
@@ -652,7 +652,7 @@ static void proc_condition_lock(PMMsg *data)
        _SD("be requested LOCK info pname(%s), flags(%d)", pname, flags);
        set_lock_time(pid, pname, state);
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_DISPLAY_LOCK, (void *)&value);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_DISPLAY_LOCK, (void *)&value);
 }
 
 static void proc_condition_unlock(PMMsg *data)
@@ -705,7 +705,7 @@ static void proc_condition_unlock(PMMsg *data)
        _SD("be requested UNLOCK info pname(%s) flag(%d)", pname, flags);
        set_unlock_time(pid, state);
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_DISPLAY_LOCK, (void *)&value);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_DISPLAY_LOCK, (void *)&value);
 }
 
 /* FIXME: This function will be refactored or divided according to role */
index 3e8971f0f7e14ec521a54f7d1e514921229bd88b..e96165e85b53baaf7bc66dc59a3c6254903373ce 100644 (file)
@@ -133,12 +133,12 @@ static int changed_battery_health(void *data)
 
 void display_misc_register_battery_health_notifier(void)
 {
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_BATTERY_HEALTH, changed_battery_health);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_BATTERY_HEALTH, changed_battery_health);
 }
 
 void display_misc_unregister_battery_health_notifier(void)
 {
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_BATTERY_HEALTH, changed_battery_health);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_BATTERY_HEALTH, changed_battery_health);
 }
 
 static void print_info(int fd)
index d79b6e9011aabbc00e7c6d1ebf84884311478e74..3492c4569b992c8994c42367f3251816cfdd44bc 100644 (file)
@@ -309,7 +309,7 @@ void display_panel_lcd_off_procedure(enum device_flags flag)
 
        /* notification */
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LCD_OFF, NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LCD_OFF, NULL);
 
        if (lcd_on_broadcasted) {
                broadcast_lcd_off(SIGNAL_PRE, flags);
@@ -327,7 +327,7 @@ void display_panel_lcd_off_procedure(enum device_flags flag)
        display_stop_dependent_device(flags);
 
        broadcast_lcd_off(SIGNAL_POST, flags);
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LCD_OFF_COMPLETE, NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LCD_OFF_COMPLETE, NULL);
 
        enter_doze();
 }
index 33502dcdfe88dca8d7ebb02453579a8ef7adc24e..c8633657b5c1b1b0aa4e365f715e565d658152c3 100644 (file)
@@ -102,7 +102,7 @@ void broadcast_lcd_off_late(enum device_flags flags)
 
        if (flags & LCD_OFF_LATE_MODE) {
                broadcast_lcd_off(SIGNAL_POST, late_flags);
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LCD_OFF_COMPLETE, NULL);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LCD_OFF_COMPLETE, NULL);
        } else {
                late_flags = flags;
        }
@@ -144,12 +144,12 @@ static int broadcast_brightness_changed(void *data)
 
 void display_signal_register_display_brightness_notifier(void)
 {
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS, broadcast_brightness_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DISPLAY_BRIGHTNESS, broadcast_brightness_changed);
 }
 
 void display_signal_unregister_display_brightness_notifier(void)
 {
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS, broadcast_brightness_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DISPLAY_BRIGHTNESS, broadcast_brightness_changed);
 }
 
 static void __CONSTRUCTOR__ initialize(void)
index ca657695fd893328ce5d2ee38b6a6b963520e48b..c58b2cb3166d82aae54e2770a7191d15162490be 100644 (file)
@@ -727,7 +727,7 @@ static int display_state_transition_do_state_action(int timeout)
 
                set_setting_pmstate(current);
                pm_cur_state = current;
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_LCD, (void *)&pm_cur_state);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_LCD, (void *)&pm_cur_state);
        }
 
        if ((previous == DEVICED_DISPLAY_STATE_ON) && (current != DEVICED_DISPLAY_STATE_ON)) {
index 3874e8b3dc6d289a0706fe006c7b4071e88fe843..9d514dc52d54221c4078d07183d533d5426a6a46 100644 (file)
@@ -525,14 +525,14 @@ static void display_init(void *data)
 
        register_kernel_uevent_control(&lcd_uevent_ops);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_APPLICATION_BACKGROUND, display_app_background);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_APPLICATION_FOREGROUND, display_app_foreground);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_APPLICATION_TERMINATED, display_app_terminated);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_APPLICATION_BACKGROUND, display_app_background);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_APPLICATION_FOREGROUND, display_app_foreground);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_APPLICATION_TERMINATED, display_app_terminated);
        display_signal_register_display_brightness_notifier();
        display_misc_register_battery_health_notifier();
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, power_resume_from_echomem_callback);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_POWEROFF_TRIGGERED, poweroff_triggered_callback);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, power_resume_from_echomem_callback);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_POWEROFF_TRIGGERED, poweroff_triggered_callback);
 
        init_save_userlock();
 
@@ -544,7 +544,7 @@ static void display_init(void *data)
        if (timeout_enable)
                display_initialize_display_state_timeout_from_setting();
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_VITAL_STATE, vital_state_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_VITAL_STATE, vital_state_changed);
 
        _I("input init");
        ret = input_init_handler();
@@ -671,15 +671,15 @@ static void display_exit(void *data)
        if (!check_default(ops))
                ops->start(NORMAL_MODE);
 
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_VITAL_STATE, vital_state_changed);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_APPLICATION_BACKGROUND, display_app_background);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_APPLICATION_FOREGROUND, display_app_foreground);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_APPLICATION_TERMINATED, display_app_terminated);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_VITAL_STATE, vital_state_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_APPLICATION_BACKGROUND, display_app_background);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_APPLICATION_FOREGROUND, display_app_foreground);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_APPLICATION_TERMINATED, display_app_terminated);
        display_misc_unregister_battery_health_notifier();
        display_signal_unregister_display_brightness_notifier();
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, power_resume_from_echomem_callback);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_POWEROFF_TRIGGERED, poweroff_triggered_callback);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, power_resume_from_echomem_callback);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_POWEROFF_TRIGGERED, poweroff_triggered_callback);
 
        display_unregister_dependent_device();
        free_lock_info_list();
index 64fc6d053277cda26556f030a66c96e6f304f772..0194654f1e3d54a3b2386eb2cc3d1b335f432b85 100644 (file)
@@ -371,5 +371,5 @@ void pm_lock_detector_init(void)
                return;
        }
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_POWEROFF, pmlock_detector_poweroff_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_POWEROFF, pmlock_detector_poweroff_cb);
 }
index 57f9c7064d662889c4961a1a00900943df554c1b..76bce47683ef02f725a81394e8b4edddbe007e47 100644 (file)
@@ -124,7 +124,7 @@ static void cradle_init(void *data)
 {
        int ret;
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, display_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, display_changed);
 
        ret = gdbus_add_object(NULL, DEVICED_PATH_SYSNOTI, &dbus_interface);
        if (ret < 0)
@@ -133,7 +133,7 @@ static void cradle_init(void *data)
 
 static void cradle_exit(void *data)
 {
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_LCD, display_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_LCD, display_changed);
 }
 
 static struct extcon_ops cradle_extcon_ops = {
index e3e8aac35a8ef0e29de5c676c9cd0ae31857882e..1c10fcff7a65a56d8db1dac69a6e7d3a1119da55 100644 (file)
@@ -456,7 +456,7 @@ static void remove_extcon_event_handler(void)
 
 static int event_handler_state_changed(void *data)
 {
-       static device_notifier_state_e old = DEVICE_NOTIFIER_STATE_STOP;
+       static device_notifier_state_e old = DEVICED_NOTIFIER_STATE_STOP;
        device_notifier_state_e state = *(device_notifier_state_e *)data;
 
        if (old == state)
@@ -464,9 +464,9 @@ static int event_handler_state_changed(void *data)
 
        old = state;
 
-       if (state == DEVICE_NOTIFIER_STATE_START)
+       if (state == DEVICED_NOTIFIER_STATE_START)
                add_extcon_event_handler();
-       else if (state == DEVICE_NOTIFIER_STATE_STOP)
+       else if (state == DEVICED_NOTIFIER_STATE_STOP)
                remove_extcon_event_handler();
 
        return 0;
@@ -480,7 +480,7 @@ static void extcon_deferred_init(void)
 {
        GList *l;
        struct extcon_ops *dev;
-       device_notifier_state_e state = DEVICE_NOTIFIER_STATE_START;
+       device_notifier_state_e state = DEVICED_NOTIFIER_STATE_START;
        static int initialized = false;
 
        if (initialized)
@@ -500,7 +500,7 @@ static void extcon_deferred_init(void)
        }
 
        event_handler_state_changed((void *)&state);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_EVENT_HANDLER, event_handler_state_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_EVENT_HANDLER, event_handler_state_changed);
 
        initialized = true;
 }
@@ -531,16 +531,16 @@ static void extcon_init(void *data)
        if (retval < 0)
                _E("Failed to init dbus method: %d", retval);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 }
 
 static void extcon_exit(void *data)
 {
        GList *l;
        struct extcon_ops *dev;
-       device_notifier_state_e state = DEVICE_NOTIFIER_STATE_STOP;
+       device_notifier_state_e state = DEVICED_NOTIFIER_STATE_STOP;
 
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_EVENT_HANDLER, event_handler_state_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_EVENT_HANDLER, event_handler_state_changed);
 
        event_handler_state_changed((void *)&state);
 
index 34acea40ba89569fa9155951272376c7ad28d8fe..e8df615035840eb005347a6331b59a8a97571f9b 100644 (file)
@@ -258,7 +258,7 @@ static void touchled_init(void *data)
        vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCHKEY_LIGHT_DURATION, hardkey_duration_cb, NULL);
 
        /* register notifier */
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, hardkey_lcd_changed_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, hardkey_lcd_changed_cb);
 
        /* update touchkey light duration right now */
        if (hardkey_duration == KEYBACKLIGHT_TIME_ALWAYS_ON)
@@ -268,7 +268,7 @@ static void touchled_init(void *data)
 static void touchled_exit(void *data)
 {
        /* unregister notifier */
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_LCD, hardkey_lcd_changed_cb);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_LCD, hardkey_lcd_changed_cb);
 
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCHKEY_LIGHT_DURATION, hardkey_duration_cb);
 
index aa10f20266dfd75fc0cd6a4841e324bc8f4f4306..6bbceab999e7e2436956c95c793e155aa9dcc9ba 100644 (file)
@@ -81,7 +81,7 @@ static void delayed_init_done_received(GDBusConnection  *conn,
                        return;
                }
                CRITICAL_LOG("System session is ready.");
-               syscommon_notifier_emit_notify_once(DEVICE_NOTIFIER_DELAYED_INIT, &system_done);
+               syscommon_notifier_emit_notify_once(DEVICED_NOTIFIER_DELAYED_INIT, &system_done);
 
        } else if (strcmp(name, SYSTEMD_DBUS_SIGNAL_USER_STARTUP_FINISHED) == 0) {
                if (user_done)
index 6bfea4f0ba705bb95cc66fda5b6a9b647be79ff3..b7375ae4177e52c3c697e498ae9847a43be04371 100644 (file)
@@ -173,7 +173,7 @@ int doze_init(void)
 
        doze_level = DOZE_LEVEL_0;
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, display_changed_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, display_changed_cb);
 
        doze_initialized = true;
        _D("Doze mode initialized. doze_mode: %d.", doze_mode);
@@ -185,7 +185,7 @@ int doze_exit(void)
 {
        doze_initialized = false;
 
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_LCD, display_changed_cb);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_LCD, display_changed_cb);
 
        return 0;
 }
index 8da70cb124dbe9899fc88f68ec06a73479212426..37fdb6d0fbe53dd708b5250d105bad06d12fc86d 100644 (file)
@@ -117,8 +117,8 @@ static int power_event_unlock_callback(void *data, void *udata)
 }
 
 static void register_power_event_lock_controller(enum eventlock_type type,
-       enum device_notifier_type lock_notify,
-       enum device_notifier_type unlock_notify)
+       enum deviced_notifier lock_notify,
+       enum deviced_notifier unlock_notify)
 {
        /* Acquiring lock must be followed by all the other notifiers, therefore
         * give a large enough number as priority to make it be at the head of notifier list.
@@ -154,18 +154,18 @@ void power_event_lock_init(void)
 
        /* general events, mostly defined by configuration file */
        register_power_event_lock_controller(EL_EVENT_ACTION,
-               DEVICE_NOTIFIER_EVENT_ACQUIRE_WAKELOCK,
-               DEVICE_NOTIFIER_EVENT_RELEASE_WAKELOCK);
+               DEVICED_NOTIFIER_EVENT_ACQUIRE_WAKELOCK,
+               DEVICED_NOTIFIER_EVENT_RELEASE_WAKELOCK);
 
        /* key input event */
        register_power_event_lock_controller(EL_KEY,
-               DEVICE_NOTIFIER_KEY_PRESS,
-               DEVICE_NOTIFIER_KEY_RELEASE);
+               DEVICED_NOTIFIER_KEY_PRESS,
+               DEVICED_NOTIFIER_KEY_RELEASE);
 
        /* charger event */
        if (charger_wakelock) {
                register_power_event_lock_controller(EL_CHARGER,
-                       DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED,
-                       DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED);
+                       DEVICED_NOTIFIER_BATTERY_CHARGER_CONNECTED,
+                       DEVICED_NOTIFIER_BATTERY_CHARGER_DISCONNECTED);
        }
 }
index 355fb03dafa086c79c72f98d3daf3598dcb6c0c0..17bb60f4b614511b91b14f70c024e6f13be1cee9 100644 (file)
@@ -253,7 +253,7 @@ static gboolean __poweroff_main(gpointer data)
        poweroff_delay_for_seconds();
        disable_display();
 
-       /* Below functions follow after notifying DEVICE_NOTIFIER_POWEROFF
+       /* Below functions follow after notifying DEVICED_NOTIFIER_POWEROFF
           1. pmlock
           - pmlock_detector_poweroff_cb()
           - cleanup_pmlock_statistics()
@@ -266,7 +266,7 @@ static gboolean __poweroff_main(gpointer data)
           - device_change_poweroff()
           - uevent_control_stop()
        */
-       syscommon_notifier_emit_notify_once(DEVICE_NOTIFIER_POWEROFF, data);
+       syscommon_notifier_emit_notify_once(DEVICED_NOTIFIER_POWEROFF, data);
 
        poweroff_request_shutdown(state);
 
@@ -313,7 +313,7 @@ void poweroff_prepare(uint64_t state)
                _W("Failed to set vconf value for power off status: %d", vconf_get_ext_errno());
 
        power_exit_autosleep();
-       syscommon_notifier_emit_notify_once(DEVICE_NOTIFIER_POWEROFF_TRIGGERED, (void *)(intptr_t) vconf);
+       syscommon_notifier_emit_notify_once(DEVICED_NOTIFIER_POWEROFF_TRIGGERED, (void *)(intptr_t) vconf);
 
        /* Poweroff event broadcasting */
        system_shutdown_send_system_event();
@@ -480,7 +480,7 @@ void power_off_init(void)
 
        add_delayed_init_done_handler(NULL);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 
        ret_val = config_parse(POWER_CONF_FILE, load_config, NULL);
        if (ret_val < 0)
index 410c0fbdc75989429642118961334e5174718799..c4d8e764a29f55f0f9b6fe15594cbcdf02d40450 100644 (file)
@@ -408,7 +408,7 @@ static void suspend_echo_mem(void)
 
 static void resume_echo_mem(void)
 {
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, NULL);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, NULL);
 }
 
 static void suspend_autosleep(void)
index 29e719c968139c518f3fa20d5ee8ee9c97b79cc5..b8540358b0fecc07c0677010c83b52211a9ef543 100644 (file)
@@ -308,7 +308,7 @@ static void post_action_sleep(const void *udata)
 static void pre_action_poweroff(const void *data)
 {
        // do not transition anymore after poweroff
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_REQUEST_TRANSITION_STATE, transition_request_callback);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_REQUEST_TRANSITION_STATE, transition_request_callback);
        poweroff_prepare(current);
 }
 
@@ -813,8 +813,8 @@ void power_state_init(void *data)
        if (ret < 0)
                _W("Failed to load '%s'(%d)", POWER_CONF_FILE, ret);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_callback);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_REQUEST_TRANSITION_STATE, transition_request_callback);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_callback);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_REQUEST_TRANSITION_STATE, transition_request_callback);
 
        power_dbus_init();
        power_off_init();
index 0bd5ab0df7c235b816bcf7996133512046e08d03..1c11d8b92e0c8bdceffeee6c2fe14c67aa978dca 100644 (file)
@@ -102,7 +102,7 @@ static inline void power_request_change_state_strict(uint64_t curr, uint64_t nex
        struct trans_info ti = { curr, next, reason, udata };
        GList l = { &ti, NULL, NULL };
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_REQUEST_TRANSITION_STATE, &l);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_REQUEST_TRANSITION_STATE, &l);
 }
 
 static inline void power_request_change_state(uint64_t next, int reason)
index 66a31c062c796a5776eb0915dccc08e40e438e90..380a442ea9d778a4e56081e3e769537168f4daf4 100644 (file)
 #define __DEVICE_NOTIFIER_H__
 
 #include <libsyscommon/notifier.h>
-
-enum device_notifier_type {
-       DEVICE_NOTIFIER_MIN,
-       DEVICE_NOTIFIER_DAEMON_RESTARTED = DEVICE_NOTIFIER_MIN,
-       DEVICE_NOTIFIER_DELAYED_INIT,
-       DEVICE_NOTIFIER_LCD,
-       DEVICE_NOTIFIER_LCD_OFF,
-       DEVICE_NOTIFIER_LCD_OFF_COMPLETE,
-       DEVICE_NOTIFIER_LCD_AUTOBRT_SENSING,
-       DEVICE_NOTIFIER_LOWBAT,
-       DEVICE_NOTIFIER_FULLBAT,
-       DEVICE_NOTIFIER_POWER_SUPPLY,
-       DEVICE_NOTIFIER_BATTERY_HEALTH,
-       DEVICE_NOTIFIER_BATTERY_PRESENT,
-       DEVICE_NOTIFIER_BATTERY_OVP,
-       DEVICE_NOTIFIER_BATTERY_CHARGING,
-       DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED,
-       DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED,
-       DEVICE_NOTIFIER_DISPLAY_AMBIENT_CONDITION,
-       DEVICE_NOTIFIER_DISPLAY_AMBIENT_STATE,
-       DEVICE_NOTIFIER_DISPLAY_LOCK,
-       DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM,
-       DEVICE_NOTIFIER_POWEROFF_TRIGGERED,
-       DEVICE_NOTIFIER_POWEROFF,
-       DEVICE_NOTIFIER_APPLICATION_BACKGROUND,
-       DEVICE_NOTIFIER_APPLICATION_FOREGROUND,
-       DEVICE_NOTIFIER_APPLICATION_TERMINATED,
-       DEVICE_NOTIFIER_USB_DEBUG_MODE,
-       DEVICE_NOTIFIER_USB_TETHERING_MODE,
-       DEVICE_NOTIFIER_EVENT_HANDLER,
-       DEVICE_NOTIFIER_CPU_BOOST_LOWBAT,
-       DEVICE_NOTIFIER_CPU_BOOST_POWEROFF,
-       /* Experimental for Specific device - contact to deviced owner */
-       DEVICE_NOTIFIER_PMQOS,
-       DEVICE_NOTIFIER_PMQOS_ULTRAPOWERSAVING,
-       DEVICE_NOTIFIER_PMQOS_POWERSAVING,
-       DEVICE_NOTIFIER_COOL_DOWN,
-       DEVICE_NOTIFIER_VITAL_STATE,
-       DEVICE_NOTIFIER_LONGKEY_RESTORE,
-       DEVICE_NOTIFIER_UPSM,
-       DEVICE_NOTIFIER_UPSM_OFF,
-       DEVICE_NOTIFIER_BEZEL_WAKEUP,
-       DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS,
-       DEVICE_NOTIFIER_ULTRAPOWERSAVING,
-       DEVICE_NOTIFIER_KEY_PRESS,
-       DEVICE_NOTIFIER_KEY_RELEASE,
-       DEVICE_NOTIFIER_EVENT_ACQUIRE_WAKELOCK,
-       DEVICE_NOTIFIER_EVENT_RELEASE_WAKELOCK,
-
-       /* Purpose of calling methods of different modules
-        * Use prefix DEVICE_NOTIFIER_REQUEST */
-       DEVICE_NOTIFIER_REQUEST_TRANSITION_STATE,
-       DEVICE_NOTIFIER_MAX,
-};
+#include <system/syscommon-plugin-deviced-common-interface.h>
 
 typedef enum _device_notifier_state {
-       DEVICE_NOTIFIER_STATE_STOP,
-       DEVICE_NOTIFIER_STATE_START,
-       DEVICE_NOTIFIER_STATE_CHANGED,
+       DEVICED_NOTIFIER_STATE_STOP,
+       DEVICED_NOTIFIER_STATE_START,
+       DEVICED_NOTIFIER_STATE_CHANGED,
        /* add more states here */
 } device_notifier_state_e;
 
index 0eb03d316af867ea270486ddd55b05838b8ea26e..f0d64ad4605ac225f5831844dd80c3ebb173b8f5 100644 (file)
@@ -33,7 +33,7 @@ static gboolean event_release_wakelock(gpointer data)
        _D("Decreased counter=%d, eventid=%d", wakelock_counter, eventid);
 
        if (wakelock_counter == 0)
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_EVENT_RELEASE_WAKELOCK, NULL);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_EVENT_RELEASE_WAKELOCK, NULL);
 
        return G_SOURCE_REMOVE;
 }
@@ -49,5 +49,5 @@ void event_acquire_wakelock(int eventid, int timeout)
        g_timeout_add_seconds(timeout, event_release_wakelock, (gpointer)(intptr_t) eventid);
 
        if (wakelock_counter == 1)
-               syscommon_notifier_emit_notify(DEVICE_NOTIFIER_EVENT_ACQUIRE_WAKELOCK, NULL);
+               syscommon_notifier_emit_notify(DEVICED_NOTIFIER_EVENT_ACQUIRE_WAKELOCK, NULL);
 }
index 7c3313c209464c739089bb3135880f6ac94a316e..01c31963ef91373f85157d34b550c52f8f911aad 100644 (file)
@@ -85,7 +85,7 @@ static void thermal_init(void *data)
 {
        int ret;
 
-       ret = syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       ret = syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
        if (ret < 0)
                _E("Failed to register booting done notifier.");
 
@@ -98,7 +98,7 @@ static void thermal_exit(void *data)
 {
        int ret;
 
-       ret = syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       ret = syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
        if (ret < 0)
                _E("Failed to unregister booting done notifier.");
 
index 69ce017d626da101f8fceff84e6b4093e806ba4a..1fc256d096f708bfe6784e53e7de4537de7f4c6c 100644 (file)
@@ -391,7 +391,7 @@ static void time_init(void *data)
 
        if (timerfd_check_start() == -1)
                _E("Failed system time change detector init.");
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_LCD, time_lcd_changed_cb);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_LCD, time_lcd_changed_cb);
 }
 
 static const struct device_ops time_device_ops = {
index 2d726377aa845a2298949820e17fb6fc354cf840..c703d96636e8c02a6bb80103d473d38e80265deb 100644 (file)
@@ -158,7 +158,7 @@ static int delayed_init_done(void *data)
        }
        ret = hal_device_touchscreen_glove_mode_set_state(TOUCHSENSITIVITY_GLOVE_MODE_ON);
        _I("Change auto touch sensitivity enable: %s", ret ? "fail" : "set");
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 out:
        return done;
 }
@@ -195,7 +195,7 @@ static void sensitivity_init(void *data)
        if (ret <= 0)
                _E("Failed to register signal handler: %d", ret);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 }
 
 static const struct device_ops sensitivity_device_ops = {
index 1d645faeefd6dc6ce30ed2869d4064c46d943c2e..3ea40e41bcf9fa245c45ccc6c7b34c9f21165d31 100644 (file)
@@ -333,7 +333,7 @@ static void touchscreen_init(void *data)
        if (ret < 0)
                _E("Failed to init dbus method. (%d)", ret);
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 }
 
 static const struct device_ops touchscreen_device_ops = {
index 51aeb0a884a49117a74c0379ab3867e3aa855b1e..5035280edcc3e1ec136b35fc0d2b494d9224da7b 100644 (file)
@@ -1166,8 +1166,8 @@ static void tzip_init(void *data)
 
        tzip_lock_init();
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_POWEROFF, tzip_poweroff);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_POWEROFF, tzip_poweroff);
 
        ret = gdbus_add_object(NULL, DEVICED_PATH_TZIP, &dbus_interface);
        if (ret < 0)
@@ -1182,8 +1182,8 @@ static void tzip_exit(void *data)
 {
        _D("tzip_exit");
        tzip_server_exit();
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_POWEROFF, tzip_poweroff);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_POWEROFF, tzip_poweroff);
 
        tzip_lock_deinit();
 }
index 6611fdf6c4dc70705e012966a7e7ce8eae041800..be4d702d638b69f78c8844490e1500c410b4178e 100644 (file)
@@ -77,7 +77,7 @@ static void usb_debug_changed(keynode_t *key, void *data)
 
        _I("USB debug mode is changed to %s.", mode ? "ON" : "OFF");
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_USB_DEBUG_MODE, (void *)(intptr_t) mode);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_USB_DEBUG_MODE, (void *)(intptr_t) mode);
 }
 
 static int usb_debug_mode_changed(void *on)
@@ -106,7 +106,7 @@ void add_usb_debug_handler(void)
                                usb_debug_changed, NULL) != VCONF_OK)
                _E("Failed to add USB debug handler.");
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_USB_DEBUG_MODE, usb_debug_mode_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_USB_DEBUG_MODE, usb_debug_mode_changed);
 
        if (vconf_get_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, &state) == VCONF_OK)
                debug_state = (state == 0 ? false : true);
@@ -117,5 +117,5 @@ void add_usb_debug_handler(void)
 void remove_usb_debug_handler(void)
 {
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, usb_debug_changed);
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_USB_DEBUG_MODE, usb_debug_mode_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_USB_DEBUG_MODE, usb_debug_mode_changed);
 }
index ce1b3ccac7b184a18c7551d5ddc862f2b2a420a1..ca579a532036224ead0f71387cfed39e42c3bcb3 100644 (file)
@@ -49,7 +49,7 @@ static void usb_tethering_changed(keynode_t *key, void *data)
 
        _I("USB tethering mode is changed to %s.", curr ? "ON" : "OFF");
 
-       syscommon_notifier_emit_notify(DEVICE_NOTIFIER_USB_TETHERING_MODE, (void *)curr);
+       syscommon_notifier_emit_notify(DEVICED_NOTIFIER_USB_TETHERING_MODE, (void *)curr);
 }
 
 static int usb_tethering_mode_changed(void *on)
@@ -99,12 +99,12 @@ void add_usb_tethering_handler(void)
        if (vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, usb_tethering_changed, NULL) != VCONF_OK)
                _E("Failed to add USB tethering handler.");
 
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_USB_TETHERING_MODE, usb_tethering_mode_changed);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_USB_TETHERING_MODE, usb_tethering_mode_changed);
 }
 
 void remove_usb_tethering_handler(void)
 {
        vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, usb_tethering_changed);
 
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_USB_TETHERING_MODE, usb_tethering_mode_changed);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_USB_TETHERING_MODE, usb_tethering_mode_changed);
 }
index 377d0d11cb4877d73b94b8dca347a071febac375..7dc2936a6703aaab72c63dddd3459b4c441bd825 100644 (file)
@@ -1124,7 +1124,7 @@ static int delayed_init_done(void *data)
        usbhost_init_from_udev_enumerate();
 
        /* unregister booting done notifier */
-       syscommon_notifier_unsubscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_unsubscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 
        return 0;
 }
@@ -1147,7 +1147,7 @@ static void usbhost_init(void *data)
                _E("Failed to register dbus interface and method: %d", ret);
 
        /* register notifier */
-       syscommon_notifier_subscribe_notify(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
+       syscommon_notifier_subscribe_notify(DEVICED_NOTIFIER_DELAYED_INIT, delayed_init_done);
 
        ret = asprintf(&POLICY_FILEPATH, "%s/%s", ROOTPATH, POLICY_FILENAME);
        if (ret < 0) {