Annotation of parser3/src/include/pa_sapi.h, revision 1.2
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:
6: Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
7:
1.2 ! paf 8: $Id: pa_sapi.h,v 1.1 2001/03/23 10:27:30 paf Exp $
1.1 paf 9: */
10:
11: #ifndef PA_SAPI_H
12: #define PA_SAPI_H
13:
14: #include "pa_pool.h"
15: #include "pa_types.h"
16:
17: /// target web-server api
18: struct SAPI {
19: /// get env
20: static const char *get_env(Pool& pool, const char *name);
21: /// read POST request bytes
22: static uint read_post(Pool& pool, char *buf, uint max_bytes);
23: /// add response header attribute
24: static void add_header_attribute(Pool& pool, const char *key, const char *value);
25: /// add response header attribute
26: static void send_header(Pool& pool);
27: /// output body bytes
28: static void send_body(Pool& pool, const char *buf, size_t size);
1.2 ! paf 29: /// log error message
! 30: static void log(Pool& pool, const char *fmt, ...);
1.1 paf 31: };
32:
33: #endif
E-mail: