As poll.h is located under display module, it can cause header conflict.
This because display header modules are included to CMake path when they
are build, and poll.h is located under display module.
Since poll.h is used from several modules in the deviced,
this should be moved to shared.
Change-Id: If7c0339bb88fc8281ec4f02a450db9965ace5157
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
#include <libsyscommon/log.h>
#include "core.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "lock-detector.h"
#include "display-ops.h"
#include "shared/devices.h"
#include <hal/hal-device-power.h>
#include "core.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "lock-detector.h"
#include "display-ops.h"
#include "shared/devices.h"
#include <linux/input.h>
#include "core.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "device-interface.h"
#include "display-actor.h"
#include "display-panel.h"
#include "shared/devices.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "core.h"
#include "display-lock.h"
#include "display-ops.h"
#include <libsyscommon/log.h>
#include "auto-brightness-sensorhub.h"
#include "core.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "lock-detector.h"
#include "display-ops.h"
#include "setting.h"
#include "shared/device-notifier.h"
#include "core.h"
#include "device-interface.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "shared/common.h"
#include "shared/devices.h"
#include <libsyscommon/log.h>
#include <linux/input.h>
#include "core.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "device-interface.h"
#include "display-actor.h"
#include "display-info.h"
#include "shared/eventsystem.h"
#include "shared/plugin.h"
#include "setting.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "display-lock.h"
#include "display-ops.h"
#include "display-state-transition.h"
#include "shared/device-notifier.h"
#include "core/udev.h"
#include "core/log.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "setting.h"
#include "shared/eventsystem.h"
#include "shared/plugin.h"
#include <system/syscommon-plugin-deviced-common-interface.h>
#include <system/syscommon-plugin-deviced-display.h>
-#include "poll.h"
+#include "shared/poll.h"
#include "setting.h"
#include "display.h"
#include "display-config.h"
#include "shared/common.h"
#include "device-interface.h"
-#include "poll.h"
+#include "shared/poll.h"
//#include "display.h"
#include "display-signal.h"
#include "lock-detector.h"
#include "display-panel.h"
#include "display-state-transition.h"
#include "lock-detector.h"
-#include "poll.h"
+#include "shared/poll.h"
static bool stay_touchscreen_off = false;
static bool touch_event_blocked = false;
#include "display-signal.h"
#include "display-util.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "shared/log.h"
#include "shared/plugin.h"
#include "shared/time.h"
#include <system/syscommon-plugin-deviced-display-interface.h>
-#include "poll.h"
+#include "shared/poll.h"
#include "display-misc.h"
#include "display-util.h"
+++ /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 poll.h
- * @brief Power Manager input device poll implementation
- *
- */
-
-#ifndef __PM_POLL_H__
-#define __PM_POLL_H__
-
-#include <libsyscommon/libgdbus.h>
-/**
- * @addtogroup POWER_MANAGER
- * @{
- */
-
-enum {
- INPUT_POLL_EVENT = -9,
- SIDEKEY_POLL_EVENT,
- PWRKEY_POLL_EVENT,
- PM_CONTROL_EVENT,
-};
-
-#define SIGNAL_NAME_LCD_CONTROL "lcdcontol"
-
-#define LCD_NORMAL 0x01 /**< NORMAL state */
-#define LCD_DIM 0x02 /**< LCD dimming state */
-#define LCD_OFF 0x04 /**< LCD off state */
-#define SUSPEND 0x08 /**< Suspend state */
-#define POWER_OFF 0x10 /**< Sleep state */
-#define STANDBY 0x20 /**< Standby state */
-
-
-#define STAY_CUR_STATE 0x1
-#define GOTO_STATE_NOW 0x2
-
-#define PM_SLEEP_MARGIN 0x0 /**< keep guard time for unlock */
-#define PM_RESET_TIMER 0x1 /**< reset timer for unlock */
-#define PM_KEEP_TIMER 0x2 /**< keep timer for unlock */
-
-/**
- * display lock condition (unsigned integer)
- *
- * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
- * reserved flags request state
- *
- */
-
-enum cond_request_e {
- PM_REQUEST_LOCK = 1 << 0,
- PM_REQUEST_UNLOCK = 1 << 1,
- PM_REQUEST_CHANGE = 1 << 2,
-};
-
-enum cond_flags_e {
- PM_FLAG_RESET_TIMER = 1 << 1,
- PM_FLAG_KEEP_TIMER = 1 << 2,
-};
-
-#define SHIFT_STATE 0
-#define SHIFT_REQUEST 8
-#define SHIFT_FLAGS 16
-#define COND_MASK 0xff /* 11111111 */
-#define SET_COND_REQUEST(cond, req) ((cond) | ((req) << SHIFT_REQUEST))
-#define SET_COND_FLAG(cond, flags) ((cond) | ((flags) << SHIFT_FLAGS))
-#define IS_COND_REQUEST_LOCK(cond) (((cond) >> SHIFT_REQUEST) & COND_MASK & PM_REQUEST_LOCK)
-#define IS_COND_REQUEST_UNLOCK(cond) (((cond) >> SHIFT_REQUEST) & COND_MASK & PM_REQUEST_UNLOCK)
-#define IS_COND_REQUEST_CHANGE(cond) (((cond) >> SHIFT_REQUEST) & COND_MASK & PM_REQUEST_CHANGE)
-#define GET_COND_STATE(cond) ((cond) & COND_MASK)
-#define GET_COND_FLAG(cond) (((cond) >> SHIFT_FLAGS) & COND_MASK)
-
-
-#define PM_LOCK_STR "lock"
-#define PM_UNLOCK_STR "unlock"
-#define PM_CHANGE_STR "change"
-
-#define PM_LCDOFF_STR "lcdoff"
-#define PM_LCDDIM_STR "lcddim"
-#define PM_LCDON_STR "lcdon"
-#define PM_STANDBY_STR "standby"
-#define PM_SUSPEND_STR "suspend"
-
-#define STAYCURSTATE_STR "staycurstate"
-#define GOTOSTATENOW_STR "gotostatenow"
-
-#define STANDBYMODE_STR "standbymode"
-
-#define SLEEP_MARGIN_STR "sleepmargin"
-#define RESET_TIMER_STR "resettimer"
-#define KEEP_TIMER_STR "keeptimer"
-
-/**
- * @}
- */
-
-#endif /*__PM_POLL_H__ */
#include "shared/common.h"
#include "core/log.h"
#include "core.h"
-#include "poll.h"
+#include "shared/poll.h"
#define BUFF_MAX 255
#define LOCK_STR_MAX 20
#include <system/syscommon-plugin-deviced-common-interface.h>
#include "core/log.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "display-ops.h"
#include "display-state-transition.h"
#include "extcon/extcon.h"
#include "core/log.h"
#include "shared/device-notifier.h"
#include "shared/common.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "display-ops.h"
#include "shared/plugin.h"
#include "power-boot.h"
#include "shared/device-notifier.h"
#include "shared/common.h"
#include "shared/devices.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "setting.h"
#include "core.h"
#include "display-ops.h"
#include <string.h>
#include <libsyscommon/libgdbus.h>
#include "shared/common.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "display-ops.h"
#define APP_POWERKEY "powerkey"
--- /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 poll.h
+ * @brief Power Manager input device poll implementation
+ *
+ */
+
+#ifndef __PM_POLL_H__
+#define __PM_POLL_H__
+
+#include <libsyscommon/libgdbus.h>
+/**
+ * @addtogroup POWER_MANAGER
+ * @{
+ */
+
+enum {
+ INPUT_POLL_EVENT = -9,
+ SIDEKEY_POLL_EVENT,
+ PWRKEY_POLL_EVENT,
+ PM_CONTROL_EVENT,
+};
+
+#define SIGNAL_NAME_LCD_CONTROL "lcdcontol"
+
+#define LCD_NORMAL 0x01 /**< NORMAL state */
+#define LCD_DIM 0x02 /**< LCD dimming state */
+#define LCD_OFF 0x04 /**< LCD off state */
+#define SUSPEND 0x08 /**< Suspend state */
+#define POWER_OFF 0x10 /**< Sleep state */
+#define STANDBY 0x20 /**< Standby state */
+
+
+#define STAY_CUR_STATE 0x1
+#define GOTO_STATE_NOW 0x2
+
+#define PM_SLEEP_MARGIN 0x0 /**< keep guard time for unlock */
+#define PM_RESET_TIMER 0x1 /**< reset timer for unlock */
+#define PM_KEEP_TIMER 0x2 /**< keep timer for unlock */
+
+/**
+ * display lock condition (unsigned integer)
+ *
+ * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
+ * reserved flags request state
+ *
+ */
+
+enum cond_request_e {
+ PM_REQUEST_LOCK = 1 << 0,
+ PM_REQUEST_UNLOCK = 1 << 1,
+ PM_REQUEST_CHANGE = 1 << 2,
+};
+
+enum cond_flags_e {
+ PM_FLAG_RESET_TIMER = 1 << 1,
+ PM_FLAG_KEEP_TIMER = 1 << 2,
+};
+
+#define SHIFT_STATE 0
+#define SHIFT_REQUEST 8
+#define SHIFT_FLAGS 16
+#define COND_MASK 0xff /* 11111111 */
+#define SET_COND_REQUEST(cond, req) ((cond) | ((req) << SHIFT_REQUEST))
+#define SET_COND_FLAG(cond, flags) ((cond) | ((flags) << SHIFT_FLAGS))
+#define IS_COND_REQUEST_LOCK(cond) (((cond) >> SHIFT_REQUEST) & COND_MASK & PM_REQUEST_LOCK)
+#define IS_COND_REQUEST_UNLOCK(cond) (((cond) >> SHIFT_REQUEST) & COND_MASK & PM_REQUEST_UNLOCK)
+#define IS_COND_REQUEST_CHANGE(cond) (((cond) >> SHIFT_REQUEST) & COND_MASK & PM_REQUEST_CHANGE)
+#define GET_COND_STATE(cond) ((cond) & COND_MASK)
+#define GET_COND_FLAG(cond) (((cond) >> SHIFT_FLAGS) & COND_MASK)
+
+
+#define PM_LOCK_STR "lock"
+#define PM_UNLOCK_STR "unlock"
+#define PM_CHANGE_STR "change"
+
+#define PM_LCDOFF_STR "lcdoff"
+#define PM_LCDDIM_STR "lcddim"
+#define PM_LCDON_STR "lcdon"
+#define PM_STANDBY_STR "standby"
+#define PM_SUSPEND_STR "suspend"
+
+#define STAYCURSTATE_STR "staycurstate"
+#define GOTOSTATENOW_STR "gotostatenow"
+
+#define STANDBYMODE_STR "standbymode"
+
+#define SLEEP_MARGIN_STR "sleepmargin"
+#define RESET_TIMER_STR "resettimer"
+#define KEEP_TIMER_STR "keeptimer"
+
+/**
+ * @}
+ */
+
+#endif /*__PM_POLL_H__ */
#include "core/log.h"
#include "shared/devices.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "core.h"
#include "display-ops.h"
#include "shared/common.h"
#include "core/log.h"
#include "core/udev.h"
-#include "poll.h"
+#include "shared/poll.h"
#include "display-lock.h"
#include "display-ops.h"
#include "shared/plugin.h"