Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
util_cookies.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
22 #ifndef UTIL_COOKIES_H
23 #define UTIL_COOKIES_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
40 #include "apr_errno.h"
41 #include "httpd.h"
42 
43 #define SET_COOKIE "Set-Cookie"
44 #define SET_COOKIE2 "Set-Cookie2"
45 #define DEFAULT_ATTRS "HttpOnly;Secure;Version=1"
46 #define CLEAR_ATTRS "Version=1"
47 
48 typedef struct {
50  const char *name;
51  const char *encoded;
54 } ap_cookie_do;
55 
69  const char *val, const char *attrs,
70  long maxage, ...)
72 
85 AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2,
86  const char *val, const char *attrs2,
87  long maxage, ...)
88  AP_FN_ATTR_SENTINEL;
89 
100 AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name,
101  const char *attrs, ...)
102  AP_FN_ATTR_SENTINEL;
103 
114 AP_DECLARE(apr_status_t) ap_cookie_remove2(request_rec * r, const char *name2,
115  const char *attrs2, ...)
116  AP_FN_ATTR_SENTINEL;
117 
127 AP_DECLARE(apr_status_t) ap_cookie_read(request_rec * r, const char *name, const char **val,
128  int remove);
129 
136 AP_DECLARE(apr_status_t) ap_cookie_check_string(const char *string);
137 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif /* !UTIL_COOKIES_H */
#define AP_FN_ATTR_SENTINEL
Definition: ap_config.h:231
#define AP_DECLARE(x)
Definition: macros.h:1
HTTP Daemon routines.
APR Error Codes.
A structure that represents the current request.
Definition: httpd.h:806
struct apr_table_t apr_table_t
Definition: apr_tables.h:56
const char * name
Definition: mod_dav.h:726
int apr_status_t
Definition: apr_errno.h:44
request_rec * r
Definition: mod_dav.h:515