4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #ifndef __NOTIFIER_H__
22 #define __NOTIFIER_H__
26 #endif /* __cplusplus */
32 RESOURCED_NOTIFIER_APP_LAUNCH,
33 RESOURCED_NOTIFIER_APP_RESUME,
34 RESOURCED_NOTIFIER_APP_FOREGRD,
35 RESOURCED_NOTIFIER_APP_BACKGRD,
36 RESOURCED_NOTIFIER_APP_BACKGRD_ACTIVE,
37 RESOURCED_NOTIFIER_APP_ACTIVE,
38 RESOURCED_NOTIFIER_APP_INACTIVE,
39 RESOURCED_NOTIFIER_APP_PRELAUNCH,
40 RESOURCED_NOTIFIER_APP_ANR,
42 * start terminating application
44 RESOURCED_NOTIFIER_APP_TERMINATE_START,
46 * finished application termination
48 RESOURCED_NOTIFIER_APP_TERMINATED,
51 * suspend background application
53 RESOURCED_NOTIFIER_APP_WAKEUP,
54 RESOURCED_NOTIFIER_APP_SUSPEND_READY,
55 RESOURCED_NOTIFIER_APP_SUSPEND,
58 * group some applications
60 RESOURCED_NOTIFIER_APP_GROUP,
65 RESOURCED_NOTIFIER_SERVICE_LAUNCH,
66 RESOURCED_NOTIFIER_SERVICE_WAKEUP,
71 RESOURCED_NOTIFIER_WIDGET_FOREGRD,
72 RESOURCED_NOTIFIER_WIDGET_BACKGRD,
75 * control resourced module
77 RESOURCED_NOTIFIER_FREEZER_CGROUP_STATE,
78 RESOURCED_NOTIFIER_SWAP_START,
79 RESOURCED_NOTIFIER_SWAP_UNSET_LIMIT,
80 RESOURCED_NOTIFIER_SWAP_ACTIVATE,
81 RESOURCED_NOTIFIER_SWAP_COMPACT,
82 RESOURCED_NOTIFIER_LOGGING_START,
83 RESOURCED_NOTIFIER_LOGGING_WRITE,
84 RESOURCED_NOTIFIER_DATA_UPDATE,
85 RESOURCED_NOTIFIER_DATA_RESET,
86 RESOURCED_NOTIFIER_CONTROL_EXCLUDE,
87 RESOURCED_NOTIFIER_MEM_LEVEL_CHANGED,
88 RESOURCED_NOTIFIER_MEM_CONTROL,
89 RESOURCED_NOTIFIER_LIMIT_APP,
90 RESOURCED_NOTIFIER_THROTTLING_RESOURCE,
91 RESOURCED_NOTIFIER_BOOSTING_RESOURCE,
94 * control system service (*.service)
96 RESOURCED_NOTIFIER_SYSTEM_SERVICE,
97 RESOURCED_NOTIFIER_LIMIT_SYSTEM_SERVICE,
102 * real time scheduler
104 // RESOURCED_NOTIFIER_RT_SCHEDULER,
107 * receive external event
109 RESOURCED_NOTIFIER_BOOTING_DONE,
110 RESOURCED_NOTIFIER_POWER_OFF,
111 RESOURCED_NOTIFIER_SYSTEMTIME_CHANGED,
112 RESOURCED_NOTIFIER_LOW_BATTERY,
113 RESOURCED_NOTIFIER_CPU_ON,
114 RESOURCED_NOTIFIER_CPU_OFF,
115 RESOURCED_NOTIFIER_LCD_ON,
116 RESOURCED_NOTIFIER_LCD_OFF,
118 RESOURCED_NOTIFIER_DEDUP_START,
119 RESOURCED_NOTIFIER_DEDUP_SCAN,
120 RESOURCED_NOTIFIER_DEDUP_STOP,
122 RESOURCED_NOTIFIER_MAX,
126 * This is for internal callback method.
128 int register_notifier(enum notifier_type status, int (*func)(void *data));
129 int unregister_notifier(enum notifier_type status, int (*func)(void *data));
130 void resourced_notify(enum notifier_type status, void *value);
134 #endif /* __cplusplus */
136 #endif /* __NOTIFIER_H__ */