Modified: httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__param_8h.html URL: http://svn.apache.org/viewcvs/httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__param_8h.html?rev=377002&r1=377001&r2=377002&view=diff ============================================================================== --- httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__param_8h.html (original) +++ httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__param_8h.html Sat Feb 11 08:52:42 2006 @@ -1,7 +1,7 @@ - libapreq2-2.06-dev: libapreq2: include/apreq_param.h File Reference + libapreq2-2.07: libapreq2: include/apreq_param.h File Reference - -
Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages
- -

apreq_param.h File Reference

Request parsing and parameter API. More... + +
+
+
+
+

include/apreq_param.h File Reference

Request parsing and parameter API. More...

#include "apreq.h"
#include "apr_buckets.h"
@@ -25,74 +36,47 @@

Data Structures

struct  apreq_param_t -

Typedefs

-typedef apreq_param_t apreq_param_t -

Functions

-static APR_INLINE unsigned apreq_param_is_tainted (const apreq_param_t *p) +static APR_INLINE unsigned apreq_param_is_tainted (const apreq_param_t *p) -static APR_INLINE void apreq_param_tainted_on (apreq_param_t *p) +static APR_INLINE void apreq_param_tainted_on (apreq_param_t *p) -static APR_INLINE void apreq_param_tainted_off (apreq_param_t *p) +static APR_INLINE void apreq_param_tainted_off (apreq_param_t *p) -static APR_INLINE apreq_charset_t apreq_param_charset_set (apreq_param_t *p, unsigned char c) +static APR_INLINE apreq_charset_t apreq_param_charset_set (apreq_param_t *p, apreq_charset_t c) -static APR_INLINE apreq_charset_t apreq_param_charset_get (apreq_param_t *p) +static APR_INLINE apreq_charset_t apreq_param_charset_get (apreq_param_t *p) -static APR_INLINE apreq_param_tapreq_value_to_param (const char *val) +static APR_INLINE apreq_param_tapreq_value_to_param (const char *val) -apreq_param_tapreq_param_make (apr_pool_t *p, const char *name, const apr_size_t nlen, const char *val, const apr_size_t vlen) +apreq_param_tapreq_param_make (apr_pool_t *p, const char *name, const apr_size_t nlen, const char *val, const apr_size_t vlen) -apr_status_t apreq_param_decode (apreq_param_t **param, apr_pool_t *pool, const char *word, apr_size_t nlen, apr_size_t vlen) +apr_status_t apreq_param_decode (apreq_param_t **param, apr_pool_t *pool, const char *word, apr_size_t nlen, apr_size_t vlen) -char * apreq_param_encode (apr_pool_t *pool, const apreq_param_t *param) +char * apreq_param_encode (apr_pool_t *pool, const apreq_param_t *param) -apr_status_t apreq_parse_query_string (apr_pool_t *pool, apr_table_t *t, const char *qs) +apr_status_t apreq_parse_query_string (apr_pool_t *pool, apr_table_t *t, const char *qs) -apr_array_header_tapreq_params_as_array (apr_pool_t *p, const apr_table_t *t, const char *key) +apr_array_header_tapreq_params_as_array (apr_pool_t *p, const apr_table_t *t, const char *key) -const char * apreq_params_as_string (apr_pool_t *p, const apr_table_t *t, const char *key, apreq_join_t mode) +const char * apreq_params_as_string (apr_pool_t *p, const apr_table_t *t, const char *key, apreq_join_t mode) -const apr_table_tapreq_uploads (const apr_table_t *body, apr_pool_t *pool) +const apr_table_tapreq_uploads (const apr_table_t *body, apr_pool_t *pool) -const apreq_param_tapreq_upload (const apr_table_t *body, const char *name) +const apreq_param_tapreq_upload (const apr_table_t *body, const char *name)

Detailed Description

Request parsing and parameter API.

-


Typedef Documentation

-

