Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
iweb::CCgiManager Class Reference

#include <CCgiManager.h>

Public Types

typedef QMap< QString, QString > KeyValueMap
 

Public Member Functions

 CCgiManager ()
 This constructor automatically parses the HTTP headers and data. More...
 
void AddResponseHeader (const QString &header, const QString &value)
 This method adds a response header to the instance. More...
 
QString EncodeQuery (const KeyValueMap &queryMap, const QString &pairGlue="&")
 This method encodes a query map into a query string. More...
 
QString EncodeQuery (const QVariantMap &queryMap, const QString &pairGlue="&")
 This method encodes a query variant map into a query string. More...
 
void WriteResponse ()
 This method writes the HTTP response to the browser/socket. More...
 
QString GetResponseContent () const
 This method returns the current response content in the instance. More...
 
QString GetCookie (const QString &cookieName) const
 This method returns a cookie from the instance if one exists. More...
 
const KeyValueMapGetCookies () const
 This method returns the current cookie map in the instance. More...
 
QString GetParameter (const QString &parameterName) const
 This method returns a GET/POST parameter from the instance if one exists. More...
 
const KeyValueMapGetPostData () const
 This method returns the current POST map from the instance. More...
 
const KeyValueMapGetQueryData () const
 This method returns the current GET map from the instance. More...
 
QString GetRequestHeader (const QString &requestHeaderType) const
 This method returns a request header from the instance if one exists. More...
 
const KeyValueMapGetRequestHeaders () const
 This method returns the current request header map in the instance. More...
 
void SetResponseContent (const QString &responseContent)
 This method sets the response content into the instance. More...
 
void SetResponseContentType (const QString &contentType)
 This method sets the content type header into the instance. More...
 

Static Public Attributes

static QString ContentImageGIF
 This property contains the header type for GIF. More...
 
static QString ContentImageJPEG
 This property contains the header type for JPEG. More...
 
static QString ContentImageJPG
 This property contains the header type for JPG. More...
 
static QString ContentImagePNG
 This property contains the header type for PNG. More...
 
static QString ContentImageSVG
 Thie property contains the header type for SVG. More...
 
static QString ContentImageTIFF
 This property contains the header type for TIFF. More...
 
static QString ContentFont
 This property contins the header type for FONT. More...
 
static QString ContentFontEOT
 This property contains the header type for EOT. More...
 
static QString ContentFontOTF
 This property contains the header type for OTF. More...
 
static QString ContentFontTTF
 This property contains the header type for TTF. More...
 
static QString ContentFontWOFF
 This property contains the header type for WOFF. More...
 
static QString ContentScriptECMAS
 This property contains the header type for ECMAS. More...
 
static QString ContentScriptVB
 This property contains the header type for VB. More...
 
static QString ContentTypeCSS
 This property contains the header type for CSS. More...
 
static QString ContentTypeHTML
 This property contain the header type for HTML. More...
 
static QString ContentTypeJS
 This property contains the header type for JS. More...
 
static QString ContentTypeJSON
 This property contains the header type for JSON. More...
 
static QString ContentTypeText
 This property contains the header type for TXT. More...
 
static QString ContentTypeXML
 This property contains the header type for XML. More...
 
static QString HeaderComSpec
 This property contains the COMSPEC header name. More...
 
static QString HeaderDocumentRoot
 This property contains the DOCUMENT_ROOT header name. More...
 
static QString HeaderGatewayInterface
 This proeprty contains the GATEWAY_INTERFACE header name. More...
 
static QString HeaderHttpAccept
 This property contains the HTTP_ACCEPT header name. More...
 
static QString HeaderHttpAcceptEncoding
 This property contains the HTTP_ACCEPT_ENCODING header name. More...
 
static QString HeaderHttpAcceptLanguage
 This property contains the HTTP_ACCEPT_LANGUAGE header. More...
 
static QString HeaderHttpConnection
 This property contains the HTTP_CONNECTION header name. More...
 
