added: to Request:
// used as a JSON output (when ajax_serializer is defined) // it will be serialized and have at least: // 'content' string - the whole html content // 'http_status' integer - http status code (e.g. 200) PT::Space ajax; // if not null then the request will have a JSON as an output PT::SpaceToJSON * ajax_serializer; git-svn-id: svn://ttmath.org/publicrep/winix/trunk@871 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -20,6 +20,9 @@
|
||||
#include "textstream.h"
|
||||
#include "templates/htmltextstream.h"
|
||||
#include "date/date.h"
|
||||
#include "space/space.h"
|
||||
#include "space/spacetojson.h"
|
||||
|
||||
|
||||
|
||||
class FunctionBase;
|
||||
@@ -43,6 +46,7 @@ struct Request
|
||||
//std::ostringstream headers, page, debug;
|
||||
TextStream<std::string> headers;
|
||||
HtmlTextStream page, debug;
|
||||
TextStream<std::wstring> ajaxpage;
|
||||
|
||||
// if set to true then the standard template system will not be generated
|
||||
// default: false
|
||||
@@ -122,7 +126,7 @@ struct Request
|
||||
// send header X-LIGHTTPD-send-file with path to a file
|
||||
std::wstring x_sendfile;
|
||||
|
||||
// send as attachment (causing header: content-disposition: attachment)
|
||||
// send as attachment (causes header: content-disposition: attachment)
|
||||
bool send_as_attachment;
|
||||
|
||||
// this is a pointer either to the item (if exists) or to the last directory
|
||||
@@ -138,6 +142,14 @@ struct Request
|
||||
// subdomain = HTTP_HOST environment variable - config->base_url
|
||||
std::wstring subdomain;
|
||||
|
||||
// used as a JSON output (when ajax_serializer is defined)
|
||||
// it will be serialized and have at least:
|
||||
// 'content' string - the whole html content
|
||||
// 'http_status' integer - http status code (e.g. 200)
|
||||
PT::Space ajax;
|
||||
|
||||
// if not null then the request will have a JSON as an output
|
||||
PT::SpaceToJSON * ajax_serializer;
|
||||
|
||||
|
||||
Request();
|
||||
@@ -184,6 +196,9 @@ private:
|
||||
|
||||
// used in ParamValue() and PostVar() when there is no such a param
|
||||
const std::wstring str_empty;
|
||||
|
||||
void ClearAjax();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user