- - - - -
- - - - -
typedef struct apreq_param_t apreq_param_t
-
- - - - - -
-   - - -

-Common data structure for params and file uploads


Function Documentation

-

+

- + @@ -114,13 +98,13 @@ Gets the character encoding for this parameter.
static APR_INLINE apreq_charset_t apreq_param_charset_get static APR_INLINE apreq_charset_t apreq_param_charset_get apreq_param_t p
-

+

- + @@ -128,7 +112,7 @@ - + @@ -151,13 +135,13 @@ Sets the character encoding for this parameter.
static APR_INLINE apreq_charset_t apreq_param_charset_set static APR_INLINE apreq_charset_t apreq_param_charset_set apreq_param_t p,
unsigned char apreq_charset_t  c
-

+

- + @@ -165,7 +149,7 @@ - + @@ -177,13 +161,13 @@ - + - + @@ -214,12 +198,12 @@
apr_status_t apreq_param_decode apr_status_t apreq_param_decode apreq_param_t **  param,
apr_pool_tapr_pool_t pool,
apr_size_t apr_size_t  nlen,
apr_size_t apr_size_t  vlen
Returns:
APR_SUCCESS + apreq_charset_t (<=APREQ_CHARSET_UTF8) on success.

-APREQ_ERROR_BADSEQ or APREQ_ERROR_BADCHAR on malformed input.

-
Remarks:
Unless vlen == 0, this function assumes there is exactly one character ('=') which separates the pair.
+APREQ_ERROR_BADSEQ or APREQ_ERROR_BADCHAR on malformed input. +
Remarks:
Unless vlen == 0, this function assumes there is exactly one character ('=') which separates the pair.
-

+

- + @@ -259,17 +243,17 @@
@@ -227,7 +211,7 @@
char* apreq_param_encode apr_pool_tapr_pool_t pool,
param Param to encode.
-

Returns:
name-value pair representing the param.
+
Returns:
name-value pair representing the param.
-

+

- + @@ -292,7 +276,7 @@
static APR_INLINE unsigned apreq_param_is_tainted static APR_INLINE unsigned apreq_param_is_tainted const apreq_param_t p
-

+

- + @@ -312,7 +296,7 @@ - + @@ -324,7 +308,7 @@ - + @@ -347,13 +331,13 @@ creates a param from name/value information
@@ -300,7 +284,7 @@
apreq_param_t* apreq_param_make apr_pool_tapr_pool_t p,
const apr_size_t const apr_size_t  nlen,
const apr_size_t const apr_size_t  vlen
-

+

- + @@ -375,13 +359,13 @@ Turns off the taint flag.
static APR_INLINE void apreq_param_tainted_off static APR_INLINE void apreq_param_tainted_off apreq_param_t p
-

+

- + @@ -403,7 +387,7 @@ Sets the tainted flag.
static APR_INLINE void apreq_param_tainted_on static APR_INLINE void apreq_param_tainted_on apreq_param_t p
-

+

- + - + @@ -446,16 +430,16 @@ Returns an array of parameters (apreq_param_t *) matching the given key. The key is case-insensitive.
Parameters:
@@ -411,13 +395,13 @@
apr_array_header_t* apreq_params_as_array apr_pool_tapr_pool_t p,
const apr_table_tconst apr_table_t t,
- +
p Allocates the returned array.
t the parameter table returned by apreq_args(), apreq_body() or apreq_params()
t the parameter table returned by apreq_args(), apreq_body() or apreq_params()
key Null-terminated search key, case insensitive. key==NULL fetches all parameters.

Returns:
an array of apreq_param_t* (pointers)
-
Remarks:
Also parses the request if necessary.
+
Remarks:
Also parses the request if necessary.
-

+

