/usr/src/redhat/BUILD/httpd-2.2.3/include/http_protocol.h

説明を見る。
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00026 #ifndef APACHE_HTTP_PROTOCOL_H
00027 #define APACHE_HTTP_PROTOCOL_H
00028 
00029 #include "httpd.h"
00030 #include "apr_hooks.h"
00031 #include "apr_portable.h"
00032 #include "apr_mmap.h"
00033 #include "apr_buckets.h"
00034 #include "util_filter.h"
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00045 AP_DECLARE_HOOK(void,insert_error_filter,(request_rec *r))
00046 
00047 
00050 AP_DECLARE_DATA extern ap_filter_rec_t *ap_old_write_func;
00051 
00052 /*
00053  * Prototypes for routines which either talk directly back to the user,
00054  * or control the ones that eventually do.
00055  */
00056 
00062 request_rec *ap_read_request(conn_rec *c);
00063 
00068 AP_DECLARE(void) ap_get_mime_headers(request_rec *r);
00069 
00076 AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r,
00077                                           apr_bucket_brigade *bb);
00078 
00079 /* Finish up stuff after a request */
00080 
00086 AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r);
00087 
00097 AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error);
00098 
00099 /* Set last modified header line from the lastmod date of the associated file.
00100  * Also, set content length.
00101  *
00102  * May return an error status, typically HTTP_NOT_MODIFIED (that when the
00103  * permit_cache argument is set to one).
00104  */
00105 
00111 AP_DECLARE(void) ap_set_content_length(request_rec *r, apr_off_t length);
00112 
00118 AP_DECLARE(int) ap_set_keepalive(request_rec *r);
00119 
00127 AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime);
00128 
00140 AP_DECLARE(const char *) ap_make_content_type(request_rec *r,
00141                                               const char *type);
00142 
00143 #ifdef CORE_PRIVATE
00144 
00148 AP_DECLARE(void) ap_setup_make_content_type(apr_pool_t *pool);
00149 #endif /* CORE_PRIVATE */
00150 
00159 AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak);
00160 
00165 AP_DECLARE(void) ap_set_etag(request_rec *r);
00166 
00171 AP_DECLARE(void) ap_set_last_modified(request_rec *r);
00172 
00181 AP_DECLARE(int) ap_meets_conditions(request_rec *r);
00182 
00183 /* Other ways to send stuff at the client.  All of these keep track
00184  * of bytes_sent automatically.  This indirection is intended to make
00185  * it a little more painless to slide things like HTTP-NG packetization
00186  * underneath the main body of the code later.  In the meantime, it lets
00187  * us centralize a bit of accounting (bytes_sent).
00188  *
00189  * These also return the number of bytes written by the call.
00190  * They should only be called with a timeout registered, for obvious reaasons.
00191  * (Ditto the send_header stuff).
00192  */
00193 
00203 AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, 
00204                                    apr_size_t length, apr_size_t *nbytes);
00205 
00206 #if APR_HAS_MMAP
00207 
00215 AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
00216                              size_t length);
00217 #endif
00218 
00219 
00228 AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname);
00229 
00235 AP_DECLARE(void) ap_method_registry_init(apr_pool_t *p);
00236 
00241 #define AP_METHOD_CHECK_ALLOWED(mask, methname) \
00242     ((mask) & (AP_METHOD_BIT << ap_method_number_of((methname))))
00243 
00253 AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts);
00254 
00255 
00262 AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest,
00263                                      ap_method_list_t *src);
00264 
00273 AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method);
00274 
00283 AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method);
00284     
00292 AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
00293                                        const char *method);
00294 
00301 AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l);
00302     
00310 AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct);
00311 
00312 /* Hmmm... could macrofy these for now, and maybe forever, though the
00313  * definitions of the macros would get a whole lot hairier.
00314  */
00315 
00322 AP_DECLARE(int) ap_rputc(int c, request_rec *r);
00323 
00330 AP_DECLARE(int) ap_rputs(const char *str, request_rec *r);
00331 
00339 AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
00340 
00347 AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...);
00348 
00356 AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist);
00357 
00365 AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...)
00366                                 __attribute__((format(printf,2,3)));
00367 
00373 AP_DECLARE(int) ap_rflush(request_rec *r);
00374 
00381 AP_DECLARE(int) ap_index_of_response(int status);
00382 
00390 AP_DECLARE(const char *) ap_get_status_line(int status);
00391 
00392 /* Reading a block of data from the client connection (e.g., POST arg) */
00393 
00405 AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy);
00406 
00415 AP_DECLARE(int) ap_should_client_block(request_rec *r);
00416 
00426 AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz);
00427 
00438 AP_DECLARE(int) ap_discard_request_body(request_rec *r);
00439 
00446 AP_DECLARE(void) ap_note_auth_failure(request_rec *r);
00447 
00454 AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r);
00455 
00462 AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r);
00463 
00476 AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
00477 
00487 AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
00488 
00499 AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
00500 
00523 #if APR_CHARSET_EBCDIC
00524 AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n, 
00525                                      apr_size_t *read,
00526                                      request_rec *r, int fold,
00527                                      apr_bucket_brigade *bb);
00528 #else /* ASCII box */
00529 #define ap_rgetline(s, n, read, r, fold, bb) \
00530         ap_rgetline_core((s), (n), (read), (r), (fold), (bb))
00531 #endif
00532 
00534 AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n, 
00535                                           apr_size_t *read,
00536                                           request_rec *r, int fold,
00537                                           apr_bucket_brigade *bb);
00538 
00545 AP_DECLARE(int) ap_method_number_of(const char *method);
00546 
00554 AP_DECLARE(const char *) ap_method_name_of(apr_pool_t *p, int methnum);
00555 
00556 
00557   /* Hooks */
00558   /*
00559    * post_read_request --- run right after read_request or internal_redirect,
00560    *                  and not run during any subrequests.
00561    */
00569 AP_DECLARE_HOOK(int,post_read_request,(request_rec *r))
00570 
00577 AP_DECLARE_HOOK(int,log_transaction,(request_rec *r))
00578 
00585 AP_DECLARE_HOOK(const char *,http_scheme,(const request_rec *r))
00586 
00592 AP_DECLARE_HOOK(apr_port_t,default_port,(const request_rec *r))
00593 
00595 typedef struct ap_bucket_error ap_bucket_error;
00596 
00606 struct ap_bucket_error {
00608     apr_bucket_refcount refcount;
00610     int status;
00612     const char    *data;
00613 };
00614 
00616 AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error;
00617 
00623 #define AP_BUCKET_IS_ERROR(e)         (e->type == &ap_bucket_type_error)
00624 
00633 AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
00634                 const char *buf, apr_pool_t *p);
00635 
00644 AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf,
00645                                                 apr_pool_t *p,
00646                                                 apr_bucket_alloc_t *list);
00647 
00648 AP_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f, apr_bucket_brigade *b);
00649 AP_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, apr_bucket_brigade *b);
00650 AP_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *,
00651                                                               apr_bucket_brigade *);
00652 AP_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(ap_filter_t *f, apr_bucket_brigade *b);
00653 
00659 AP_DECLARE(void) ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r);
00660 
00666 AP_DECLARE(void) ap_finalize_sub_req_protocol(request_rec *sub_r);
00667                                                                                 
00668 #ifdef __cplusplus
00669 }
00670 #endif
00671 
00672 #endif  /* !APACHE_HTTP_PROTOCOL_H */
00673 

Apacheに対してSun Jul 19 22:05:23 2009に生成されました。  doxygen 1.4.7