File: apreq__cookie_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 (146 lines) | stat: -rw-r--r-- 15,068 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
<html>
<head>
  <link rel="stylesheet" type="text/css" href="dox.css" />
  <title>libapreq2-2.05-dev: libapreq2: include/apreq_cookie.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_cookie.h</h1><a href="apreq__cookie_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_COOKIE_H</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define APREQ_COOKIE_H</span>
00019 <span class="preprocessor"></span>
00020 <span class="preprocessor">#include "<a class="code" href="apreq_8h.html">apreq.h</a>"</span>
00021 <span class="preprocessor">#include "<a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/apr__time_8h.html">apr_time.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>
00026 <span class="preprocessor"></span>
<a name="l00047"></a><a class="code" href="apreq__cookie_8h.html#a0">00047</a> <span class="preprocessor">#define APREQ_COOKIE_MAX_LENGTH            4096</span>
00048 <span class="preprocessor"></span>
<a name="l00052"></a><a class="code" href="structapreq__cookie__t.html">00052</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> {
00053 
<a name="l00054"></a><a class="code" href="structapreq__cookie__t.html#o0">00054</a>     <span class="keywordtype">char</span>           *<a class="code" href="structapreq__cookie__t.html#o0">path</a>;        
<a name="l00055"></a><a class="code" href="structapreq__cookie__t.html#o1">00055</a>     <span class="keywordtype">char</span>           *<a class="code" href="structapreq__cookie__t.html#o1">domain</a>;      
<a name="l00056"></a><a class="code" href="structapreq__cookie__t.html#o2">00056</a>     <span class="keywordtype">char</span>           *<a class="code" href="structapreq__cookie__t.html#o2">port</a>;        
<a name="l00057"></a><a class="code" href="structapreq__cookie__t.html#o3">00057</a>     <span class="keywordtype">char</span>           *<a class="code" href="structapreq__cookie__t.html#o3">comment</a>;     
<a name="l00058"></a><a class="code" href="structapreq__cookie__t.html#o4">00058</a>     <span class="keywordtype">char</span>           *<a class="code" href="structapreq__cookie__t.html#o4">commentURL</a>;  
<a name="l00059"></a><a class="code" href="structapreq__cookie__t.html#o5">00059</a>     <a class="codeRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__time.html#ga2">apr_time_t</a>      <a class="code" href="structapreq__cookie__t.html#o5">max_age</a>;     
<a name="l00060"></a><a class="code" href="structapreq__cookie__t.html#o6">00060</a>     <span class="keywordtype">unsigned</span>        <a class="code" href="structapreq__cookie__t.html#o6">flags</a>;       
<a name="l00061"></a><a class="code" href="structapreq__cookie__t.html#o7">00061</a>     <span class="keyword">const</span> <a class="code" href="structapreq__value__t.html">apreq_value_t</a>   <a class="code" href="structapreq__cookie__t.html#o7">v</a>;     
00063 } <a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a>;
00064 
00065 
00067 <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="l00068"></a><a class="code" href="apreq__cookie_8h.html#a2">00068</a> <a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *<a class="code" href="apreq__cookie_8h.html#a2">apreq_value_to_cookie</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *val)
00069 {
00070     <span class="keyword">union </span>{ <span class="keyword">const</span> <span class="keywordtype">char</span> *in; <span class="keywordtype">char</span> *out; } deconst;
00071 
00072     deconst.in = val;
00073     <span class="keywordflow">return</span> apreq_attr_to_type(<a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a>, v,
00074            apreq_attr_to_type(<a class="code" href="structapreq__value__t.html">apreq_value_t</a>, data, deconst.out));
00075 }
00076 
00078 <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="l00079"></a><a class="code" href="apreq__cookie_8h.html#a3">00079</a> <span class="keywordtype">unsigned</span> <a class="code" href="apreq__cookie_8h.html#a3">apreq_cookie_version</a>(<span class="keyword">const</span> <a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c) {
00080     <span class="keywordflow">return</span> APREQ_FLAGS_GET(c-&gt;<a class="code" href="structapreq__cookie__t.html#o6">flags</a>, APREQ_COOKIE_VERSION);
00081 }
00082 
00084 <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="l00085"></a><a class="code" href="apreq__cookie_8h.html#a4">00085</a> <span class="keywordtype">void</span> <a class="code" href="apreq__cookie_8h.html#a4">apreq_cookie_version_set</a>(<a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c, <span class="keywordtype">unsigned</span> v) {
00086     APREQ_FLAGS_SET(c-&gt;<a class="code" href="structapreq__cookie__t.html#o6">flags</a>, APREQ_COOKIE_VERSION, v);
00087 }
00088 
00090 <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="l00091"></a><a class="code" href="apreq__cookie_8h.html#a5">00091</a> <span class="keywordtype">unsigned</span> <a class="code" href="apreq__cookie_8h.html#a5">apreq_cookie_is_secure</a>(<span class="keyword">const</span> <a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c) {
00092     <span class="keywordflow">return</span> APREQ_FLAGS_GET(c-&gt;<a class="code" href="structapreq__cookie__t.html#o6">flags</a>, APREQ_COOKIE_SECURE);
00093 }
00094 
00098 <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="l00099"></a><a class="code" href="apreq__cookie_8h.html#a6">00099</a> <span class="keywordtype">void</span> <a class="code" href="apreq__cookie_8h.html#a6">apreq_cookie_secure_on</a>(<a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c) {
00100     APREQ_FLAGS_ON(c-&gt;<a class="code" href="structapreq__cookie__t.html#o6">flags</a>, APREQ_COOKIE_SECURE);
00101 }
00102 
00104 <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="l00105"></a><a class="code" href="apreq__cookie_8h.html#a7">00105</a> <span class="keywordtype">void</span> <a class="code" href="apreq__cookie_8h.html#a7">apreq_cookie_secure_off</a>(<a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c) {
00106     APREQ_FLAGS_OFF(c-&gt;<a class="code" href="structapreq__cookie__t.html#o6">flags</a>, APREQ_COOKIE_SECURE);
00107 }
00108 
00109 
00111 <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="l00112"></a><a class="code" href="apreq__cookie_8h.html#a8">00112</a> <span class="keywordtype">unsigned</span> <a class="code" href="apreq__cookie_8h.html#a8">apreq_cookie_is_tainted</a>(<span class="keyword">const</span> <a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c) {
00113     <span class="keywordflow">return</span> APREQ_FLAGS_GET(c-&gt;<a class="code" href="structapreq__cookie__t.html#o6">flags</a>, APREQ_TAINTED);
00114 }
00115 
00117 <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="l00118"></a><a class="code" href="apreq__cookie_8h.html#a9">00118</a> <span class="keywordtype">void</span> <a class="code" href="apreq__cookie_8h.html#a9">apreq_cookie_tainted_on</a>(<a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c) {
00119     APREQ_FLAGS_ON(c-&gt;<a class="code" href="structapreq__cookie__t.html#o6">flags</a>, APREQ_TAINTED);
00120 }
00121 
00123 <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="l00124"></a><a class="code" href="apreq__cookie_8h.html#a10">00124</a> <span class="keywordtype">void</span> <a class="code" href="apreq__cookie_8h.html#a10">apreq_cookie_tainted_off</a>(<a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c) {
00125     APREQ_FLAGS_OFF(c-&gt;<a class="code" href="structapreq__cookie__t.html#o6">flags</a>, APREQ_TAINTED);
00126 }
00127 
00143 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__cookie_8h.html#a11">apreq_parse_cookie_header</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,
00144                                                       <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> *jar,
00145                                                       const <span class="keywordtype">char</span> *header);
00146 
00158 APREQ_DECLARE(<a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *) <a class="code" href="apreq__cookie_8h.html#a12">apreq_cookie_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, 
00159                                                   const <span class="keywordtype">char</span> *name,
00160                                                   const <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> nlen, 
00161                                                   const <span class="keywordtype">char</span> *value,
00162                                                   const <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> vlen);
00163 
00173 APREQ_DECLARE(<span class="keywordtype">char</span>*) <a class="code" href="apreq__cookie_8h.html#a13">apreq_cookie_as_string</a>(const <a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c,
00174                                             <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> *p);
00175 
00176 
00189 APREQ_DECLARE(<span class="keywordtype">int</span>) <a class="code" href="apreq__cookie_8h.html#a14">apreq_cookie_serialize</a>(const <a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c,
00190                                           <span class="keywordtype">char</span> *buf, <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> len);
00191 
00206 APREQ_DECLARE(<span class="keywordtype">void</span>) <a class="code" href="apreq__cookie_8h.html#a15">apreq_cookie_expires</a>(<a class="code" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c, 
00207                                          const <span class="keywordtype">char</span> *time_str);
00208 
00209 #ifdef __cplusplus
00210  }
00211 #endif
00212 
00213 #endif <span class="comment">/*APREQ_COOKIE_H*/</span>
00214 
00215 
</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>