static QString HeaderHttpCookie
 This property contains the HTTP_COOKIE header name. More...
 
static QString HeaderHttpHost
 This property contains the HTTP_HOST header name. More...
 
static QString HeaderHttpUserAgent
 This property contains the HTTP_USER_AGENT header name. More...
 
static QString HeaderPath
 This property contains the PATH header name. More...
 
static QString HeaderQueryString
 This property contains the QUERY_STRING header name. More...
 
static QString HeaderRemoteAddress
 This property contains the REMOTE_ADDR header name. More...
 
static QString HeaderRemotePort
 This property contain the REMOTE_PORT header name. More...
 
static QString HeaderRequestMethod
 This property contains the REQUEST_METHOD header name. More...
 
static QString HeaderRequestUri
 This property contains the REQUEST_URI header name. More...
 
static QString HeaderScriptFilename
 This paragraph contains the SCRIPT_FILENAME header name. More...
 
static QString HeaderScriptName
 This property contains the SCRIPT_NAME header namr. More...
 
static QString HeaderServerAddress
 This property contains the SERVER_ADDR header name. More...
 
static QString HeaderServerAdministrator
 This property contians the SERVER_ADMIN header name. More...
 
static QString HeaderServerName
 This property contains the SERVER_NAME header name. More...
 
static QString HeaderServerPort
 This property contains the SERVER_PORT header name. More...
 
static QString HeaderServerProtocol
 This property contains the SERVER_PROTOCOL header name. More...
 
static QString HeaderServerSignature
 This property contains the SERVER_SIGNATURE header name. More...
 
static QString HeaderServerSoftware
 This property contains the SERVER_SOFTWARE header name. More...
 
static QString MethodDelete
 This property contains the DELETE data request method name. More...
 
static QString MethodGet
 This property contains the GET data request method name. More...
 
static QString MethodHead
 This property contains the HEAD data request method name. More...
 
static QString MethodPost
 This property contains the POST data request method name. More...
 
static QString MethodPut
 This property contains the PUT data request method name. More...
 

Protected Member Functions

void ProcessCookies ()
 This method processes the HTTP_COOKIE from the header. More...
 
void ProcessGet ()
 This method processes the QUERY_STRING from the header. More...
 
void ProcessHeaders ()
 This method processes the request headers into the instance. More...
 
void ProcessPost ()
 This method processes the POST data into the instance. More...
 
void SendResponseContent ()
 This method writes the content to the browser/socket/stream. More...
 
void SendHeaders ()
 This method writes the response headers to the browser/socket/stream. More...
 
KeyValueMap DecodeQuery (const QString &query, const QString &pairSeparator="&")
 This method decodes a query string into a query map. More...
 

Detailed Description

Definition at line 18 of file CCgiManager.h.

Member Typedef Documentation

typedef QMap<QString, QString> iweb::CCgiManager::KeyValueMap

Definition at line 21 of file CCgiManager.h.

Constructor & Destructor Documentation

iweb::CCgiManager::CCgiManager ( )

This constructor automatically parses the HTTP headers and data.

Member Function Documentation

void iweb::CCgiManager::AddResponseHeader ( const QString &  header,
const QString &  value 
)

This method adds a response header to the instance.

KeyValueMap iweb::CCgiManager::DecodeQuery ( const QString &  query,
const QString &  pairSeparator = "&" 
)
protected

This method decodes a query string into a query map.

QString iweb::CCgiManager::EncodeQuery ( const KeyValueMap queryMap,
const QString &  pairGlue = "&" 
)

This method encodes a query map into a query string.

QString iweb::CCgiManager::EncodeQuery ( const QVariantMap &  queryMap,
const QString &  pairGlue = "&" 
)

This method encodes a query variant map into a query string.

QString iweb::CCgiManager::GetCookie ( const QString &  cookieName) const

This method returns a cookie from the instance if one exists.

