--- parser3/src/include/pa_request.h 2003/02/21 11:13:01 1.160.2.26 +++ parser3/src/include/pa_request.h 2003/03/11 08:57:36 1.160.2.35 @@ -8,7 +8,7 @@ #ifndef PA_REQUEST_H #define PA_REQUEST_H -static const char* IDENT_REQUEST_H="$Date: 2003/02/21 11:13:01 $"; +static const char* IDENT_REQUEST_H="$Date: 2003/03/11 08:57:36 $"; #include "pa_pool.h" #include "pa_request_info.h" @@ -16,12 +16,6 @@ static const char* IDENT_REQUEST_H="$Dat #include "pa_wcontext.h" #include "pa_value.h" #include "pa_stack.h" -#include "pa_vclass.h" -#include "pa_vobject.h" -#include "pa_vform.h" -#include "pa_vmail.h" -#include "pa_vresponse.h" -#include "pa_vcookie.h" #include "pa_request_info.h" #include "pa_request_charsets.h" #include "pa_sapi.h" @@ -32,7 +26,7 @@ static const char* IDENT_REQUEST_H="$Dat // consts -const uint ANTI_ENDLESS_EXECUTE_RECOURSION=500; +const uint ANTI_ENDLESS_EXECUTE_RECOURSION=1000; // defines @@ -54,6 +48,12 @@ const uint ANTI_ENDLESS_EXECUTE_RECOURSI class Temp_lang; class Methoded; class VMethodFrame; +class GdomeDOMString_auto_ptr; +class VMail; DECLARE_OBJECT_PTR(VMail); +class VForm; DECLARE_OBJECT_PTR(VForm); +class VResponse; DECLARE_OBJECT_PTR(VResponse); +class VCookie; DECLARE_OBJECT_PTR(VCookie); +class VStateless_class; DECLARE_OBJECT_PTR(VStateless_class); /// Main workhorse. class Request: public PA_Object { @@ -84,7 +84,7 @@ public: class StackItem { public: - StringPtr string() { return value->get_string(0); } + StringPtr string(Pool& pool) const { return value->get_string(&pool); } ValuePtr value; ArrayOperationPtr ops; void *ptr; @@ -106,7 +106,7 @@ public: Value *rcontext; WContext *wcontext; /// current language - uchar flang; + String_UL flang; /// current connection SQL_Connection *fconnection; //@} @@ -125,7 +125,7 @@ public: #endif Request(Pool& apool, SAPI_Info& asapi_info, Request_info& arequest_info, - uchar adefault_lang, ///< all tainted data default untainting lang + String_UL adefault_lang, ///< all tainted data default untainting lang bool status_allowed ///< status class allowed ); ~Request(); @@ -297,6 +297,26 @@ public: // status read methods } */ +#ifdef XML +public: // charset helpers + + /// @see Charset::transcode + GdomeDOMString_auto_ptr transcode(StringPtr s); + /// @see Charset::transcode + StringPtr transcode(GdomeDOMString* s +#ifndef NO_STRING_ORIGIN + , StringPtr origin +#endif + ); + /// @see Charset::transcode + StringPtr transcode(xmlChar* s +#ifndef NO_STRING_ORIGIN + , StringPtr origin +#endif + ); + +#endif + private: /// already executed some @conf method @@ -331,7 +351,7 @@ private: // execute.C private: // defaults - const uchar fdefault_lang; + const String_UL fdefault_lang; private: // mime types @@ -340,12 +360,12 @@ private: // mime types private: // lang manipulation - uchar set_lang(uchar alang) { - uchar result=flang; + String_UL set_lang(String_UL alang) { + String_UL result=flang; flang=alang; return result; } - void restore_lang(uchar alang) { + void restore_lang(String_UL alang) { flang=alang; } @@ -378,7 +398,7 @@ class Request_context_saver { Value *rcontext; WContext *wcontext; /// current language - uchar flang; + String_UL flang; /// current connection SQL_Connection *fconnection;