--- parser3/src/include/pa_request.h 2001/03/13 16:38:22 1.48 +++ parser3/src/include/pa_request.h 2001/03/13 19:35:04 1.52 @@ -3,7 +3,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_request.h,v 1.48 2001/03/13 16:38:22 paf Exp $ + $Id: pa_request.h,v 1.52 2001/03/13 19:35:04 paf Exp $ */ #ifndef PA_REQUEST_H @@ -19,17 +19,6 @@ #include "pa_venv.h" #include "pa_vform.h" -#define UNNAMED_NAME "unnamed" - -#define MAIN_METHOD_NAME "main" -#define AUTO_METHOD_NAME "auto" - -#define ROOT_CLASS_NAME "ROOT" -#define MAIN_CLASS_NAME "MAIN" -#define TABLE_CLASS_NAME "table" -#define ENV_CLASS_NAME "env" -#define FORM_CLASS_NAME "form" - #ifndef NO_STRING_ORIGIN # define COMPILE_PARAMS \ const char *source, \ @@ -53,14 +42,21 @@ class Request : public Pooled { friend Temp_lang; public: - Request(Pool& apool); + Request(Pool& apool, + String::Untaint_lang alang, + + const char *adocument_root, + const char *apage_filespec + ); ~Request() {} // global classes Hash& classes() { return fclasses; } // core request processing - void core(); + char *core( + const char *sys_auto_path1, + const char *sys_auto_path2); void execute(const Array& ops); @@ -80,6 +76,10 @@ public: void write(const String& astring) { wcontext->write(astring, String::Untaint_lang::NO); // write(const) = clean } + void write_no_lang(String& astring) { + // appending, sure of clean string inside + wcontext->write(astring, String::Untaint_lang::NO); + } void write_assign_lang(Value& avalue) { // appending possible string, assigning untaint language @@ -89,6 +89,10 @@ public: // appending possible string, passing language built into string being written wcontext->write(avalue, String::Untaint_lang::PASS_APPENDED); } + void write_no_lang(Value& avalue) { + // appending sure value, no strings inside + wcontext->write(avalue, String::Untaint_lang::NO); + } void fail_if_junction_(bool is, Value& value, const String& method_name, char *msg); @@ -122,8 +126,8 @@ private: // compile.C private: // execute.C - char *execute_method(Value& aself, const Method& method, bool return_cstr); - char *execute_method(Value& aself, const String& method_name, bool return_cstr); + char *execute_method(Value& aself, const Method& method, bool return_cstr=true); + char *execute_method(Value& aself, const String& method_name, bool return_cstr=true); Value *get_element(); @@ -144,8 +148,8 @@ private: // lang manipulation private: // web - const char *document_root; - const char *page_filespec; + const char *fdocument_root; + const char *fpage_filespec; };