const KeyValueMap& iweb::CCgiManager::GetCookies ( ) const

This method returns the current cookie map in the instance.

QString iweb::CCgiManager::GetParameter ( const QString &  parameterName) const

This method returns a GET/POST parameter from the instance if one exists.

const KeyValueMap& iweb::CCgiManager::GetPostData ( ) const

This method returns the current POST map from the instance.

const KeyValueMap& iweb::CCgiManager::GetQueryData ( ) const

This method returns the current GET map from the instance.

QString iweb::CCgiManager::GetRequestHeader ( const QString &  requestHeaderType) const

This method returns a request header from the instance if one exists.

const KeyValueMap& iweb::CCgiManager::GetRequestHeaders ( ) const

This method returns the current request header map in the instance.

QString iweb::CCgiManager::GetResponseContent ( ) const

This method returns the current response content in the instance.

void iweb::CCgiManager::ProcessCookies ( )
protected

This method processes the HTTP_COOKIE from the header.

void iweb::CCgiManager::ProcessGet ( )
protected

This method processes the QUERY_STRING from the header.

void iweb::CCgiManager::ProcessHeaders ( )
protected

This method processes the request headers into the instance.

void iweb::CCgiManager::ProcessPost ( )
protected

This method processes the POST data into the instance.

void iweb::CCgiManager::SendHeaders ( )
protected

This method writes the response headers to the browser/socket/stream.

void iweb::CCgiManager::SendResponseContent ( )
protected

This method writes the content to the browser/socket/stream.

void iweb::CCgiManager::SetResponseContent ( const QString &  responseContent)

This method sets the response content into the instance.

void iweb::CCgiManager::SetResponseContentType ( const QString &  contentType)

This method sets the content type header into the instance.

void iweb::CCgiManager::WriteResponse ( )

This method writes the HTTP response to the browser/socket.

Member Data Documentation

QString iweb::CCgiManager::ContentFont
static

This property contins the header type for FONT.

Definition at line 56 of file CCgiManager.h.

QString iweb::CCgiManager::ContentFontEOT
static

This property contains the header type for EOT.

Definition at line 61 of file CCgiManager.h.

QString iweb::CCgiManager::ContentFontOTF
static

This property contains the header type for OTF.

Definition at line 66 of file CCgiManager.h.

QString iweb::CCgiManager::ContentFontTTF
static

This property contains the header type for TTF.

Definition at line 71 of file CCgiManager.h.

QString iweb::CCgiManager::ContentFontWOFF
static

This property contains the header type for WOFF.

Definition at line 76 of file CCgiManager.h.

QString iweb::CCgiManager::ContentImageGIF
static

This property contains the header type for GIF.

Definition at line 26 of file CCgiManager.h.

QString iweb::CCgiManager::ContentImageJPEG
static

This property contains the header type for JPEG.

Definition at line 31 of file CCgiManager.h.

QString iweb::CCgiManager::ContentImageJPG
static

This property contains the header type for JPG.

Definition at line 36 of file CCgiManager.h.

QString iweb::CCgiManager::ContentImagePNG
static

This property contains the header type for PNG.

Definition at line 41 of file CCgiManager.h.

QString iweb::CCgiManager::ContentImageSVG
static

Thie property contains the header type for SVG.

Definition at line 46 of file CCgiManager.h.

QString iweb::CCgiManager::ContentImageTIFF
static

This property contains the header type for TIFF.

Definition at line 51 of file CCgiManager.h.

QString iweb::CCgiManager::ContentScriptECMAS
static

This property contains the header type for ECMAS.

Definition at line 81 of file CCgiManager.h.

QString iweb::CCgiManager::ContentScriptVB
static

This property contains the header type for VB.

Definition at line 86 of file CCgiManager.h.

QString iweb::CCgiManager::ContentTypeCSS
static

This property contains the header type for CSS.

Definition at line 91 of file CCgiManager.h.

QString iweb::CCgiManager::ContentTypeHTML
static

This property contain the header type for HTML.

Definition at line 96 of file CCgiManager.h.

QString iweb::CCgiManager::ContentTypeJS
static

This property contains the header type for JS.

Definition at line 101 of file CCgiManager.h.

QString iweb::CCgiManager::ContentTypeJSON
static

This property contains the header type for JSON.

Definition at line 106 of file CCgiManager.h.

QString iweb::CCgiManager::ContentTypeText
static

This property contains the header type for TXT.

Definition at line 111 of file CCgiManager.h.

QString iweb::CCgiManager::ContentTypeXML
static

This property contains the header type for XML.

Definition at line 116 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderComSpec
static

This property contains the COMSPEC header name.

Definition at line 121 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderDocumentRoot
static

This property contains the DOCUMENT_ROOT header name.

Definition at line 126 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderGatewayInterface
static

This proeprty contains the GATEWAY_INTERFACE header name.

Definition at line 131 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderHttpAccept
static

This property contains the HTTP_ACCEPT header name.

Definition at line 136 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderHttpAcceptEncoding
static

This property contains the HTTP_ACCEPT_ENCODING header name.

Definition at line 141 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderHttpAcceptLanguage
static

This property contains the HTTP_ACCEPT_LANGUAGE header.

Definition at line 146 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderHttpConnection
static

This property contains the HTTP_CONNECTION header name.

Definition at line 151 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderHttpCookie
static

This property contains the HTTP_COOKIE header name.

Definition at line 156 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderHttpHost
static

This property contains the HTTP_HOST header name.

Definition at line 161 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderHttpUserAgent
static

This property contains the HTTP_USER_AGENT header name.

Definition at line 166 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderPath
static

This property contains the PATH header name.

Definition at line 171 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderQueryString
static

This property contains the QUERY_STRING header name.

Definition at line 176 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderRemoteAddress
static

This property contains the REMOTE_ADDR header name.

Definition at line 181 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderRemotePort
static

This property contain the REMOTE_PORT header name.

Definition at line 186 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderRequestMethod
static

This property contains the REQUEST_METHOD header name.

Definition at line 191 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderRequestUri
static

This property contains the REQUEST_URI header name.

Definition at line 196 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderScriptFilename
static

This paragraph contains the SCRIPT_FILENAME header name.

Definition at line 201 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderScriptName
static

This property contains the SCRIPT_NAME header namr.

Definition at line 206 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderServerAddress
static

This property contains the SERVER_ADDR header name.

Definition at line 211 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderServerAdministrator
static

This property contians the SERVER_ADMIN header name.

Definition at line 216 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderServerName
static

This property contains the SERVER_NAME header name.

Definition at line 221 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderServerPort
static

This property contains the SERVER_PORT header name.

Definition at line 226 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderServerProtocol
static

This property contains the SERVER_PROTOCOL header name.

Definition at line 231 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderServerSignature
static

This property contains the SERVER_SIGNATURE header name.

Definition at line 236 of file CCgiManager.h.

QString iweb::CCgiManager::HeaderServerSoftware
static

This property contains the SERVER_SOFTWARE header name.

Definition at line 241 of file CCgiManager.h.

QString iweb::CCgiManager::MethodDelete
static

This property contains the DELETE data request method name.

Definition at line 246 of file CCgiManager.h.

QString iweb::CCgiManager::MethodGet
static

This property contains the GET data request method name.

Definition at line 251 of file CCgiManager.h.

QString iweb::CCgiManager::MethodHead
static

This property contains the HEAD data request method name.

Definition at line 256 of file CCgiManager.h.

QString iweb::CCgiManager::MethodPost
static

This property contains the POST data request method name.

Definition at line 261 of file CCgiManager.h.

QString iweb::CCgiManager::MethodPut
static

This property contains the PUT data request method name.

Definition at line 266 of file CCgiManager.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy