Apache HTTPD
Macros | Functions | Variables
Optional Hook Functions

Macros

#define APR_OPTIONAL_HOOK(ns, name, pfn, aszPre, aszSucc, nOrder)
 
#define APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ns, link, ret, name, args_decl, args_use, ok, decline)
 

Functions

 APU_DECLARE (void) apr_optional_hook_add(const char *szName
 
 APU_DECLARE (apr_array_header_t *) apr_optional_hook_get(const char *szName)
 

Variables

void(* pfn )(void)
 
void(*) const char *const aszPre )
 
void(*) const char *const const char *const aszSucc )
 
void(*) const char *const const char *const in nOrder )
 

Detailed Description

Macro Definition Documentation

◆ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL

#define APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL (   ns,
  link,
  ret,
  name,
  args_decl,
  args_use,
  ok,
  decline 
)
Value:
{ \
int n; \
ret rv; \
return ok; \
\
pHook=(ns##_LINK_##name##_t *)pHookArray->elts; \
for(n=0 ; n < pHookArray->nelts ; ++n) \
{ \
rv=(pHook[n].pFunc)args_use; \
if(rv != ok && rv != decline) \
return rv; \
} \
return ok; \
}
int n
Definition ap_regex.h:278
apr_size_t size
char * name
#define ns(x)
Definition xmltok.c:1644

Implement an optional hook that runs until one of the functions returns something other than OK or DECLINE.

Parameters
nsThe namespace prefix of the hook functions
linkThe linkage declaration prefix of the hook
retThe type of the return value of the hook
retThe type of the return value of the hook
nameThe name of the hook
args_declThe declaration of the arguments for the hook
args_useThe names for the arguments for the hook
okSuccess value
declineDecline value

Definition at line 90 of file apr_optional_hooks.h.

◆ APR_OPTIONAL_HOOK

#define APR_OPTIONAL_HOOK (   ns,
  name,
  pfn,
  aszPre,
  aszSucc,
  nOrder 
)
Value:
do { \
} while (0)
void(*) const char *const aszPre)
void(*) const char *const const char *const aszSucc)
void(*) const char *const const char *const in nOrder)
void(* pfn)(void)

Hook to an optional hook.

Parameters
nsThe namespace prefix of the hook functions
nameThe name of the hook
pfnA pointer to a function that will be called
aszPrea NULL-terminated array of strings that name modules whose hooks should precede this one
aszSucca NULL-terminated array of strings that name modules whose hooks should succeed this one
nOrderan integer determining order before honouring aszPre and aszSucc (for example HOOK_MIDDLE)

Definition at line 64 of file apr_optional_hooks.h.

Function Documentation

◆ APU_DECLARE() [1/2]

APU_DECLARE ( apr_array_header_t ) const

◆ APU_DECLARE() [2/2]

APU_DECLARE ( void  ) const

Function to implement the APR_OPTIONAL_HOOK Macro

Variable Documentation

◆ aszPre

void(*) const char* const aszPre)

Definition at line 49 of file apr_optional_hooks.h.

◆ aszSucc

void(*) const char* const const char* const aszSucc)

Definition at line 50 of file apr_optional_hooks.h.

◆ nOrder

void(*) const char* const const char* const in nOrder)

Definition at line 51 of file apr_optional_hooks.h.

◆ pfn

void(* pfn) (void) ( void  )

Definition at line 48 of file apr_optional_hooks.h.