Lines Matching refs:hook
47 * HookManager is consist of different hook stages
123 OhosHook hook;
134 if (hookItem->info.hook == compareVal->hook && hookItem->info.hookCookie == compareVal->hookCookie) {
140 // Add hook to stage list with prio ordered
141 static int addHookToStage(HOOK_STAGE *hookStage, int prio, OhosHook hook, void *hookCookie)
148 compareVal.hook = hook;
158 hookItem->info.hook = hook;
171 BEGET_CHECK(hookInfo->hook != NULL, return -1);
181 // Add hook to stage
182 return addHookToStage(stageItem, hookInfo->prio, hookInfo->hook, hookInfo->hookCookie);
185 int HookMgrAdd(HOOK_MGR *hookMgr, int stage, int prio, OhosHook hook)
190 info.hook = hook;
200 BEGET_CHECK((void *)hookItem->info.hook == cookie, return 0);
212 * hook为NULL,表示删除该stage上的所有hooks
214 void HookMgrDel(HOOK_MGR *hookMgr, int stage, OhosHook hook)
226 if (hook != NULL) {
227 OH_ListTraversal(&(stageItem->hooks), hook, hookTraversalDelProc, 0);
252 ret = hookItem->info.hook(&hookItem->info, args->executionContext);