src/apps/apps.c
src/control/control.c
src/core/device-idler.c
- src/core/device-notifier.c
+ src/core/late-booting-done-notifier.c
src/core/devices.c
src/core/event-handler.c
src/core/execute.c
#include "lock-detector.h"
#include "display-ops.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/udev.h"
#include "shared/common.h"
#include "core/launch.h"
#include "core/log.h"
#include "core/devices.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "util.h"
#include "device-interface.h"
#include "vconf.h"
#include "display-ops.h"
#include "shared/common.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "shared/common.h"
#include "shared/plugin.h"
#include "power/power-handler.h"
#include "display/poll.h"
#include "shared/eventsystem.h"
#include "shared/plugin.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#define METHOD_LOW_NOTI_ON "BatteryLowNotiOn"
#include "lock-detector.h"
#include "display-ops.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/udev.h"
#include "shared/common.h"
#include "core/launch.h"
#include "core/log.h"
#include "core/devices.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "util.h"
#include "device-interface.h"
#include "vconf.h"
#include "display-ops.h"
#include "shared/common.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "shared/common.h"
#include "shared/plugin.h"
#include "power/power-handler.h"
#include "lock-detector.h"
#include "display-ops.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/udev.h"
#include "shared/common.h"
#include "core/launch.h"
#include "core/log.h"
#include "core/devices.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "util.h"
#include "device-interface.h"
#include "vconf.h"
#include "display-ops.h"
#include "shared/common.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "shared/common.h"
#include "shared/plugin.h"
#include "power/power-handler.h"
#include "shared/common.h"
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/devices.h"
#include "display/display-ops.h"
#include "display/display-lock.h"
#include "display/core.h"
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "power-supply.h"
#include "battery-ops.h"
#include "battery.h"
#include "display/util.h"
#include "display/core.h"
#include "display/display-ops.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "battery/power-supply.h"
#include "shared/plugin.h"
#include "core/devices.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "display/util.h"
#include "display/poll.h"
#include "display/core.h"
#include "lock-detector.h"
#include "display-ops.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/udev.h"
#include "shared/common.h"
#include "core/launch.h"
#include "core/log.h"
#include "core/devices.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "util.h"
#include "device-interface.h"
#include "vconf.h"
#include <error.h>
#include "auto-brightness-sensorhub.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "display/util.h"
#include "display/core.h"
#include "display/poll.h"
#include "core/devices.h"
#include "core/log.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#define VCONF_HIGH_CONTRAST VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST
#define VCONF_GREYSCALE VCONFKEY_SETAPPL_ACCESSIBILITY_GREYSCALE
#include "display/display-ops.h"
#include "display/display-dpms.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#define BOARD_CONF_FILE "/etc/deviced/display.conf"
#include "display-ops.h"
#include "shared/common.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "shared/common.h"
#include "shared/plugin.h"
#include "power/power-handler.h"
#include "display/core.h"
#include "display/display-ops.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#define DISPLAY_CONF_FILE "/etc/deviced/display.conf"
#include "shared/common.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/log.h"
#include "display/core.h"
#include "display/device-interface.h"
#include <errno.h>
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/devices.h"
#include "display/core.h"
#include "display/util.h"
#include "core/log.h"
#include "core/launch.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "shared/common.h"
#include "core/udev.h"
#include "shared/eventsystem.h"
#include <libsyscommon/ini-parser.h>
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/udev.h"
#include "core/log.h"
#include "display/poll.h"
#include "shared/common.h"
#include "devices.h"
-#include "device-notifier.h"
+#include "shared/device-notifier.h"
#include "log.h"
static device_notifier_state_e state = DEVICE_NOTIFIER_STATE_STOP;
--- /dev/null
+/*
+ * deviced
+ *
+ * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "log.h"
+#include "shared/device-notifier.h"
+#include "shared/common.h"
+#include "core/devices.h"
+#include <libsyscommon/libgdbus.h>
+#include <libsyscommon/list.h>
+
+static guint late_init_timer;
+
+#define LATE_INIT_WAIT_TIME 30 /* second */
+#define DEFAULT_LATE_INIT_VALUE (guint)0x0DEF0DEF
+
+static void late_init_stop(void)
+{
+ if (late_init_timer == 0 || late_init_timer == DEFAULT_LATE_INIT_VALUE)
+ return;
+
+ g_source_remove(late_init_timer);
+ late_init_timer = 0;
+}
+
+static int booting_done(void *data)
+{
+ static int done;
+
+ if (data == NULL)
+ goto out;
+
+ done = *(int *)data;
+ if (late_init_timer == 0)
+ return done;
+ late_init_stop();
+out:
+ return done;
+}
+
+static int early_booting_done(void *data)
+{
+ static int done;
+
+ if (data == NULL)
+ goto out;
+
+ done = *(int *)data;
+out:
+ return done;
+}
+
+static gboolean late_init_timer_cb(void *data)
+{
+ int done;
+
+ late_init_stop();
+ done = early_booting_done(NULL);
+ if (!done)
+ device_notify(DEVICE_NOTIFIER_EARLY_BOOTING_DONE, (void *)&done);
+ done = booting_done(NULL);
+ late_init_timer = 0;
+ if (done)
+ return G_SOURCE_REMOVE;
+ _I("late booting done");
+ done = TRUE;
+ device_notify_once(DEVICE_NOTIFIER_BOOTING_DONE, (void *)&done);
+ return G_SOURCE_REMOVE;
+}
+
+static void late_booting_done_notifier_init(void *data)
+{
+ int ret;
+
+ ret = check_systemd_active();
+ if (ret == TRUE) {
+ _I("restart booting done");
+ return;
+ }
+ register_notifier(DEVICE_NOTIFIER_BOOTING_DONE, booting_done);
+ register_notifier(DEVICE_NOTIFIER_EARLY_BOOTING_DONE, early_booting_done);
+ late_init_timer = g_timeout_add_seconds(LATE_INIT_WAIT_TIME,
+ late_init_timer_cb, NULL);
+
+ if (!late_init_timer)
+ late_init_timer = DEFAULT_LATE_INIT_VALUE;
+}
+
+static void late_booting_done_notifier_exit(void *data)
+{
+
+}
+
+static const struct device_ops notifier_device_ops = {
+ DECLARE_NAME_LEN("late-booting-done-notifier"),
+ .init = late_booting_done_notifier_init,
+ .exit = late_booting_done_notifier_exit,
+};
+
+DEVICE_OPS_REGISTER(¬ifier_device_ops)
#include <stdio.h>
#include <stdarg.h>
#include "log.h"
-#include "device-notifier.h"
+#include "shared/device-notifier.h"
#ifdef DEBUG
void __cyg_profile_func_enter(void *, void *)
#include "power/boot.h"
#include "power/power-handler.h"
#include "shared/plugin.h"
-#include "device-notifier.h"
+#include "shared/device-notifier.h"
#define PIDFILE_PATH "/var/run/.deviced.pid"
#define WATCHDOG_REFRESH_TIME 5
#include <libsyscommon/list.h>
#include "log.h"
-#include "device-notifier.h"
+#include "shared/device-notifier.h"
#include "devices.h"
#include "udev.h"
#include "core/log.h"
#include "core/devices.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#define DEFAULT_PMQOS_TIMER 3000
#include "core.h"
#include "display.h"
#include "display-ops.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/devices.h"
#include "shared/plugin.h"
#include "core.h"
#include "display-ops.h"
#include "setting.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include <libsyscommon/ini-parser.h>
#define METHOD_CHECK_SUPPORTED "CheckSupported"
#include "shared/common.h"
#include "core/devices.h"
#include "core/device-idler.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "apps/apps.h"
#include "dd-display.h"
#include "display-actor.h"
#include <libsyscommon/list.h>
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "display/device-interface.h"
#include "display/util.h"
#include "display/display-dpms.h"
#include "util.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
static inline long clock_gettime_to_long(void)
{
#include "util.h"
#include "core.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
struct lock_info {
unsigned long hash;
#include <libsyscommon/libgdbus.h>
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/udev.h"
#include "display/core.h"
#include "display/display-ops.h"
#include "core/log.h"
#include "shared/common.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/udev.h"
#include "extcon.h"
#include <libsyscommon/list.h>
#include "core/log.h"
#include "core/bitmap.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "display/core.h"
#include "display/display-ops.h"
#include "extcon.h"
#include "core/log.h"
#include "shared/common.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
struct rgb_request {
pid_t pid;
#include "core/log.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "display/core.h"
#include "display/setting.h"
#include "display/display-ops.h"
#include <libsyscommon/libsystemd.h>
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "shared/common.h"
#include "display/poll.h"
#include "display/display-ops.h"
#include "doze.h"
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "display/core.h"
#define DOZE_DISABLED 0
#include "core/log.h"
#include "core/devices.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "vconf.h"
#include "display/display-dpms.h"
#include "display/display.h"
#include "dd-deviced.h"
#include "core/log.h"
#include "core/launch.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/device-idler.h"
#include "shared/common.h"
#include "core/devices.h"
#include "log.h"
#include "device-notifier.h"
#include "shared/common.h"
-#include "core/devices.h"
-#include <libsyscommon/libgdbus.h>
#include <libsyscommon/list.h>
+#define __stringify_1(x...) #x
+#define __stringify(x...) __stringify_1(x)
+
struct device_notifier {
bool deleted;
enum device_notifier_type type;
static GList *device_notifier_list;
static guint idl;
-static guint late_init_timer;
-#define LATE_INIT_WAIT_TIME 30 /* second */
-#define DEFAULT_LATE_INIT_VALUE (guint)0x0DEF0DEF
#define FIND_NOTIFIER(a, b, d, e, f) \
SYS_G_LIST_FOREACH(a, b, d) \
if (!idl)
idl = g_idle_add(delete_unused_notifier_cb, NULL);
}
-
-static void late_init_stop(void)
-{
- if (late_init_timer == 0 || late_init_timer == DEFAULT_LATE_INIT_VALUE)
- return;
-
- g_source_remove(late_init_timer);
- late_init_timer = 0;
-}
-
-static int booting_done(void *data)
-{
- static int done;
-
- if (data == NULL)
- goto out;
-
- done = *(int *)data;
- if (late_init_timer == 0)
- return done;
- late_init_stop();
-out:
- return done;
-}
-
-static int early_booting_done(void *data)
-{
- static int done;
-
- if (data == NULL)
- goto out;
-
- done = *(int *)data;
-out:
- return done;
-}
-
-static gboolean late_init_timer_cb(void *data)
-{
- int done;
-
- late_init_stop();
- done = early_booting_done(NULL);
- if (!done)
- device_notify(DEVICE_NOTIFIER_EARLY_BOOTING_DONE, (void *)&done);
- done = booting_done(NULL);
- late_init_timer = 0;
- if (done)
- return G_SOURCE_REMOVE;
- _I("late booting done");
- done = TRUE;
- device_notify_once(DEVICE_NOTIFIER_BOOTING_DONE, (void *)&done);
- return G_SOURCE_REMOVE;
-}
-
-static void device_notifier_init(void *data)
-{
- int ret;
-
- ret = check_systemd_active();
- if (ret == TRUE) {
- _I("restart booting done");
- return;
- }
- register_notifier(DEVICE_NOTIFIER_BOOTING_DONE, booting_done);
- register_notifier(DEVICE_NOTIFIER_EARLY_BOOTING_DONE, early_booting_done);
- late_init_timer = g_timeout_add_seconds(LATE_INIT_WAIT_TIME,
- late_init_timer_cb, NULL);
-
- if (!late_init_timer)
- late_init_timer = DEFAULT_LATE_INIT_VALUE;
-}
-
-static void device_notifier_exit(void *data)
-{
-
-}
-
-static const struct device_ops notifier_device_ops = {
- DECLARE_NAME_LEN("notifier"),
- .init = device_notifier_init,
- .exit = device_notifier_exit,
-};
-
-DEVICE_OPS_REGISTER(¬ifier_device_ops)
-
#include "apps/apps.h"
#include "core/devices.h"
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/devices.h"
#include "thermal.h"
#include "display/core.h"
#include "display/display-ops.h"
#include "shared/common.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "shared/plugin.h"
#define PREDEF_SET_DATETIME "set_datetime"
#include "core/devices.h"
#include "shared/common.h"
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#ifndef VCONFKEY_SETAPPL_TOUCH_SENSITIVITY
#include "core/devices.h"
#include "shared/common.h"
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "battery/power-supply.h"
#include "display/core.h"
#include "display/display-ops.h"
#include "core/log.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "shared/common.h"
#include "tzip-utility.h"
#include "core/log.h"
#include "core/device-idler.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/devices.h"
#define SYS_DUMMY_HCD_PATH "/sys/module/dummy_hcd"
#include <hal/device/hal-usb_gadget-interface.h>
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "usb.h"
#include <hal/device/hal-usb_gadget-interface.h>
#include "core/log.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "usb.h"
#include "core/log.h"
#include "core/devices.h"
-#include "core/device-notifier.h"
+#include "shared/device-notifier.h"
#include "core/udev.h"
#include "core/device-idler.h"
#include "apps/apps.h"