]> granicus.if.org Git - apache/commitdiff
This solves two issues, one is a backref from apr-util into the
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 6 Dec 2000 05:59:50 +0000 (05:59 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 6 Dec 2000 05:59:50 +0000 (05:59 +0000)
  apache namespace, and the second is the proper linkage declarations
  and their explanations.  Documented the distinction between
  AP_IMPLEMENT_HOOK_ and AP_IMPLEMENT_EXPORT_HOOK_

  This doesn't resolve any export issues within apr-util, however.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87229 13f79535-47bb-0310-9956-ffa450edef68

include/ap_config.h

index 1d7df4cb3056ee02d0d6945c66b0dbd0957941d9..e5f4e0ad7e700255145e5d2d186729388571d5f4 100644 (file)
@@ -57,6 +57,7 @@
 
 #include "ap_mmn.h"            /* MODULE_MAGIC_NUMBER_ */
 #include "apr_lib.h"           /* apr_isfoo() macros */
+#include "ap_hooks.h"
 
 /**
  * AP_DECLARE_EXPORT is defined when building the Apache Core dynamic
  */
 #define MODULE_VAR_EXPORT    AP_MODULE_DECLARE_DATA
 
+#define AP_DECLARE_HOOK(ret,name,args) \
+AP_DECLARE_EXTERNAL_HOOK(AP,ret,name,args)
+
+#define AP_IMPLEMENT_HOOK_BASE(name) \
+AP_IMPLEMENT_EXTERNAL_HOOK_BASE(AP,name)
+
+/**
+ * Implement an Apache core hook that has no return code, and therefore 
+ * runs all of the registered functions
+ * @param name The name of the hook
+ * @param args_decl The declaration of the arguments for the hook
+ * @param args_used The names for the arguments for the hook
+ * @deffunc void AP_IMPLEMENT_HOOK_VOID(name, args_decl, args_use)
+ * @tip If IMPLEMENTing a hook that is not linked into the Apache core,
+ * (e.g. within a dso) see AP_IMPLEMENT_EXTERNAL_HOOK_HOOK_VOID.
+ */
+#define AP_IMPLEMENT_HOOK_VOID(name,args_decl,args_use) \
+AP_IMPLEMENT_EXTERNAL_HOOK_VOID(AP,name,args_decl,args_use)
+
+/**
+ * Implement an Apache core hook that runs until one of the functions 
+ * returns something other than OK or DECLINE
+ * @param name The name of the hook
+ * @param args_decl The declaration of the arguments for the hook
+ * @param args_used The names for the arguments for the hook
+ * @deffunc int AP_IMPLEMENT_HOOK_RUN_ALL(name, args_decl, args_use)
+ * @tip If IMPLEMENTing a hook that is not linked into the Apache core,
+ * (e.g. within a dso) see AP_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL.
+ */
+#define AP_IMPLEMENT_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok,decline) \
+AP_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(AP,ret,name,args_decl,args_use,ok,decline)
+
+/**
+ * Implement a hook that runs until the first function returns something
+ * other than DECLINE
+ * @param name The name of the hook
+ * @param args_decl The declaration of the arguments for the hook
+ * @param args_used The names for the arguments for the hook
+ * @deffunc int AP_IMPLEMENT_HOOK_RUN_FIRST(name, args_decl, args_use)
+ * @tip If IMPLEMENTing a hook that is not linked into the Apache core
+ * (e.g. within a dso) see AP_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST.
+ */
+#define AP_IMPLEMENT_HOOK_RUN_FIRST(ret,name,args_decl,args_use,decline) \
+AP_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(AP,ret,name,args_decl,args_use,decline)
+
 #ifdef WIN32
 #include "os.h"
 #else