tizen 2.4 release
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / kernel / swap / us_manager / callbacks.h
1 #ifndef __CALLBACKS_H__
2 #define __CALLBACKS_H__
3
4 enum callback_t {
5         START_CB = 0,
6         STOP_CB,
7         STOP_CB_TD
8 };
9
10 /* Gets callback type (on start or on stop) and function pointer.
11  * Returns positive callback's handle that is used to unregister on success,
12  * negative error code otherwise.
13  * Exported function. */
14 int us_manager_reg_cb(enum callback_t cbt, void (*func)(void));
15
16 /* Gets handle and unregisters function with this handle.
17  * Exported function. */
18 void us_manager_unreg_cb(int handle);
19
20 /* Used to execute callbacks when start/stop is occuring. */
21 void exec_cbs(enum callback_t cbt);
22
23 /* Removes all callbacks */
24 void remove_all_cbs(void);
25
26 #endif /* __CALLBACKS_H__ */