4
Copyright (C) 2006 Felipe Monteiro de Carvalho
6
This unit is a pascal binding for the Apache 2.0.58 headers.
7
The headers were released under the following copyright:
9
{ Copyright 2000-2005 The Apache Software Foundation or its licensors, as
12
* Licensed under the Apache License, Version 2.0 (the "License");
13
* you may not use this file except in compliance with the License.
14
* You may obtain a copy of the License at
16
* http://www.apache.org/licenses/LICENSE-2.0
18
* Unless required by applicable law or agreed to in writing, software
19
* distributed under the License is distributed on an "AS IS" BASIS,
20
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
* See the License for the specific language governing permissions and
22
* limitations under the License.
54
LibAPR = 'libapr-1.dll';
91
apr_uint32_t = Cardinal;
94
apr_socklen_t = Integer;
97
apr_uint32_tso_handle_t = cuint;
111
apr_int32_t = Integer;
112
Papr_int32_t = ^Integer;
114
Papr_size_t = ^apr_size_t;
115
apr_int16_t = SmallInt;
116
Papr_int16_t = ^SmallInt;
118
// Network structures
121
sa_family: cushort; // address family, AF_xxx
122
sa_data: array [1..14] of Char; // (NBO) 14 bytes of protocol address
126
s_addr: culong; // load with inet_aton()
134
sin_family: cshort; // e.g. AF_INET
135
sin_port: cushort; // e.g. htons(3490)
136
sin_addr: in_addr; // see struct in_addr, below
137
sin_zero: array [1..8] of Char; // zero this if you want to
144
1: (u6_addr8: array [1..16] of Byte);
145
2: (u6_addr16: array [1..8] of Word);
146
3: (u6_addr32: array [1..4] of Cardinal);
148
//#define s6_addr in6_u.u6_addr8
149
//#define s6_addr16 in6_u.u6_addr16
150
//#define s6_addr32 in6_u.u6_addr32
152
sockaddr_in6 = record
153
sin6_family: cushort;
155
sin6_flowinfo: Cardinal;
157
sin6_scope_id: Cardinal;
162
Papr_xml_ns_scope = Pointer;
164
Pap_method_list_t = Pointer;
165
Pcore_output_filter_ctx_t = Pointer;
166
Pap_directive_t = Pointer;
167
Pap_filter_t = Pointer;
168
Papr_file_t = Pointer;
169
Papr_off_t = Pointer;
172
/// byte count to read/write
174
/// data to be read/written
180
{$include apr_errno.inc}
181
{$include apr_pools.inc}
182
{$include apr_general.inc}
183
{$include apr_dso.inc}
184
{$include apr_user.inc}
185
{$include apr_time.inc}
186
{$include apr_tables.inc}
187
{$include apr_file_info.inc}
188
{$include apr_file_io.inc}
189
{$include apr_strings.inc}
190
{$include apr_lib.inc}
191
{$include apr_signal.inc}
192
{$include apr_network_io.inc}
193
{.$include apr_portable.inc}
195
{.$include ../aprutils/apr_uri.inc}
197
{$include apr_thread_proc.inc}
198
{$include apr_version.inc}
199
{$include apr_poll.inc}
204
Macros transformed into functions in the translation
210
function apr_pool_create(newpool: PPapr_pool_t; parent: Papr_pool_t): apr_status_t;
212
Result := apr_pool_create_ex(newpool, parent, nil, nil);
216
function apr_pool_sub_make(newpool: PPapr_pool_t; parent: Papr_pool_t;
217
abort_fn: apr_abortfunc_t): apr_status_t;
219
Result := apr_pool_create_ex(newpool, parent, abort_fn, nil);
224
function apr_tolower(c: Char): Char;
226
buf: array[0..1] of Char;
231
buf := StrLower(@buf[0]);
236
function apr_toupper(c: Char): Char;
238
buf: array[0..1] of Char;
243
buf := StrUpper(@buf[0]);