Annotation of parser3/src/include/pa_sapi.h, revision 1.14

1.1       paf         1: /** @file
                      2:        Parser: web server api interface object decl.
                      3: 
                      4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
                      5:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
                      6: 
1.14    ! parser      7:        $Id: pa_sapi.h,v 1.13 2001/09/26 10:32:25 parser Exp $
1.1       paf         8: */
                      9: 
                     10: #ifndef PA_SAPI_H
                     11: #define PA_SAPI_H
                     12: 
1.9       parser     13: #include "pa_config_includes.h"
1.1       paf        14: #include "pa_pool.h"
                     15: #include "pa_types.h"
                     16: 
1.5       paf        17: class Array;
                     18: class String;
                     19: class Hash;
                     20: 
1.4       paf        21: /// target web-Server API
1.1       paf        22: struct SAPI {
1.5       paf        23:        /// log error message
                     24:        static void log(Pool& pool, const char *fmt, ...);
1.14    ! parser     25:        /// log error message & die
        !            26:        static void die(const char *fmt, ...);
1.12      parser     27:        /// get environment string
1.1       paf        28:        static const char *get_env(Pool& pool, const char *name);
                     29:        /// read POST request bytes
1.6       paf        30:        static size_t read_post(Pool& pool, char *buf, size_t max_bytes);
1.12      parser     31:        /// add response header attribute [but do not send it to client]
1.1       paf        32:        static void add_header_attribute(Pool& pool, const char *key, const char *value);
1.12      parser     33:        /// send collected header attributes to client
1.1       paf        34:        static void send_header(Pool& pool);
                     35:        /// output body bytes
1.3       paf        36:        static void send_body(Pool& pool, const void *buf, size_t size);
1.1       paf        37: };
                     38: 
                     39: #endif

E-mail: