Public Member Functions

IdcRequest Class Reference

This interface is implemented by Beesnest!
More...

#include <DcRequest.h>

Inheritance diagram for IdcRequest:
CdcRequest

List of all members.

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'.

Detailed Description

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.


Constructor & Destructor Documentation

virtual IdcRequest::~IdcRequest (  ) [inline, virtual]

Empty virtual Destructor.

Definition at line 35 of file DcRequest.h.


Member Function Documentation

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!

Parameters:
nameThe name of the field, as a BufferHolder.
Returns:
(BufferHolder) Holds the value of this field. The returned string WILL have NULL in it's end!

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!

Parameters:
nameThe name of the variable, as a BufferHolder.
Returns:
(BufferHolder) Holds the value of this variable string. The returned string WILL have NULL in its end!

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!

Parameters:
sepOptional list separator as a BufferHolder. Default value is a BufferHolder that holds pipe (|).
Returns:
(BufferHolder) Holds a list of all the request variables names. The returned string WILL have NULL in its end!

Implemented in CdcRequest.

virtual void IdcRequest::SetRequestVariable ( BufferHolder  name,
BufferHolder  value 
) [pure virtual]

Create a new request variable, or modify existing one.

Parameters:
nameThe name of the variable to create, as a BufferHolder.
valThe value of the variable, as a BufferHolder.

Implemented in CdcRequest.


The documentation for this class was generated from the following file: