This interface is implemented by Beesnest!
More...
#include <DcRequest.h>
Public Member Functions | |
virtual | ~IdcRequest () |
Empty virtual Destructor. | |
virtual BufferHolder | GetRequestHeader (BufferHolder name) const =0 |
Return a BufferHolder of a request header value, or of an empty string if it cannot find the header field name. | |
virtual BufferHolder | GetRequestVariable (BufferHolder name) const =0 |
Returns a BufferHolder of a request variables values, or of an empty string if it cannot find the variable name. | |
virtual void | SetRequestVariable (BufferHolder name, BufferHolder value)=0 |
Create a new request variable, or modify existing one. | |
virtual BufferHolder | GetRequestVarsNamesList (BufferHolder sep=BufferHolder("|"))=0 |
Return a list (string) of all the request variables names, the list is separated by the string 'sep'. |
This interface is implemented by Beesnest!
This abstract class is the interface for CdcRequest. IdcEngine will use this interface, so a script will be able use some of the request features. A script should be able to read the request headers, get request variables, get a list of all the request variables names (if need to pass all vars to other page) and set a new request variable. The last option forms a way that different scripts on the same page can communicate (pass data from the earlier script to the later one). This communication is possible also between different types of scripts (different script language).
All interfaces uses BufferHolder to pass strings or buffers.
Definition at line 28 of file DcRequest.h.
virtual IdcRequest::~IdcRequest | ( | ) | [inline, virtual] |
Empty virtual Destructor.
Definition at line 35 of file DcRequest.h.
virtual BufferHolder IdcRequest::GetRequestHeader | ( | BufferHolder | name ) | const [pure virtual] |
Return a BufferHolder of a request header value, or of an empty string if it cannot find the header field name.
Case insensitive.
NOTE: Do not try to change the returned string!
name | The name of the field, as a BufferHolder. |
Implemented in CdcRequest.
virtual BufferHolder IdcRequest::GetRequestVariable | ( | BufferHolder | name ) | const [pure virtual] |
Returns a BufferHolder of a request variables values, or of an empty string if it cannot find the variable name.
Case sensitive
NOTE: Do not try to change the returned string!
name | The name of the variable, as a BufferHolder. |
Implemented in CdcRequest.
virtual BufferHolder IdcRequest::GetRequestVarsNamesList | ( | BufferHolder | sep = BufferHolder("|") ) |
[pure virtual] |
Return a list (string) of all the request variables names, the list is separated by the string 'sep'.
If 'sep' starts with an "H", the returned list will be the request headers names (w/o the "H" in the beginning of 'sep').
NOTE: Do not try to change the returned string!
sep | Optional list separator as a BufferHolder. Default value is a BufferHolder that holds pipe (|). |
Implemented in CdcRequest.
virtual void IdcRequest::SetRequestVariable | ( | BufferHolder | name, |
BufferHolder | value | ||
) | [pure virtual] |
Create a new request variable, or modify existing one.
name | The name of the variable to create, as a BufferHolder. |
val | The value of the variable, as a BufferHolder. |
Implemented in CdcRequest.