--- parser3/src/include/pa_request.h 2001/03/28 14:41:29 1.71 +++ parser3/src/include/pa_request.h 2001/04/28 10:58:30 1.85 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_request.h,v 1.71 2001/03/28 14:41:29 paf Exp $ + $Id: pa_request.h,v 1.85 2001/04/28 10:58:30 paf Exp $ */ #ifndef PA_REQUEST_H @@ -23,6 +23,7 @@ #include "pa_vrequest.h" #include "pa_vresponse.h" #include "pa_vcookie.h" +#include "pa_sql_driver_manager.h" #ifndef NO_STRING_ORIGIN # define COMPILE_PARAMS \ @@ -42,6 +43,7 @@ #endif class Temp_lang; +class Methoded; /// Main workhorse. class Request : public Pooled { @@ -104,7 +106,7 @@ public: /// appending, sure of clean string inside void write_no_lang(const String& astring) { - wcontext->write(astring, String::UL_NO); + wcontext->write(astring, String::UL_CLEAN); } /// appending string, passing language built into string being written void write_pass_lang(const String& astring) { @@ -120,30 +122,31 @@ public: } /// appending sure value, that would be converted to clean string void write_no_lang(Value& avalue) { - wcontext->write(avalue, String::UL_NO); + wcontext->write(avalue, String::UL_CLEAN); } /// appending sure value, not VString void write_expr_result(Value& avalue) { wcontext->write(avalue); } - /// handy is-value-a-junction ensurer - void fail_if_junction_(bool is, Value& value, - const String& method_name, const char *msg); - /// returns relative to @a path path to @a file const String& relative(const char *apath, const String& relative_name); /// returns an absolute @a path to relative @a name const String& absolute(const String& relative_name); + /// returns the mime type of 'user_file_name_cstr' + const String& mime_type_of(const char *user_file_name_cstr); + public: /// info from web server Info& info; + /// user's post data + char *post_data; size_t post_size; - /// default base - VClass ROOT; + /// operators are methods of this class + Methoded& OP; /// $env:fields here VEnv env; /// $form:elements here @@ -155,14 +158,23 @@ public: /// $cookie: VCookie cookie; - /// $MAIN:MIME-TYPES - Table *mime_types; - /// contexts Value *self, *root, *rcontext; /// contexts WContext *wcontext; + /// main class conglomerat + VStateless_class *main_class; + + /// connection + SQL_Connection *connection; + /// table of protocol's libraries. read from $SQL:drivers + Table *protocol2library; + /// mail options + Hash *mail; + /// PCRE character tables + unsigned char *pcre_tables; + private: // core data // classes @@ -196,6 +208,11 @@ private: // defaults const String::Untaint_lang fdefault_lang; Value *default_content_type; +private: // mime types + + /// $MAIN:MIME-TYPES + Table *mime_types; + private: // lang manipulation String::Untaint_lang set_lang(String::Untaint_lang alang) { @@ -209,7 +226,7 @@ private: // lang manipulation private: - void output_result(const String& body_string, bool header_only); + void output_result(const VFile& body_file, bool header_only); }; /// Auto-object used for temporary changing Request::flang.