- + - + @@ -481,7 +465,7 @@ - + @@ -505,31 +489,31 @@
Parameters:
@@ -463,13 +447,13 @@
const char* apreq_params_as_string apr_pool_tapr_pool_t p,
const apr_table_tconst apr_table_t t,
apreq_join_t apreq_join_t  mode
- + - +
p Allocates the return string.
t the parameter table returned by apreq_args(), apreq_body() or apreq_params()
t the parameter table returned by apreq_args(), apreq_body() or apreq_params()
key Null-terminated parameter name, case insensitive. key==NULL fetches all values.
mode Join type- see apreq_join().
mode Join type- see apreq_join().

Returns:
the joined string or NULL on error
-
Remarks:
Also parses the request if necessary.
+
Remarks:
Also parses the request if necessary.
-

+

- + - + - + @@ -563,11 +547,11 @@
apr_status_t apreq_parse_query_string apr_status_t apreq_parse_query_string apr_pool_tapr_pool_t pool,
apr_table_tapr_table_t t,
Returns:
APR_SUCCESS if successful, error otherwise.
-
Remarks:
This function uses [&;] as the set of tokens to delineate words, and will treat a word w/o '=' as a name-value pair with value-length = 0.
+
Remarks:
This function uses [&;] as the set of tokens to delineate words, and will treat a word w/o '=' as a name-value pair with value-length = 0.
-

+

- + @@ -603,30 +587,30 @@

Returns the first param in req->body which has both param->v.name matching key (case insensitive) and param->upload != NULL.

Parameters:
@@ -575,7 +559,7 @@
const apreq_param_t* apreq_upload const apr_table_tconst apr_table_t body,
- +
body parameter table returned by apreq_body() or apreq_params()
body parameter table returned by apreq_body() or apreq_params()
name Parameter name. key == NULL returns first upload.

Returns:
Corresponding upload, NULL if none found.
-
Remarks:
Will parse the request as necessary.
+
Remarks:
Will parse the request as necessary.
-

+

- + - + - + @@ -648,22 +632,22 @@

Returns a table of all params in req->body with non-NULL upload brigades.

Parameters:
const apr_table_t* apreq_uploads const apr_table_t* apreq_uploads const apr_table_tconst apr_table_t body,
apr_pool_tapr_pool_t pool
- +
body parameter table returned by apreq_body() or apreq_params()
body parameter table returned by apreq_body() or apreq_params()
pool Pool which allocates the table struct.
Returns:
Upload table.
-
Remarks:
Will parse the request if necessary.
+
Remarks:
Will parse the request if necessary.
-

+

- + @@ -687,11 +671,11 @@
static APR_INLINE apreq_param_t* apreq_value_to_param static APR_INLINE apreq_param_t* apreq_value_to_param const char *  val
Modified: httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__parser_8h-source.html URL: http://svn.apache.org/viewcvs/httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__parser_8h-source.html?rev=377002&r1=377001&r2=377002&view=diff ============================================================================== --- httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__parser_8h-source.html (original) +++ httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__parser_8h-source.html Sat Feb 11 08:52:42 2006 @@ -1,7 +1,7 @@ - libapreq2-2.06-dev: libapreq2: include/apreq_parser.h Source File + libapreq2-2.07: libapreq2: include/apreq_parser.h Source File - - - -

apreq_parser.h

Go to the documentation of this file.
00001 /*
-00002 **  Copyright 2003-2005  The Apache Software Foundation
+
+
+
+

include/apreq_parser.h

Go to the documentation of this file.
00001 /*
+00002 **  Copyright 2003-2006  The Apache Software Foundation
 00003 **
 00004 **  Licensed under the Apache License, Version 2.0 (the "License");
 00005 **  you may not use this file except in compliance with the License.
@@ -40,117 +51,117 @@
 00024 extern "C" {
 00025 #endif /* __cplusplus */
 00026 
-00038 typedef struct apreq_hook_t apreq_hook_t;
+00038 typedef struct apreq_hook_t apreq_hook_t;
 00039 
-00043 typedef struct apreq_parser_t apreq_parser_t;
+00043 typedef struct apreq_parser_t apreq_parser_t;
 00044 
