Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HttpResponse Class Reference

#include <HttpServer.h>

List of all members.

Public Types

enum  STATUS {
  SC_CONTINUE = 100, SC_SWITCHING_PROTOCOLS = 101, SC_OK = 200, SC_CREATED = 201,
  SC_ACCEPTED = 202, SC_NON_AUTHORITATIVE = 203, SC_NO_CONTENT = 204, SC_RESET_CONTENT = 205,
  SC_PARTIAL_CONTENT = 206, SC_MULTIPLE_CHOICES = 300, SC_MOVED_PERMANENTLY = 301, SC_FOUND = 302,
  SC_SEE_OTHER = 303, SC_NOT_MODIFIED = 304, SC_USE_PROXY = 305, SC_TEMPORARY_REDIRECT = 307,
  SC_BAD_REQUEST = 400, SC_UNAUTHORIZED = 401, SC_PAYMENT_REQUIRED = 402, SC_FORBIDDEN = 403,
  SC_NOT_FOUND = 404, SC_METHOD_NOT_ALLOWED = 405, SC_NOT_ACCEPTABLE = 406, SC_PROXY_AUTH_REQ = 407,
  SC_REQUEST_TIME_OUT = 408, SC_CONFLICT = 409, SC_GONE = 410, SC_LENGTH_REQUIRED = 411,
  SC_SERVER_ERROR = 500, SC_NOT_IMPLEMENTED = 501, SC_BAD_GATEWAY = 502, SC_SERVICE_UNAVAILABLE = 503,
  SC_GATEWAY_TIMEOUT = 504, SC_VERSION_NOT_SUPPORTED = 505
}

Public Member Functions

 HttpResponse (int status=500, const char *content=0)
 HttpResponse (const char *response)
 ~HttpResponse ()
 operator Text ()
void ParseResponse (Text request)
void ParseCookie (const char *param)
int Status () const
void SetStatus (int s)
Text Content () const
void SetContent (Text t)
void AddContent (Text t)
List< HttpParam > & GetHeaders ()
List< HttpParam > & GetCookies ()
Text GetHeader (const char *name)
void SetHeader (const char *name, const char *value)
void AddHeader (const char *name, const char *value)
Text GetCookie (const char *name)
void SetCookie (const char *name, const char *value)
void AddCookie (const char *name, const char *value)
void SendRedirect (const char *url)

Static Public Member Functions

static const char * TYPENAME ()

Detailed Description

Definition at line 133 of file HttpServer.h.


Member Enumeration Documentation

Enumerator:
SC_CONTINUE 
SC_SWITCHING_PROTOCOLS 
SC_OK 
SC_CREATED 
SC_ACCEPTED 
SC_NON_AUTHORITATIVE 
SC_NO_CONTENT 
SC_RESET_CONTENT 
SC_PARTIAL_CONTENT 
SC_MULTIPLE_CHOICES 
SC_MOVED_PERMANENTLY 
SC_FOUND 
SC_SEE_OTHER 
SC_NOT_MODIFIED 
SC_USE_PROXY 
SC_TEMPORARY_REDIRECT 
SC_BAD_REQUEST 
SC_UNAUTHORIZED 
SC_PAYMENT_REQUIRED 
SC_FORBIDDEN 
SC_NOT_FOUND 
SC_METHOD_NOT_ALLOWED 
SC_NOT_ACCEPTABLE 
SC_PROXY_AUTH_REQ 
SC_REQUEST_TIME_OUT 
SC_CONFLICT 
SC_GONE 
SC_LENGTH_REQUIRED 
SC_SERVER_ERROR 
SC_NOT_IMPLEMENTED 
SC_BAD_GATEWAY 
SC_SERVICE_UNAVAILABLE 
SC_GATEWAY_TIMEOUT 
SC_VERSION_NOT_SUPPORTED 

Definition at line 138 of file HttpServer.h.


Constructor & Destructor Documentation

HttpResponse::HttpResponse ( int  status = 500,
const char *  content = 0 
)

Definition at line 702 of file HttpServer.cpp.

HttpResponse::HttpResponse ( const char *  response)

Definition at line 706 of file HttpServer.cpp.

HttpResponse::~HttpResponse ( )

Definition at line 713 of file HttpServer.cpp.


Member Function Documentation

void HttpResponse::AddContent ( Text  t)
inline

Definition at line 194 of file HttpServer.h.

void HttpResponse::AddCookie ( const char *  name,
const char *  value 
)

Definition at line 872 of file HttpServer.cpp.

void HttpResponse::AddHeader ( const char *  name,
const char *  value 
)

Definition at line 830 of file HttpServer.cpp.

Text HttpResponse::Content ( ) const
inline

Definition at line 192 of file HttpServer.h.

Text HttpResponse::GetCookie ( const char *  name)

Definition at line 840 of file HttpServer.cpp.

List<HttpParam>& HttpResponse::GetCookies ( )
inline

Definition at line 197 of file HttpServer.h.

Text HttpResponse::GetHeader ( const char *  name)

Definition at line 798 of file HttpServer.cpp.

List<HttpParam>& HttpResponse::GetHeaders ( )
inline

Definition at line 196 of file HttpServer.h.

HttpResponse::operator Text ( )

Definition at line 721 of file HttpServer.cpp.

void HttpResponse::ParseCookie ( const char *  param)

Definition at line 947 of file HttpServer.cpp.

void HttpResponse::ParseResponse ( Text  request)

Definition at line 891 of file HttpServer.cpp.

void HttpResponse::SendRedirect ( const char *  url)

Definition at line 882 of file HttpServer.cpp.

void HttpResponse::SetContent ( Text  t)
inline

Definition at line 193 of file HttpServer.h.

void HttpResponse::SetCookie ( const char *  name,
const char *  value 
)

Definition at line 854 of file HttpServer.cpp.

void HttpResponse::SetHeader ( const char *  name,
const char *  value 
)

Definition at line 812 of file HttpServer.cpp.

void HttpResponse::SetStatus ( int  s)
inline

Definition at line 190 of file HttpServer.h.

int HttpResponse::Status ( ) const
inline

Definition at line 189 of file HttpServer.h.

static const char* HttpResponse::TYPENAME ( )
inlinestatic

Definition at line 136 of file HttpServer.h.


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