util.h is used from display plugins for Power manager logging.
The concept of power manager that exist as legacy while refactoring
should be eliminated.
By deleting util.h, the dependency problem is solved and the plugin-common
is also erased.
Also, util.h can be replaced by display-util.h and log.h in the display core.
Change-Id: Ic9630ff0a8ef50190d1abab9ce5a86956b714c8a
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
# FIXME: Temporary include path for separating display core and plugin
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src/display)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src/display/plugin-common)
SET(PKG_MODULES
vconf
FILE(GLOB ALL_SRCS "*.c")
SET(SRCS ${ALL_SRCS})
-ADD_SOURCE(${CMAKE_SOURCE_DIR}/src/display/plugin-common COMMON_SRCS)
-SET(SRCS ${SRCS} ${COMMON_SRCS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/core)
# FIXME: Temporary include path for separating display core and plugin
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display/plugin-common)
INCLUDE(FindPkgConfig)
pkg_check_modules(libpkgs REQUIRED
#include <device/display-internal.h>
#include <hal/device/hal-device-power.h>
+#include "shared/log.h"
#include "ambient-mode.h"
-#include "util.h"
#include "core.h"
#include "poll.h"
#include "lock-detector.h"
#include "shared/devices.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
-#include "util.h"
#include "device-interface.h"
#include "vconf.h"
#include "core.h"
#include <linux/input.h>
#include "ambient-mode.h"
-#include "util.h"
#include "core.h"
#include "poll.h"
#include "device-interface.h"
#include "display-config.h"
#include "display-misc.h"
#include "display-state-transition.h"
+#include "display-util.h"
#include "shared/common.h"
#include "shared/devices.h"
#include "shared/device-notifier.h"
#include "shared/common.h"
#include "shared/plugin.h"
#include "shared/apps.h"
+#include "shared/log.h"
#include "power/power-off.h"
#include "power/power-suspend.h"
#include "led/touch-key.h"
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
# FIXME: Temporary include path for separating display core and plugin
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display/plugin-common)
INCLUDE(FindPkgConfig)
pkg_check_modules(libpkgs REQUIRED
FILE(GLOB ALL_SRCS "*.c")
SET(SRCS ${ALL_SRCS})
-ADD_SOURCE(${CMAKE_SOURCE_DIR}/src/display/plugin-common COMMON_SRCS)
-SET(SRCS ${SRCS} ${COMMON_SRCS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/core)
# FIXME: Temporary include path for separating display core and plugin
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display/plugin-common)
INCLUDE(FindPkgConfig)
pkg_check_modules(libpkgs REQUIRED
#include <libsyscommon/list.h>
#include <hal/device/hal-device-power.h>
+#include "shared/log.h"
#include "ambient-mode.h"
-#include "util.h"
#include "core.h"
#include "poll.h"
#include "lock-detector.h"
#include "shared/devices.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
-#include "util.h"
#include "device-interface.h"
#include "vconf.h"
#include "core.h"
#include <linux/input.h>
#include "ambient-mode.h"
-#include "util.h"
#include "core.h"
#include "poll.h"
#include "device-interface.h"
#include "display-config.h"
#include "display-misc.h"
#include "display-state-transition.h"
+#include "display-util.h"
#include "shared/common.h"
#include "shared/devices.h"
#include "shared/device-notifier.h"
#include "shared/common.h"
#include "shared/plugin.h"
#include "shared/apps.h"
+#include "shared/log.h"
#include "power/power-off.h"
#include "power/power-suspend.h"
#include "led/touch-key.h"
FILE(GLOB ALL_SRCS "*.c")
SET(SRCS ${ALL_SRCS})
-ADD_SOURCE(${CMAKE_SOURCE_DIR}/src/display/plugin-common COMMON_SRCS)
-SET(SRCS ${SRCS} ${COMMON_SRCS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/core)
# FIXME: Temporary include path for separating display core and plugin
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display/plugin-common)
INCLUDE(FindPkgConfig)
pkg_check_modules(libpkgs REQUIRED
#include <libsyscommon/list.h>
#include <hal/device/hal-device-power.h>
+#include "shared/log.h"
#include "ambient-mode.h"
-#include "util.h"
#include "core.h"
#include "poll.h"
#include "lock-detector.h"
#include "shared/devices.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
-#include "util.h"
#include "device-interface.h"
#include "vconf.h"
#include "core.h"
#include <linux/input.h>
#include "ambient-mode.h"
-#include "util.h"
#include "core.h"
#include "poll.h"
#include "device-interface.h"
#include "display-config.h"
#include "display-misc.h"
#include "display-state-transition.h"
+#include "display-util.h"
#include "shared/common.h"
#include "shared/devices.h"
#include "shared/device-notifier.h"
FILE(GLOB ALL_SRCS "*.c")
SET(SRCS ${ALL_SRCS})
-ADD_SOURCE(${CMAKE_SOURCE_DIR}/src/display/plugin-common COMMON_SRCS)
-SET(SRCS ${SRCS} ${COMMON_SRCS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/battery-monitor)
# FIXME: Temporary include path for separating display core and plugin
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display/plugin-common)
INCLUDE(FindPkgConfig)
pkg_check_modules(libpkgs REQUIRED
#include "hbm.h"
#include "lbm.h"
#include "auto-brightness-sensorhub.h"
-#include "util.h"
#include "core.h"
#include "device-interface.h"
#include "display-info.h"
#include "display-backlight.h"
#include "display-config.h"
#include "shared/device-notifier.h"
+#include "shared/log.h"
#include "battery/power-supply.h"
#include "shared/plugin.h"
#include <vconf.h>
#include <sensor.h>
-#include "util.h"
#include "core.h"
#include "device-interface.h"
#include "display-info.h"
#include "display-config.h"
#include "setting.h"
#include "shared/device-notifier.h"
+#include "shared/log.h"
#include <libsyscommon/ini-parser.h>
#define MAX_SAMPLING_COUNT 3
#include "shared/devices.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
-#include "util.h"
#include "poll.h"
#include "core.h"
#include "display-ops.h"
+#include "shared/log.h"
#include "shared/plugin.h"
#ifndef VCONFKEY_SETAPPL_WAKEUP_BY_BEZEL_ENABLE
#include <libsyscommon/list.h>
#include <hal/device/hal-device-power.h>
+#include "shared/log.h"
#include "auto-brightness-sensorhub.h"
#include "ambient-mode.h"
-#include "util.h"
#include "core.h"
#include "poll.h"
#include "lock-detector.h"
#include "shared/devices.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
-#include "util.h"
#include "device-interface.h"
#include "vconf.h"
#include "core.h"
#include "auto-brightness-sensorhub.h"
#include "shared/device-notifier.h"
-#include "util.h"
#include "core.h"
#include "device-interface.h"
#include "poll.h"
#include "shared/common.h"
#include "shared/devices.h"
+#include "shared/log.h"
#include "display-actor.h"
#include "display-info.h"
#include "display-panel.h"
#include "auto-brightness-sensorhub.h"
#include "weaks.h"
#include "display-info.h"
-#include "util.h"
#include "core.h"
#include "display-ops.h"
#include "display-panel.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
+#include "shared/log.h"
#define BOARD_CONF_FILE "/etc/deviced/display.conf"
#include <linux/input.h>
#include "ambient-mode.h"
-#include "util.h"
#include "core.h"
#include "poll.h"
#include "device-interface.h"
#include "display-config.h"
#include "display-misc.h"
#include "display-state-transition.h"
+#include "display-util.h"
#include "shared/common.h"
#include "shared/devices.h"
#include "shared/device-notifier.h"
#include "auto-brightness-sensorhub.h"
#include "lbm.h"
#include "display-info.h"
-#include "util.h"
#include "core.h"
#include "device-interface.h"
#include "display-backlight.h"
#include "display-ops.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
+#include "shared/log.h"
#define SIGNAL_LBM_ON "LBMOn"
#define SIGNAL_LBM_OFF "LBMOff"
#include "shared/device-notifier.h"
#include "shared/devices.h"
#include "core.h"
-#include "util.h"
#include "device-interface.h"
#include "display-ops.h"
#include "display-panel.h"
#include "shared/plugin.h"
+#include "shared/log.h"
#include <libsyscommon/libgdbus.h>
#include <fcntl.h>
#include <libsyscommon/libgdbus.h>
-#include "util.h"
#include "core.h"
#include "display.h"
#include "display-ops.h"
#include "display-panel.h"
#include "display-plugin.h"
#include "display-state-transition.h"
+#include "shared/log.h"
#include "shared/device-notifier.h"
#include "shared/devices.h"
#include "shared/plugin.h"
#include <stdio.h>
#include <libsyscommon/list.h>
-#include "util.h"
#include "display-actor.h"
#include "shared/common.h"
#include "ambient-mode.h"
#include "core/log.h"
-#include "util.h"
#include "core.h"
#include "lock-detector.h"
#include "shared/common.h"
#include "core/log.h"
#include "shared/device-notifier.h"
#include "device-interface.h"
-#include "util.h"
#include "display-dpms.h"
#include "display-plugin.h"
#include "device-interface.h"
#include "display-config.h"
#include "display-misc.h"
#include "display-state-transition.h"
+#include "shared/log.h"
#include "shared/log-macro.h"
#include "shared/apps.h"
#include <stdio.h>
#include <libsyscommon/list.h>
-#include "util.h"
#include "display-ops.h"
+#include "shared/log.h"
#include "shared/common.h"
static GList *disp_head;
#include "display-signal.h"
#include "display-util.h"
#include "poll.h"
+#include "shared/log.h"
#include "shared/plugin.h"
#include "shared/time.h"
#include <libsyscommon/libgdbus.h>
-#include "util.h"
#include "shared/devices.h"
#include "shared/device-notifier.h"
#include "shared/devices.h"
+#define SEC_TO_MSEC(x) ((x)*1000)
+#define MSEC_TO_SEC(x) ((x)/1000)
+#define USEC_TO_SEC(x) ((x)/1000000.0)
+#define NSEC_TO_SEC(x) ((x)/1000000000.0)
+
int display_util_get_device_flags_name(enum device_flags flags, const char **flag_name);
#endif /* __DISPLAY_UTIL_H__ */
\ No newline at end of file
#include <sys/types.h>
#include <libsyscommon/list.h>
-#include "util.h"
#include "core.h"
#include "display-misc.h"
+#include "shared/log.h"
#include "shared/device-notifier.h"
struct lock_info {
+++ /dev/null
-/*
- * deviced
- *
- * Copyright (c) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * 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.
- */
-
-
-/**
- * @file util.h
- * @brief Utilities header for Power manager
- */
-#ifndef __DEF_UTIL_H__
-#define __DEF_UTIL_H__
-
-/**
- * @addtogroup POWER_MANAGER
- * @{
- */
-#ifdef ENABLE_DEVICED_DLOG
-#define ENABLE_DLOG
-#endif
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-
-#define LOG_TAG "POWER_MANAGER"
-#include "shared/log-macro.h"
-
-#define SEC_TO_MSEC(x) ((x)*1000)
-#define MSEC_TO_SEC(x) ((x)/1000)
-#define USEC_TO_SEC(x) ((x)/1000000.0)
-#define NSEC_TO_SEC(x) ((x)/1000000000.0)
-
-/**
- * @}
- */
-#endif
*/
#include <stdio.h>
-#include "util.h"
#include "core.h"
#include "device-interface.h"
#include "poll.h"
#include "display-ops.h"
#include "display-plugin.h"
#include "display-state-transition.h"
+#include "shared/log.h"
#include "shared/plugin.h"
static PMMsg recv_data;
#include "ambient-mode.h"
#include "core.h"
#include "device-interface.h"
-#include "util.h"
#include "setting.h"
#include "display-misc.h"
#include "display-ops.h"
#include "display-plugin.h"
#include "display-state-transition.h"
#include "led/touch-key.h"
+#include "shared/log.h"
#include "shared/eventsystem.h"
#include "shared/plugin.h"