You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by pg...@apache.org on 2005/12/28 16:28:29 UTC
svn commit: r359544 - in /httpd/apreq/trunk: include/apreq.h
module/apache2/apreq_module_apache2.h
Author: pgollucci
Date: Wed Dec 28 07:28:27 2005
New Revision: 359544
URL: http://svn.apache.org/viewcvs?rev=359544&view=rev
Log:
Add some more doxygen docs
approved: joes
Modified:
httpd/apreq/trunk/include/apreq.h
httpd/apreq/trunk/module/apache2/apreq_module_apache2.h
Modified: httpd/apreq/trunk/include/apreq.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/include/apreq.h?rev=359544&r1=359543&r2=359544&view=diff
==============================================================================
--- httpd/apreq/trunk/include/apreq.h (original)
+++ httpd/apreq/trunk/include/apreq.h Wed Dec 28 07:28:27 2005
@@ -37,8 +37,38 @@
*/
#ifndef WIN32
+/**
+ * The public APREQ functions are declared with APREQ_DECLARE(), so they may
+ * use the most appropriate calling convention. Public APR functions with
+ * variable arguments must use APR_DECLARE_NONSTD().
+ *
+ * @remark Both the declaration and implementations must use the same macro.
+ * @example
+ */
+/** APREQ_DECLARE(rettype) apeq_func(args)
+ */
#define APREQ_DECLARE(d) APR_DECLARE(d)
+/**
+ * The public APEQ functions using variable arguments are declared with
+ * APEQ_DECLARE_NONSTD(), as they must follow the C language calling convention.
+ * @see APEQ_DECLARE @see APEQ_DECLARE_DATA
+ * @remark Both the declaration and implementations must use the same macro.
+ * @example
+ */
+/** APEQ_DECLARE_NONSTD(rettype) apr_func(args, ...);
+ */
#define APREQ_DECLARE_NONSTD(d) APR_DECLARE_NONSTD(d)
+/**
+ * The public APREQ variables are declared with APREQ_DECLARE_DATA.
+ * This assures the appropriate indirection is invoked at compile time.
+ * @see APREQ_DECLARE @see APREQ_DECLARE_NONSTD
+ * @remark Note that the declaration and implementations use different forms,
+ * but both must include the macro.
+ * @example
+ */
+/** extern APREQ_DECLARE_DATA type apr_variable;\n
+ * APREQ_DECLARE_DATA type apr_variable = value;
+ */
#define APREQ_DECLARE_DATA
#else
#define APREQ_DECLARE(type) __declspec(dllexport) type __stdcall
@@ -46,31 +76,109 @@
#define APREQ_DECLARE_DATA __declspec(dllexport)
#endif
+/**
+ * Read chucks of data in 64k blocks from the request
+ */
+
#define APREQ_DEFAULT_READ_BLOCK_SIZE (64 * 1024)
+
+/**
+ * Maximum number of bytes mod_apreq2 will send off to libapreq2 for parsing.
+ * mod_apreq2 will log this event and subsequently remove itself
+ * from the filter chain.
+ * @see ap_set_read_limit
+ */
#define APREQ_DEFAULT_READ_LIMIT (64 * 1024 * 1024)
+/**
+ * Maximum number of bytes mod_apreq2 will let accumulate within the
+ * heap-buckets in a brigade. Excess data will be spooled to an
+ * appended file bucket
+ * @see ap_set_brigade_read_limit
+ */
#define APREQ_DEFAULT_BRIGADE_LIMIT (256 * 1024)
+
+/**
+ * Number of elements in the initial apr_table
+ * @see apr_table_make
+ */
#define APREQ_DEFAULT_NELTS 8
+/**
+ * Check to see if specified bit f is off in bitfiled name
+ */
#define APREQ_FLAGS_OFF(f, name) ((f) &= ~(name##_MASK << name##_BIT))
+/**
+ * Check to see if specified bit f is on in bitfiled name
+ */
#define APREQ_FLAGS_ON(f, name) ((f) |= (name##_MASK << name##_BIT))
+/**
+ * Get specified bit f in bitfiled name
+ */
#define APREQ_FLAGS_GET(f, name) (((f) >> name##_BIT) & name##_MASK)
+/**
+ * Set specified bit f in bitfiled name to value
+ * Note the below BIT/Mask defines are used sans the
+ * _BIT, _MASK because of the this define's ##_MASK, ##_BIT usage.
+ * Each come in a pair
+ */
#define APREQ_FLAGS_SET(f, name, value) \
((f) = (((f) & ~(name##_MASK << name##_BIT)) \
| ((name##_MASK & (value)) << name##_BIT)))
-
+/**
+ * Charset Bit
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_CHARSET_BIT 0
+
+/**
+ * Charset Mask
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_CHARSET_MASK 255
+/**
+ * Tainted Bit
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_TAINTED_BIT 8
+/**
+ * Tainted Mask
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_TAINTED_MASK 1
+/**
+ * Cookier Version Bit
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
+
#define APREQ_COOKIE_VERSION_BIT 11
+/**
+ * Cookie Version Mask
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_COOKIE_VERSION_MASK 3
+/**
+ * Cookie's Secure Bit
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_COOKIE_SECURE_BIT 13
+/**
+ * Cookie's Secure Mask
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_COOKIE_SECURE_MASK 1
/** Character encodings. */
@@ -111,10 +219,22 @@
char data[1]; /**< value data */
} apreq_value_t;
+/**
+ * Adds the specified apreq_value_t to the apr_table_t.
+ *
+ * @param v value to add
+ * @param t add v to this table
+ *
+ * @return void
+ *
+ * @ see apr_table_t @see apr_value_t
+ */
+
static APR_INLINE
void apreq_value_table_add(const apreq_value_t *v, apr_table_t *t) {
apr_table_addn(t, v->name, v->data);
}
+
#define apreq_attr_to_type(T,A,P) ( (T*) ((char*)(P)-offsetof(T,A)) )
Modified: httpd/apreq/trunk/module/apache2/apreq_module_apache2.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/module/apache2/apreq_module_apache2.h?rev=359544&r1=359543&r2=359544&view=diff
==============================================================================
--- httpd/apreq/trunk/module/apache2/apreq_module_apache2.h (original)
+++ httpd/apreq/trunk/module/apache2/apreq_module_apache2.h Wed Dec 28 07:28:27 2005
@@ -139,7 +139,24 @@
*/
APREQ_DECLARE(apreq_handle_t *) apreq_handle_apache2(request_rec *r);
+/**
+ * The mod_apreq2 filter is named "apreq2", and may be used in Apache's
+ * input filter directives, e.g.
+ * @code
+ *
+ * AddInputFilter apreq2 # or
+ * SetInputFilter apreq2
+ * @endcode
+ * See above
+ */
#define APREQ_FILTER_NAME "apreq2"
+
+/**
+ * The Apache2 Module Magic Number for use in the Apache 2.x module structures
+ * This gets bumped if changes in th4e API will break third party applications
+ * using this apache2 module
+ * @see APREQ_MODULE
+ */
#define APREQ_APACHE2_MMN 20050712
/** @} */