-00046 #define APREQ_PARSER_ARGS  apreq_parser_t *parser,     \
+00046 #define APREQ_PARSER_ARGS  apreq_parser_t *parser,     \
 00047                            apr_table_t *t,             \
 00048                            apr_bucket_brigade *bb
 00049 
-00051 #define APREQ_HOOK_ARGS    apreq_hook_t *hook,         \
+00051 #define APREQ_HOOK_ARGS    apreq_hook_t *hook,         \
 00052                            apreq_param_t *param,       \
 00053                            apr_bucket_brigade *bb
 00054 
-00058 typedef apr_status_t (*apreq_parser_function_t)(APREQ_PARSER_ARGS);
+00058 typedef apr_status_t (*apreq_parser_function_t)(APREQ_PARSER_ARGS);
 00059 
-00063 typedef apr_status_t (*apreq_hook_function_t)(APREQ_HOOK_ARGS);
+00063 typedef apr_status_t (*apreq_hook_function_t)(APREQ_HOOK_ARGS);
 00064 
-00068 #define APREQ_DECLARE_PARSER(f) APREQ_DECLARE_NONSTD(apr_status_t) \
+00068 #define APREQ_DECLARE_PARSER(f) APREQ_DECLARE_NONSTD(apr_status_t) \
 00069                                 (f) (APREQ_PARSER_ARGS)
 00070 
-00074 #define APREQ_DECLARE_HOOK(f)   APREQ_DECLARE_NONSTD(apr_status_t) \
+00074 #define APREQ_DECLARE_HOOK(f)   APREQ_DECLARE_NONSTD(apr_status_t) \
 00075                                 (f) (APREQ_HOOK_ARGS)
 00076 
-00082 struct apreq_hook_t {
-00083     apreq_hook_function_t hook; 
-00084     apreq_hook_t         *next; 
-00085     apr_pool_t           *pool; 
-00086     void *ctx; 
+00082 struct apreq_hook_t {
+00083     apreq_hook_function_t hook; 
+00084     apreq_hook_t         *next; 
+00085     apr_pool_t           *pool; 
+00086     void *ctx; 
 00087 };
 00088 
-00092 struct apreq_parser_t {
-00094     apreq_parser_function_t parser;
-00096     const char             *content_type;
-00098     apr_pool_t             *pool;
-00100     apr_bucket_alloc_t     *bucket_alloc;
-00102     apr_size_t              brigade_limit;
-00104     const char             *temp_dir;
-00106     apreq_hook_t           *hook;
-00108     void                   *ctx;
+00092 struct apreq_parser_t {
+00094     apreq_parser_function_t parser;
+00096     const char             *content_type;
+00098     apr_pool_t             *pool;
+00100     apr_bucket_alloc_t     *bucket_alloc;
+00102     apr_size_t              brigade_limit;
+00104     const char             *temp_dir;
+00106     apreq_hook_t           *hook;
+00108     void                   *ctx;
 00109 };
 00110 
 00111 
-00122 static APR_INLINE
-00123 apr_status_t apreq_parser_run(struct apreq_parser_t *psr, apr_table_t *t,
+00122 static APR_INLINE
+00123 apr_status_t apreq_parser_run(struct apreq_parser_t *psr, apr_table_t *t,
 00124                               apr_bucket_brigade *bb)
 00125 {
-00126     return psr->parser(psr, t, bb);
+00126     return psr->parser(psr, t, bb);
 00127 }
 00128 
-00136 static APR_INLINE
-00137 apr_status_t apreq_hook_run(struct apreq_hook_t *h, apreq_param_t *param,
+00136 static APR_INLINE
+00137 apr_status_t apreq_hook_run(struct apreq_hook_t *h, apreq_param_t *param,
 00138                             apr_bucket_brigade *bb)
 00139 {
-00140     return h->hook(h, param, bb);
+00140     return h->hook(h, param, bb);
 00141 }
 00142 
 00143 
-00149 APREQ_DECLARE_PARSER(apreq_parse_headers);
+00149 APREQ_DECLARE_PARSER(apreq_parse_headers);
 00150 
-00154 APREQ_DECLARE_PARSER(apreq_parse_urlencoded);
+00154 APREQ_DECLARE_PARSER(apreq_parse_urlencoded);
 00155 
-00162 APREQ_DECLARE_PARSER(apreq_parse_multipart);
+00162 APREQ_DECLARE_PARSER(apreq_parse_multipart);
 00163 
-00172 APREQ_DECLARE_PARSER(apreq_parse_generic);
+00172 APREQ_DECLARE_PARSER(apreq_parse_generic);
 00173 
-00181 APREQ_DECLARE_HOOK(apreq_hook_apr_xml_parser);
+00181 APREQ_DECLARE_HOOK(apreq_hook_apr_xml_parser);
 00182 
-00196 APREQ_DECLARE(apreq_parser_t *) apreq_parser_make(apr_pool_t *pool,
-00197                                                   apr_bucket_alloc_t *ba,
+00196 APREQ_DECLARE(apreq_parser_t *) apreq_parser_make(apr_pool_t *pool,
+00197                                                   apr_bucket_alloc_t *ba,
 00198                                                   const char *content_type,
-00199                                                   apreq_parser_function_t pfn,
-00200                                                   apr_size_t brigade_limit,
+00199                                                   apreq_parser_function_t pfn,
+00200                                                   apr_size_t brigade_limit,
 00201                                                   const char *temp_dir,
-00202                                                   apreq_hook_t *hook,
+00202                                                   apreq_hook_t *hook,
 00203                                                   void *ctx);
 00204 
-00214 APREQ_DECLARE(apreq_hook_t *) apreq_hook_make(apr_pool_t *pool,
-00215                                               apreq_hook_function_t hook,
-00216                                               apreq_hook_t *next,
+00214 APREQ_DECLARE(apreq_hook_t *) apreq_hook_make(apr_pool_t *pool,
+00215                                               apreq_hook_function_t hook,
+00216                                               apreq_hook_t *next,
 00217                                               void *ctx);
 00218 
 00219 
-00226 APREQ_DECLARE(apr_status_t) apreq_parser_add_hook(apreq_parser_t *p, 
-00227                                                   apreq_hook_t *h);
+00226 APREQ_DECLARE(apr_status_t) apreq_parser_add_hook(apreq_parser_t *p,
+00227                                                   apreq_hook_t *h);
 00228 
 00229 
-00236 APREQ_DECLARE(apreq_parser_function_t)apreq_parser(const char *enctype);
+00236 APREQ_DECLARE(apreq_parser_function_t)apreq_parser(const char *enctype);
 00237 
 00238 
-00251 APREQ_DECLARE(apr_status_t) apreq_register_parser(const char *enctype,
-00252                                                   apreq_parser_function_t pfn);
+00251 APREQ_DECLARE(apr_status_t) apreq_register_parser(const char *enctype,
+00252                                                   apreq_parser_function_t pfn);
 00253 
 00254 
-00260 APREQ_DECLARE_HOOK(apreq_hook_disable_uploads);
+00260 APREQ_DECLARE_HOOK(apreq_hook_disable_uploads);
 00261 
-00266 APREQ_DECLARE_HOOK(apreq_hook_discard_brigade);
+00266 APREQ_DECLARE_HOOK(apreq_hook_discard_brigade);
 00267 
-00279 APREQ_DECLARE_HOOK(apreq_hook_find_param);
+00279 APREQ_DECLARE_HOOK(apreq_hook_find_param);
 00280 
 00281 
-00282 #ifdef __cplusplus
-00283 }
+00282 #ifdef __cplusplus
+00283 }
 00284 
-00285 #endif
-00286 #endif /* APREQ_PARSERS_H */
+00285 #endif
+00286 #endif /* APREQ_PARSERS_H */