Main Page | Modules | Namespace List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

ap_config.h File Reference

Symbol export macros and hook functions. More...

#include "apr.h"
#include "apr_hooks.h"
#include "apr_optional_hooks.h"
#include "os.h"
#include "ap_config_auto.h"
#include "ap_config_layout.h"

Go to the source code of this file.

Defines

#define AP_DECLARE(type)   type
#define AP_DECLARE_NONSTD(type)   type
#define AP_DECLARE_DATA
#define AP_MODULE_DECLARE(type)   type
#define AP_MODULE_DECLARE_NONSTD(type)   type
#define AP_MODULE_DECLARE_DATA
#define AP_DECLARE_HOOK(ret, name, args)   APR_DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
#define AP_IMPLEMENT_HOOK_BASE(name)   APR_IMPLEMENT_EXTERNAL_HOOK_BASE(ap,AP,name)
#define AP_IMPLEMENT_HOOK_VOID(name, args_decl, args_use)   APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ap,AP,name,args_decl,args_use)
#define AP_IMPLEMENT_HOOK_RUN_ALL(ret, name, args_decl, args_use, ok, decline)
#define AP_IMPLEMENT_HOOK_RUN_FIRST(ret, name, args_decl, args_use, decline)
#define AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ret, name, args_decl, args_use, ok, decline)
#define AP_OPTIONAL_HOOK(name, fn, pre, succ, order)   APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)


Detailed Description

Symbol export macros and hook functions.

Definition in file ap_config.h.


Define Documentation

#define AP_DECLARE type   )     type
 

Apache Core dso functions are declared with AP_DECLARE(), so they may use the most appropriate calling convention. Hook functions and other Core functions with variable arguments must use AP_DECLARE_NONSTD().

 AP_DECLARE(rettype) ap_func(args)

Definition at line 69 of file ap_config.h.

#define AP_DECLARE_DATA
 

Apache Core dso variables are declared with AP_MODULE_DECLARE_DATA. This assures the appropriate indirection is invoked at compile time.

Note:
AP_DECLARE_DATA extern type apr_variable; syntax is required for declarations within headers to properly import the variable.
 AP_DECLARE_DATA type apr_variable

Definition at line 91 of file ap_config.h.

#define AP_DECLARE_HOOK ret,
name,
args   )     APR_DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
 

Declare a hook function

Parameters:
ret The return type of the hook
name The hook's name (as a literal)
args The arguments the hook function takes, in brackets.

Definition at line 144 of file ap_config.h.

#define AP_DECLARE_NONSTD type   )     type
 

Apache Core dso variable argument and hook functions are declared with AP_DECLARE_NONSTD(), as they must use the C language calling convention.

See also:
AP_DECLARE
 AP_DECLARE_NONSTD(rettype) ap_func(args [...])

Definition at line 79 of file ap_config.h.

#define AP_IMPLEMENT_HOOK_BASE name   )     APR_IMPLEMENT_EXTERNAL_HOOK_BASE(ap,AP,name)
 

For internal use only.

Definition at line 148 of file ap_config.h.

#define AP_IMPLEMENT_HOOK_RUN_ALL ret,
name,
args_decl,
args_use,
ok,
decline   ) 
 

Value:

APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
                                            args_use,ok,decline)
Implement an Apache core hook that runs until one of the functions returns something other than ok or decline. That return value is then returned from the hook runner. If the hooks run to completion, then ok is returned. Note that if no hook runs it would probably be more correct to return decline, but this currently does not do so. The implementation is called ap_run_name.

Parameters:
ret The return type of the hook (and the hook runner)
name The name of the hook
args_decl The declaration of the arguments for the hook, for example "(int x,void *y)"
args_use The arguments for the hook as used in a call, for example "(x,y)"
ok The "ok" return value
decline The "decline" return value
Returns:
ok, decline or an error.
Note:
If IMPLEMENTing a hook that is not linked into the Apache core, (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL.

Definition at line 187 of file ap_config.h.

#define AP_IMPLEMENT_HOOK_RUN_FIRST ret,
name,
args_decl,
args_use,
decline   ) 
 

Value:

APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ap,AP,ret,name,args_decl, \
                                              args_use,decline)
Implement a hook that runs until a function returns something other than decline. If all functions return decline, the hook runner returns decline. The implementation is called ap_run_name.

Parameters:
ret The return type of the hook (and the hook runner)
name The name of the hook
args_decl The declaration of the arguments for the hook, for example "(int x,void *y)"
args_use The arguments for the hook as used in a call, for example "(x,y)"
decline The "decline" return value
Returns:
decline or an error.
Note:
If IMPLEMENTing a hook that is not linked into the Apache core (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST.

Definition at line 207 of file ap_config.h.

#define AP_IMPLEMENT_HOOK_VOID name,
args_decl,
args_use   )     APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ap,AP,name,args_decl,args_use)
 

Implement an Apache core hook that has no return code, and therefore runs all of the registered functions. The implementation is called ap_run_name.

Parameters:
name The name of the hook
args_decl The declaration of the arguments for the hook, for example "(int x,void *y)"
args_use The arguments for the hook as used in a call, for example "(x,y)"
Note:
If IMPLEMENTing a hook that is not linked into the Apache core, (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_VOID.

Definition at line 164 of file ap_config.h.

#define AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL ret,
name,
args_decl,
args_use,
ok,
decline   ) 
 

Value:

APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
                                            args_use,ok,decline)
Implement an optional hook. This is exactly the same as a standard hook implementation, except the hook is optional.
See also:
AP_IMPLEMENT_HOOK_RUN_ALL

Definition at line 221 of file ap_config.h.

#define AP_MODULE_DECLARE type   )     type
 

Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA.

Unless AP_MODULE_DECLARE_STATIC is defined at compile time, symbols declared with AP_MODULE_DECLARE_DATA are always exported.

Definition at line 120 of file ap_config.h.

#define AP_MODULE_DECLARE_DATA
 

Definition at line 123 of file ap_config.h.

#define AP_MODULE_DECLARE_NONSTD type   )     type
 

Definition at line 122 of file ap_config.h.

#define AP_OPTIONAL_HOOK name,
fn,
pre,
succ,
order   )     APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)
 

Hook an optional hook. Unlike static hooks, this uses a macro instead of a function.

Definition at line 229 of file ap_config.h.

Referenced by ImportRegisterHooks().


© sourcejam.com 2005-2008