Annotation of parser3/src/include/pa_sapi.h, revision 1.20
1.1 paf 1: /** @file
2: Parser: web server api interface object decl.
3:
1.17 paf 4: Copyright (c) 2001, 2002 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:
! 11: static const char* IDENT_SAPI_H="$Id: zzz $";
1.1 paf 12:
13: #include "pa_pool.h"
14: #include "pa_types.h"
15:
1.5 paf 16: class Array;
17: class String;
18: class Hash;
19:
1.4 paf 20: /// target web-Server API
1.1 paf 21: struct SAPI {
1.5 paf 22: /// log error message
23: static void log(Pool& pool, const char *fmt, ...);
1.14 parser 24: /// log error message & die
25: static void die(const char *fmt, ...);
1.19 paf 26: /// environment strings
27: static const char *const *environment(Pool& pool);
1.12 parser 28: /// get environment string
1.1 paf 29: static const char *get_env(Pool& pool, const char *name);
30: /// read POST request bytes
1.6 paf 31: static size_t read_post(Pool& pool, char *buf, size_t max_bytes);
1.12 parser 32: /// add response header attribute [but do not send it to client]
1.1 paf 33: static void add_header_attribute(Pool& pool, const char *key, const char *value);
1.12 parser 34: /// send collected header attributes to client
1.1 paf 35: static void send_header(Pool& pool);
36: /// output body bytes
1.3 paf 37: static void send_body(Pool& pool, const void *buf, size_t size);
1.1 paf 38: };
39:
40: #endif
E-mail: