Abstract web request processor. More...
#include <>>
Public Member Functions | |
WebRequestProcessor (bool handles_session_data=false) | |
Constructor. | |
virtual | ~WebRequestProcessor () |
Virtual empty destructor. | |
virtual WebReply * | process_request (const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **session_data)=0 |
Process a request. | |
bool | handles_session_data () const |
Check if processor handles session data by itself. |
Abstract web request processor.
Interface used to define web request processor that can be registered to the WebRequestDispatcher.
Definition at line 32 of file request_processor.h.
fawkes::WebRequestProcessor::WebRequestProcessor | ( | bool | handles_session_data = false |
) |
Constructor.
handles_session_data | set to true, if you handle the session_data field passed into process_request() by yourself. The method will then be called multiple times. On the first iteration, you must set *session_data to a non-NULL value and return NULL. Only on the second call you produce the real reply. |
Definition at line 63 of file request_processor.cpp.
fawkes::WebRequestProcessor::~WebRequestProcessor | ( | ) | [virtual] |
Virtual empty destructor.
Definition at line 69 of file request_processor.cpp.
bool fawkes::WebRequestProcessor::handles_session_data | ( | ) | const |
Check if processor handles session data by itself.
Read constructor information for detailed information.
Definition at line 79 of file request_processor.cpp.
Referenced by fawkes::WebRequestDispatcher::process_request().
WebReply * fawkes::WebRequestProcessor::process_request | ( | const char * | url, | |
const char * | method, | |||
const char * | version, | |||
const char * | upload_data, | |||
size_t * | upload_data_size, | |||
void ** | session_data | |||
) | [pure virtual] |
Process a request.
url | URL, may contain escape sequences | |
method | HTTP method | |
version | HTTP version | |
upload_data | uploaded data | |
upload_data_size | size of upload_data parameter | |
session_data | session data pointer |
Implemented in WebviewBlackBoardRequestProcessor, WebviewPluginsRequestProcessor, WebviewStartPageRequestProcessor, WebviewStaticRequestProcessor, and XmlRpcRequestProcessor.
Referenced by fawkes::WebRequestDispatcher::process_request().