Annotation of parser3/src/include/pa_sapi.h, revision 1.5
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.5 ! paf 8: $Id: pa_sapi.h,v 1.4 2001/04/04 10:50:34 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:
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, ...);
! 25: ///
1.1 paf 26: static const char *get_env(Pool& pool, const char *name);
27: /// read POST request bytes
28: static uint read_post(Pool& pool, char *buf, uint max_bytes);
29: /// add response header attribute
30: static void add_header_attribute(Pool& pool, const char *key, const char *value);
31: /// add response header attribute
32: static void send_header(Pool& pool);
33: /// output body bytes
1.3 paf 34: static void send_body(Pool& pool, const void *buf, size_t size);
1.5 ! paf 35: /// @return exit_status
! 36: static int execute(const String& file_spec,
! 37: const Hash *env,
! 38: const Array *argv,
! 39: const String& in, String& out, String& err);
1.1 paf 40: };
41:
42: #endif
E-mail: