File: apreq__parser_8h-source.html

package info (click to toggle)
rapache 1.2.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,368 kB
  • sloc: sh: 18,629; ansic: 10,417; perl: 5,675; javascript: 2,800; makefile: 307
file content (157 lines) | stat: -rw-r--r-- 15,459 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<html>
<head>
  <link rel="stylesheet" type="text/css" href="dox.css" />
  <title>libapreq2-2.05-dev: libapreq2: include/apreq_parser.h Source File</title> 
</head>
<body>
<div id="page-header">
<p class="menu">
   <a href="http://www.apache.org/">Apache Software Foundation</a> &gt; <a href="http://httpd.apache.org">HTTP Server Project</a> &gt;
<a href="http://httpd.apache.org/apreq/">Request Library Subproject</a></p>
<p class="apache">Apache HTTP Server Request Library</p>
<img alt="" src="feather.gif" /></div>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">include</a></div>
<h1>apreq_parser.h</h1><a href="apreq__parser_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
00002 <span class="comment">**  Copyright 2003-2005  The Apache Software Foundation</span>
00003 <span class="comment">**</span>
00004 <span class="comment">**  Licensed under the Apache License, Version 2.0 (the "License");</span>
00005 <span class="comment">**  you may not use this file except in compliance with the License.</span>
00006 <span class="comment">**  You may obtain a copy of the License at</span>
00007 <span class="comment">**</span>
00008 <span class="comment">**      http://www.apache.org/licenses/LICENSE-2.0</span>
00009 <span class="comment">**</span>
00010 <span class="comment">**  Unless required by applicable law or agreed to in writing, software</span>
00011 <span class="comment">**  distributed under the License is distributed on an "AS IS" BASIS,</span>
00012 <span class="comment">**  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
00013 <span class="comment">**  See the License for the specific language governing permissions and</span>
00014 <span class="comment">**  limitations under the License.</span>
00015 <span class="comment">*/</span>
00016 
00017 <span class="preprocessor">#ifndef APREQ_PARSERS_H</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define APREQ_PARSERS_H</span>
00019 <span class="preprocessor"></span><span class="comment">/* These structs are defined below */</span>
00020 
00021 <span class="preprocessor">#include "<a class="code" href="apreq__param_8h.html">apreq_param.h</a>"</span>
00022 
00023 <span class="preprocessor">#ifdef __cplusplus</span>
00024 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00025 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
00026 
<a name="l00038"></a><a class="code" href="apreq__parser_8h.html#a4">00038</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapreq__hook__t.html">apreq_hook_t</a> apreq_hook_t;
00039 
<a name="l00043"></a><a class="code" href="apreq__parser_8h.html#a5">00043</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapreq__parser__t.html">apreq_parser_t</a> apreq_parser_t;
00044 
<a name="l00046"></a><a class="code" href="apreq__parser_8h.html#a0">00046</a> <span class="preprocessor">#define APREQ_PARSER_ARGS  apreq_parser_t *parser,     \</span>
00047 <span class="preprocessor">                           apr_table_t *t,             \</span>
00048 <span class="preprocessor">                           apr_bucket_brigade *bb</span>
00049 <span class="preprocessor"></span>
<a name="l00051"></a><a class="code" href="apreq__parser_8h.html#a1">00051</a> <span class="preprocessor">#define APREQ_HOOK_ARGS    apreq_hook_t *hook,         \</span>
00052 <span class="preprocessor">                           apreq_param_t *param,       \</span>
00053 <span class="preprocessor">                           apr_bucket_brigade *bb</span>
00054 <span class="preprocessor"></span>
<a name="l00058"></a><a class="code" href="apreq__parser_8h.html#a6">00058</a> <span class="keyword">typedef</span> <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__errno.html#ga0">apr_status_t</a> (*<a class="code" href="apreq__parser_8h.html#a6">apreq_parser_function_t</a>)(<a class="code" href="apreq__parser_8h.html#a0">APREQ_PARSER_ARGS</a>);
00059 
<a name="l00063"></a><a class="code" href="apreq__parser_8h.html#a7">00063</a> <span class="keyword">typedef</span> <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__errno.html#ga0">apr_status_t</a> (*<a class="code" href="apreq__parser_8h.html#a7">apreq_hook_function_t</a>)(<a class="code" href="apreq__parser_8h.html#a1">APREQ_HOOK_ARGS</a>);
00064 
<a name="l00068"></a><a class="code" href="apreq__parser_8h.html#a2">00068</a> <span class="preprocessor">#define APREQ_DECLARE_PARSER(f) APREQ_DECLARE_NONSTD(apr_status_t) \</span>
00069 <span class="preprocessor">                                (f) (APREQ_PARSER_ARGS)</span>
00070 <span class="preprocessor"></span>
<a name="l00074"></a><a class="code" href="apreq__parser_8h.html#a3">00074</a> <span class="preprocessor">#define APREQ_DECLARE_HOOK(f)   APREQ_DECLARE_NONSTD(apr_status_t) \</span>
00075 <span class="preprocessor">                                (f) (APREQ_HOOK_ARGS)</span>
00076 <span class="preprocessor"></span>
<a name="l00082"></a><a class="code" href="structapreq__hook__t.html">00082</a> <span class="keyword">struct </span>apreq_hook_t {
<a name="l00083"></a><a class="code" href="structapreq__hook__t.html#o0">00083</a>     <a class="code" href="apreq__parser_8h.html#a7">apreq_hook_function_t</a> <a class="code" href="structapreq__hook__t.html#o0">hook</a>; 
<a name="l00084"></a><a class="code" href="structapreq__hook__t.html#o1">00084</a>     apreq_hook_t         *<a class="code" href="structapreq__hook__t.html#o1">next</a>; 
<a name="l00085"></a><a class="code" href="structapreq__hook__t.html#o2">00085</a>     <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__pools.html#ga0">apr_pool_t</a>           *<a class="code" href="structapreq__hook__t.html#o2">pool</a>; 
<a name="l00086"></a><a class="code" href="structapreq__hook__t.html#o3">00086</a>     <span class="keywordtype">void</span> *<a class="code" href="structapreq__hook__t.html#o3">ctx</a>; 
00087 };
00088 
<a name="l00092"></a><a class="code" href="structapreq__parser__t.html">00092</a> <span class="keyword">struct </span>apreq_parser_t {
<a name="l00094"></a><a class="code" href="structapreq__parser__t.html#o0">00094</a>     <a class="code" href="apreq__parser_8h.html#a6">apreq_parser_function_t</a> <a class="code" href="structapreq__parser__t.html#o0">parser</a>;
<a name="l00096"></a><a class="code" href="structapreq__parser__t.html#o1">00096</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>             *<a class="code" href="structapreq__parser__t.html#o1">content_type</a>;
<a name="l00098"></a><a class="code" href="structapreq__parser__t.html#o2">00098</a>     <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__pools.html#ga0">apr_pool_t</a>             *<a class="code" href="structapreq__parser__t.html#o2">pool</a>;
<a name="l00100"></a><a class="code" href="structapreq__parser__t.html#o3">00100</a>     <a class="codeRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/group___a_p_r___util___bucket___brigades.html#ga2">apr_bucket_alloc_t</a>     *<a class="code" href="structapreq__parser__t.html#o3">bucket_alloc</a>;
<a name="l00102"></a><a class="code" href="structapreq__parser__t.html#o4">00102</a>     <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__platform.html#ga7">apr_size_t</a>              <a class="code" href="structapreq__parser__t.html#o4">brigade_limit</a>;
<a name="l00104"></a><a class="code" href="structapreq__parser__t.html#o5">00104</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>             *<a class="code" href="structapreq__parser__t.html#o5">temp_dir</a>;
<a name="l00106"></a><a class="code" href="structapreq__parser__t.html#o6">00106</a>     apreq_hook_t           *<a class="code" href="structapreq__parser__t.html#o6">hook</a>;
<a name="l00108"></a><a class="code" href="structapreq__parser__t.html#o7">00108</a>     <span class="keywordtype">void</span>                   *<a class="code" href="structapreq__parser__t.html#o7">ctx</a>;
00109 };
00110 
00111 
00122 <span class="keyword">static</span> <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__platform.html#ga11">APR_INLINE</a>
<a name="l00123"></a><a class="code" href="apreq__parser_8h.html#a8">00123</a> <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__errno.html#ga0">apr_status_t</a> <a class="code" href="apreq__parser_8h.html#a8">apreq_parser_run</a>(<span class="keyword">struct</span> apreq_parser_t *psr, <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__tables.html#ga0">apr_table_t</a> *t,
00124                               <a class="codeRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/structapr__bucket__brigade.html">apr_bucket_brigade</a> *bb)
00125 {
00126     <span class="keywordflow">return</span> psr-&gt;<a class="code" href="structapreq__parser__t.html#o0">parser</a>(psr, t, bb);
00127 }
00128 
00136 <span class="keyword">static</span> <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__platform.html#ga11">APR_INLINE</a>
<a name="l00137"></a><a class="code" href="apreq__parser_8h.html#a9">00137</a> <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__errno.html#ga0">apr_status_t</a> <a class="code" href="apreq__parser_8h.html#a9">apreq_hook_run</a>(<span class="keyword">struct</span> apreq_hook_t *h, <a class="code" href="structapreq__param__t.html">apreq_param_t</a> *param,
00138                             <a class="codeRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/structapr__bucket__brigade.html">apr_bucket_brigade</a> *bb)
00139 {
00140     <span class="keywordflow">return</span> h-&gt;hook(h, param, bb);
00141 }
00142 
00143 
00149 <a class="code" href="apreq__parser_8h.html#a2">APREQ_DECLARE_PARSER</a>(apreq_parse_headers);
00150 
00154 <a class="code" href="apreq__parser_8h.html#a2">APREQ_DECLARE_PARSER</a>(apreq_parse_urlencoded);
00155 
00162 <a class="code" href="apreq__parser_8h.html#a2">APREQ_DECLARE_PARSER</a>(apreq_parse_multipart);
00163 
00172 <a class="code" href="apreq__parser_8h.html#a2">APREQ_DECLARE_PARSER</a>(apreq_parse_generic);
00173 
00181 <a class="code" href="apreq__parser_8h.html#a3">APREQ_DECLARE_HOOK</a>(apreq_hook_apr_xml_parser);
00182 
00196 APREQ_DECLARE(apreq_parser_t *) <a class="code" href="apreq__parser_8h.html#a15">apreq_parser_make</a>(<a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__pools.html#ga0">apr_pool_t</a> *pool,
00197                                                   <a class="codeRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/group___a_p_r___util___bucket___brigades.html#ga2">apr_bucket_alloc_t</a> *ba,
00198                                                   const <span class="keywordtype">char</span> *content_type,
00199                                                   <a class="code" href="apreq__parser_8h.html#a6">apreq_parser_function_t</a> pfn,
00200                                                   <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__platform.html#ga7">apr_size_t</a> brigade_limit,
00201                                                   const <span class="keywordtype">char</span> *temp_dir,
00202                                                   apreq_hook_t *hook,
00203                                                   <span class="keywordtype">void</span> *ctx);
00204 
00214 APREQ_DECLARE(apreq_hook_t *) <a class="code" href="apreq__parser_8h.html#a16">apreq_hook_make</a>(<a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__pools.html#ga0">apr_pool_t</a> *pool,
00215                                               <a class="code" href="apreq__parser_8h.html#a7">apreq_hook_function_t</a> hook,
00216                                               apreq_hook_t *next,
00217                                               <span class="keywordtype">void</span> *ctx);
00218 
00219 
00226 APREQ_DECLARE(<a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__errno.html#ga0">apr_status_t</a>) <a class="code" href="apreq__parser_8h.html#a17">apreq_parser_add_hook</a>(apreq_parser_t *p, 
00227                                                   apreq_hook_t *h);
00228 
00229 
00236 APREQ_DECLARE(<a class="code" href="apreq__parser_8h.html#a6">apreq_parser_function_t</a>)<a class="code" href="apreq__parser_8h.html#a18">apreq_parser</a>(const <span class="keywordtype">char</span> *enctype);
00237 
00238 
00251 APREQ_DECLARE(<a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__errno.html#ga0">apr_status_t</a>) <a class="code" href="apreq__parser_8h.html#a19">apreq_register_parser</a>(const <span class="keywordtype">char</span> *enctype,
00252                                                   <a class="code" href="apreq__parser_8h.html#a6">apreq_parser_function_t</a> pfn);
00253 
00254 
00260 <a class="code" href="apreq__parser_8h.html#a3">APREQ_DECLARE_HOOK</a>(apreq_hook_disable_uploads);
00261 
00266 <a class="code" href="apreq__parser_8h.html#a3">APREQ_DECLARE_HOOK</a>(apreq_hook_discard_brigade);
00267 
00279 <a class="code" href="apreq__parser_8h.html#a3">APREQ_DECLARE_HOOK</a>(apreq_hook_find_param);
00280 
00281 
00282 #ifdef __cplusplus
00283 }
00284 
00285 #endif
00286 #endif <span class="comment">/* APREQ_PARSERS_H */</span>
</pre></div><div id="footer">
<p class="apache">
Copyright &copy; 2003-2005 <a href="http://www.apache.org">The Apache Software Foundation</a>.<br/>
See <a href="apreq_license.html">LICENSE</a>.</p>
<p class="menu">
<span style="color:#aaa">page generated by <a href="http://www.doxygen.org/"><code>doxygen</code></a>
version 1.4.2 on 4 May 2005</span>
</p>
</div>
</body>
</html>