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,
43 * FIXME: It is temporary notifier to update cpu affinity for
44 * background app with fixed oom score.
46 RESOURCED_NOTIFIER_APP_BACKGRD_WITH_FIXED_OOM_SCORE,
48 * start terminating application
50 RESOURCED_NOTIFIER_APP_TERMINATE_START,
52 * finished application termination
54 RESOURCED_NOTIFIER_APP_TERMINATED,
57 * suspend background application
59 RESOURCED_NOTIFIER_APP_WAKEUP,
60 RESOURCED_NOTIFIER_APP_SUSPEND_READY,
61 RESOURCED_NOTIFIER_APP_SUSPEND,
64 * group some applications
66 RESOURCED_NOTIFIER_APP_GROUP,
71 RESOURCED_NOTIFIER_SERVICE_LAUNCH,
72 RESOURCED_NOTIFIER_SERVICE_WAKEUP,
77 RESOURCED_NOTIFIER_WIDGET_FOREGRD,
78 RESOURCED_NOTIFIER_WIDGET_BACKGRD,
81 * control resourced module
83 RESOURCED_NOTIFIER_FREEZER_CGROUP_STATE,
84 RESOURCED_NOTIFIER_SWAP_START,
85 RESOURCED_NOTIFIER_SWAP_UNSET_LIMIT,
86 RESOURCED_NOTIFIER_SWAP_ACTIVATE,
87 RESOURCED_NOTIFIER_SWAP_COMPACT,
88 RESOURCED_NOTIFIER_LOGGING_START,
89 RESOURCED_NOTIFIER_LOGGING_WRITE,
90 RESOURCED_NOTIFIER_DATA_UPDATE,
91 RESOURCED_NOTIFIER_DATA_RESET,
92 RESOURCED_NOTIFIER_CONTROL_EXCLUDE,
93 RESOURCED_NOTIFIER_MEM_LEVEL_CHANGED,
94 RESOURCED_NOTIFIER_MEM_CONTROL,
95 RESOURCED_NOTIFIER_LIMIT_APP,
96 RESOURCED_NOTIFIER_THROTTLING_RESOURCE,
97 RESOURCED_NOTIFIER_BOOSTING_RESOURCE,
100 * control system service (*.service)
102 RESOURCED_NOTIFIER_SYSTEM_SERVICE,
103 RESOURCED_NOTIFIER_LIMIT_SYSTEM_SERVICE,
108 * real time scheduler
110 // RESOURCED_NOTIFIER_RT_SCHEDULER,
113 * receive external event
115 RESOURCED_NOTIFIER_BOOTING_DONE,
116 RESOURCED_NOTIFIER_POWER_OFF,
117 RESOURCED_NOTIFIER_SYSTEMTIME_CHANGED,
118 RESOURCED_NOTIFIER_LOW_BATTERY,
119 RESOURCED_NOTIFIER_CPU_ON,
120 RESOURCED_NOTIFIER_CPU_OFF,
121 RESOURCED_NOTIFIER_LCD_ON,
122 RESOURCED_NOTIFIER_LCD_OFF,
124 RESOURCED_NOTIFIER_DEDUP_START,
125 RESOURCED_NOTIFIER_DEDUP_SCAN,
126 RESOURCED_NOTIFIER_DEDUP_STOP,
128 RESOURCED_NOTIFIER_MAX,
132 * This is for internal callback method.
134 int register_notifier(enum notifier_type status, int (*func)(void *data));
135 int unregister_notifier(enum notifier_type status, int (*func)(void *data));
136 void resourced_notify(enum notifier_type status, void *value);
140 #endif /* __cplusplus */
142 #endif /* __NOTIFIER_H__ */