• Home
  • Raw
  • Download

Lines Matching refs:hookMgr

59 static HOOK_MGR *getHookMgr(HOOK_MGR *hookMgr, int autoCreate)  in getHookMgr()  argument
61 BEGET_CHECK(hookMgr == NULL, return hookMgr); in getHookMgr()
93 static HOOK_STAGE *getHookStage(HOOK_MGR *hookMgr, int stage, int createIfNotFound) in getHookStage() argument
97 stageItem = (HOOK_STAGE *)OH_ListFind(&(hookMgr->stages), (void *)(&stage), hookStageCompare); in getHookStage()
107 OH_ListAddTail(&(hookMgr->stages), (ListNode *)stageItem); in getHookStage()
167 int HookMgrAddEx(HOOK_MGR *hookMgr, const HOOK_INFO *hookInfo) in HookMgrAddEx() argument
174 hookMgr = getHookMgr(hookMgr, true); in HookMgrAddEx()
175 BEGET_CHECK(hookMgr != NULL, return -1); in HookMgrAddEx()
178 stageItem = getHookStage(hookMgr, hookInfo->stage, true); in HookMgrAddEx()
185 int HookMgrAdd(HOOK_MGR *hookMgr, int stage, int prio, OhosHook hook) in HookMgrAdd() argument
192 return HookMgrAddEx(hookMgr, &info); in HookMgrAdd()
214 void HookMgrDel(HOOK_MGR *hookMgr, int stage, OhosHook hook) in HookMgrDel() argument
219 hookMgr = getHookMgr(hookMgr, 0); in HookMgrDel()
220 BEGET_CHECK(hookMgr != NULL, return); in HookMgrDel()
223 stageItem = getHookStage(hookMgr, stage, false); in HookMgrDel()
263 int HookMgrExecute(HOOK_MGR *hookMgr, int stage, void *executionContext, const HOOK_EXEC_OPTIONS *o… in HookMgrExecute() argument
270 hookMgr = getHookMgr(hookMgr, 0); in HookMgrExecute()
271 BEGET_CHECK(hookMgr != NULL, return -1) in HookMgrExecute()
274 stageItem = getHookStage(hookMgr, stage, false); in HookMgrExecute()
306 void HookMgrDestroy(HOOK_MGR *hookMgr) in HookMgrDestroy() argument
308 hookMgr = getHookMgr(hookMgr, 0); in HookMgrDestroy()
309 BEGET_CHECK(hookMgr != NULL, return); in HookMgrDestroy()
311 OH_ListRemoveAll(&(hookMgr->stages), hookStageDestroy); in HookMgrDestroy()
313 if (hookMgr == defaultHookMgr) { in HookMgrDestroy()
316 if (hookMgr->name != NULL) { in HookMgrDestroy()
317 free((void *)hookMgr->name); in HookMgrDestroy()
319 free((void *)hookMgr); in HookMgrDestroy()
349 void HookMgrTraversal(HOOK_MGR *hookMgr, void *traversalCookie, OhosHookTraversal traversal) in HookMgrTraversal() argument
355 hookMgr = getHookMgr(hookMgr, 0); in HookMgrTraversal()
356 BEGET_CHECK(hookMgr != NULL, return); in HookMgrTraversal()
361 OH_ListTraversal(&(hookMgr->stages), (void *)(&stageArgs), hookStageTraversal, 0); in HookMgrTraversal()
367 int HookMgrGetHooksCnt(HOOK_MGR *hookMgr, int stage) in HookMgrGetHooksCnt() argument
371 hookMgr = getHookMgr(hookMgr, 0); in HookMgrGetHooksCnt()
372 BEGET_CHECK(hookMgr != NULL, return 0); in HookMgrGetHooksCnt()
375 stageItem = getHookStage(hookMgr, stage, false); in HookMgrGetHooksCnt()
384 int HookMgrGetStagesCnt(HOOK_MGR *hookMgr) in HookMgrGetStagesCnt() argument
386 hookMgr = getHookMgr(hookMgr, 0); in HookMgrGetStagesCnt()
387 BEGET_CHECK(hookMgr != NULL, return 0); in HookMgrGetStagesCnt()
389 return OH_ListGetCnt(&(hookMgr->stages)); in HookMgrGetStagesCnt()