66a31c062c796a5776eb0915dccc08e40e438e90
[platform/core/system/deviced.git] / src / shared / device-notifier.h
1 /*
2  * deviced
3  *
4  * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19
20 #ifndef __DEVICE_NOTIFIER_H__
21 #define __DEVICE_NOTIFIER_H__
22
23 #include <libsyscommon/notifier.h>
24
25 enum device_notifier_type {
26         DEVICE_NOTIFIER_MIN,
27         DEVICE_NOTIFIER_DAEMON_RESTARTED = DEVICE_NOTIFIER_MIN,
28         DEVICE_NOTIFIER_DELAYED_INIT,
29         DEVICE_NOTIFIER_LCD,
30         DEVICE_NOTIFIER_LCD_OFF,
31         DEVICE_NOTIFIER_LCD_OFF_COMPLETE,
32         DEVICE_NOTIFIER_LCD_AUTOBRT_SENSING,
33         DEVICE_NOTIFIER_LOWBAT,
34         DEVICE_NOTIFIER_FULLBAT,
35         DEVICE_NOTIFIER_POWER_SUPPLY,
36         DEVICE_NOTIFIER_BATTERY_HEALTH,
37         DEVICE_NOTIFIER_BATTERY_PRESENT,
38         DEVICE_NOTIFIER_BATTERY_OVP,
39         DEVICE_NOTIFIER_BATTERY_CHARGING,
40         DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED,
41         DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED,
42         DEVICE_NOTIFIER_DISPLAY_AMBIENT_CONDITION,
43         DEVICE_NOTIFIER_DISPLAY_AMBIENT_STATE,
44         DEVICE_NOTIFIER_DISPLAY_LOCK,
45         DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM,
46         DEVICE_NOTIFIER_POWEROFF_TRIGGERED,
47         DEVICE_NOTIFIER_POWEROFF,
48         DEVICE_NOTIFIER_APPLICATION_BACKGROUND,
49         DEVICE_NOTIFIER_APPLICATION_FOREGROUND,
50         DEVICE_NOTIFIER_APPLICATION_TERMINATED,
51         DEVICE_NOTIFIER_USB_DEBUG_MODE,
52         DEVICE_NOTIFIER_USB_TETHERING_MODE,
53         DEVICE_NOTIFIER_EVENT_HANDLER,
54         DEVICE_NOTIFIER_CPU_BOOST_LOWBAT,
55         DEVICE_NOTIFIER_CPU_BOOST_POWEROFF,
56         /* Experimental for Specific device - contact to deviced owner */
57         DEVICE_NOTIFIER_PMQOS,
58         DEVICE_NOTIFIER_PMQOS_ULTRAPOWERSAVING,
59         DEVICE_NOTIFIER_PMQOS_POWERSAVING,
60         DEVICE_NOTIFIER_COOL_DOWN,
61         DEVICE_NOTIFIER_VITAL_STATE,
62         DEVICE_NOTIFIER_LONGKEY_RESTORE,
63         DEVICE_NOTIFIER_UPSM,
64         DEVICE_NOTIFIER_UPSM_OFF,
65         DEVICE_NOTIFIER_BEZEL_WAKEUP,
66         DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS,
67         DEVICE_NOTIFIER_ULTRAPOWERSAVING,
68         DEVICE_NOTIFIER_KEY_PRESS,
69         DEVICE_NOTIFIER_KEY_RELEASE,
70         DEVICE_NOTIFIER_EVENT_ACQUIRE_WAKELOCK,
71         DEVICE_NOTIFIER_EVENT_RELEASE_WAKELOCK,
72
73         /* Purpose of calling methods of different modules
74          * Use prefix DEVICE_NOTIFIER_REQUEST */
75         DEVICE_NOTIFIER_REQUEST_TRANSITION_STATE,
76         DEVICE_NOTIFIER_MAX,
77 };
78
79 typedef enum _device_notifier_state {
80         DEVICE_NOTIFIER_STATE_STOP,
81         DEVICE_NOTIFIER_STATE_START,
82         DEVICE_NOTIFIER_STATE_CHANGED,
83         /* add more states here */
84 } device_notifier_state_e;
85
86 #endif /* __DEVICE_NOTIFIER_H__ */