Apache Portable Runtime Utility Library
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
apr_buckets.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
*/
21
#ifndef APR_BUCKETS_H
22
#define APR_BUCKETS_H
23
24
#if defined(APR_BUCKET_DEBUG) && !defined(APR_RING_DEBUG)
25
#define APR_RING_DEBUG
26
#endif
27
28
#include "apu.h"
29
#include "apr_network_io.h"
30
#include "apr_file_io.h"
31
#include "apr_general.h"
32
#include "apr_mmap.h"
33
#include "apr_errno.h"
34
#include "apr_ring.h"
35
#include "apr.h"
36
#if APR_HAVE_SYS_UIO_H
37
#include <sys/uio.h>
/* for struct iovec */
38
#endif
39
#if APR_HAVE_STDARG_H
40
#include <stdarg.h>
41
#endif
42
43
#ifdef __cplusplus
44
extern
"C"
{
45
#endif
46
54
#define APR_BUCKET_BUFF_SIZE 8000
55
57
typedef
enum
{
58
APR_BLOCK_READ
,
59
APR_NONBLOCK_READ
60
}
apr_read_type_e
;
61
114
/*
115
* Forward declaration of the main types.
116
*/
117
119
typedef
struct
apr_bucket_brigade
apr_bucket_brigade
;
121
typedef
struct
apr_bucket
apr_bucket
;
123
typedef
struct
apr_bucket_alloc_t
apr_bucket_alloc_t
;
124
126
typedef
struct
apr_bucket_type_t
apr_bucket_type_t
;
127
131
struct
apr_bucket_type_t
{
135
const
char
*
name
;
140
int
num_func
;
151
enum
{
153
APR_BUCKET_DATA
= 0,
155
APR_BUCKET_METADATA
= 1
156
}
is_metadata
;
164
void (*
destroy
)(
void
*data);
165
176
apr_status_t (*
read
)(
apr_bucket
*b,
const
char
**str, apr_size_t *len,
177
apr_read_type_e
block);
178
192
apr_status_t (*
setaside
)(
apr_bucket
*e, apr_pool_t *pool);
193
203
apr_status_t (*
split
)(
apr_bucket
*e, apr_size_t point);
204
211
apr_status_t (*
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;
234
apr_size_t
length
;
242
apr_off_t
start
;
24
copy
)(
apr_bucket
*e,
apr_bucket
**c);
212
213
};
214
224
struct
apr_bucket
{
226
APR_RING_ENTRY
(
apr_bucket
) link;
228
const
apr_bucket_type_t
*
type
;