--- parser3/src/include/pa_sapi.h 2001/04/09 15:48:56 1.7 +++ parser3/src/include/pa_sapi.h 2002/02/08 07:27:45 1.17 @@ -1,11 +1,10 @@ /** @file Parser: web server api interface object decl. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://paf.design.ru) - Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_sapi.h,v 1.7 2001/04/09 15:48:56 paf Exp $ + $Id: pa_sapi.h,v 1.17 2002/02/08 07:27:45 paf Exp $ */ #ifndef PA_SAPI_H @@ -22,22 +21,18 @@ class Hash; struct SAPI { /// log error message static void log(Pool& pool, const char *fmt, ...); - /// + /// log error message & die + static void die(const char *fmt, ...); + /// get environment string static const char *get_env(Pool& pool, const char *name); /// read POST request bytes static size_t read_post(Pool& pool, char *buf, size_t max_bytes); - /// add response header attribute + /// add response header attribute [but do not send it to client] static void add_header_attribute(Pool& pool, const char *key, const char *value); - /// add response header attribute + /// send collected header attributes to client static void send_header(Pool& pool); /// output body bytes static void send_body(Pool& pool, const void *buf, size_t size); - /// @return exit_status - static int execute(Pool& pool, - const String& file_spec, - const Hash *env, - const Array *argv, - const String& in, String& out, String& err); }; #endif