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

1.1       paf         1: /** @file
                      2:        Parser: web server api interface object decl.
                      3: 
1.28    ! misha       4:        Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com)
1.18      paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1       paf         6: */
                      7: 
                      8: #ifndef PA_SAPI_H
                      9: #define PA_SAPI_H
1.20      paf        10: 
1.28    ! misha      11: static const char * const IDENT_SAPI_H="$Date: 2005/08/09 08:14:50 $";
1.23      paf        12: 
                     13: // includes
                     14: 
1.1       paf        15: 
                     16: #include "pa_types.h"
1.23      paf        17: #include "pa_array.h"
1.1       paf        18: 
1.23      paf        19: // forwards
                     20: class SAPI_Info;
1.5       paf        21: 
1.4       paf        22: /// target web-Server API
1.1       paf        23: struct SAPI {
1.5       paf        24:        /// log error message
1.23      paf        25:        static void log(SAPI_Info& info, const char* fmt, ...);
                     26:        /// log error message & exit
                     27:        static void die(const char* fmt, ...);
                     28:        /// log error message & abort[write core]
                     29:        static void abort(const char* fmt, ...);
1.19      paf        30:        /// environment strings
1.23      paf        31:        static const char* const* environment(SAPI_Info& info);
1.12      parser     32:        /// get environment string
1.23      paf        33:        static char* get_env(SAPI_Info& info, const char* name);
1.1       paf        34:        /// read POST request bytes
1.23      paf        35:        static size_t read_post(SAPI_Info& info, char *buf, size_t max_bytes);
1.12      parser     36:        /// add response header attribute [but do not send it to client]
1.28    ! misha      37:        static void add_header_attribute(SAPI_Info& info, const char* dont_store_key, const char* dont_store_value);
1.12      parser     38:        /// send collected header attributes to client
1.23      paf        39:        static void send_header(SAPI_Info& info);
1.1       paf        40:        /// output body bytes
1.26      paf        41:        static size_t send_body(SAPI_Info& info, const void *buf, size_t size);
1.1       paf        42: };
                     43: 
                     44: #endif

E-mail: