Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

zeus::THTTPResponse Class Reference

#include <HTTPResponse.h>

Inheritance diagram for zeus::THTTPResponse:
zeus::TAbstractHTTPData zeus::TZObject zeus::IZUnknown

List of all members.

Public Types

enum  EResponseProperty { etLocation = 0, etServer = 1, etWWWAuthenticate = 2, etRetryAfter = 3 }

Public Member Functions

 THTTPResponse (THTTProtocol::EHTTPVersion eVersion=THTTProtocol::etVersion_1_0)
virtual void reset ()
virtual Retval setResponseProperty (EResponseProperty eType, const IString &rValue)
THTTProtocol::EResponseState getState () const
void setState (THTTProtocol::EResponseState eState)
void setStateWithMessage (THTTProtocol::EResponseState eState, const IString &rMessage)
TString toString () const
bool isBinary () const
void getBinaryData (IByteArray &rData) const
void setBinaryData (const IByteArray &rData)

Static Public Member Functions

static Retval parse (const IString &rIn, THTTPResponse *&rpResponse)

Protected Member Functions

virtual ~THTTPResponse ()

Detailed Description

This class wrapps a HTTP Response object


Member Enumeration Documentation

This type defines response header fields (properties). It implements fully the HTTP 1.0 protocol (RFC1945)

Enumerator:
etLocation 
etServer 

Location field.

etWWWAuthenticate 

Server field.

etRetryAfter 

WWW-Authenticate field.


Constructor & Destructor Documentation

THTTPResponse::THTTPResponse ( THTTProtocol::EHTTPVersion  eVersion = THTTProtocol::etVersion_1_0 )

Creates a HTTP Request Object

Parameters:
eVersion: Version of the HTML response
THTTPResponse::~THTTPResponse (  ) [protected, virtual]

Destroys the HTTP Request Object


Member Function Documentation

void THTTPResponse::getBinaryData ( IByteArray rData ) const

gets the binary data

THTTProtocol::EResponseState zeus::THTTPResponse::getState (  ) const [inline]

Gets the state of the response

bool zeus::THTTPResponse::isBinary (  ) const [inline]

Checks if the content is binary

Retval THTTPResponse::parse ( const IString rIn,
THTTPResponse *&  rpResponse 
) [static]

This Method parses a incomming response

Parameters:
rIn: Input data
rpResponse: Return value
Return values:
RET_NOERROR: Parsing ok
RET_REQUEST_FAILED: wrong format
void THTTPResponse::reset (  ) [virtual]

Resets the request to default

Reimplemented from zeus::TAbstractHTTPData.

void THTTPResponse::setBinaryData ( const IByteArray rData )

returns the binary data

Retval THTTPResponse::setResponseProperty ( EResponseProperty  eType,
const IString rValue 
) [virtual]

Sets the response property values

Parameters:
eType: Type of the response property
rValue: Value of the response property
void zeus::THTTPResponse::setState ( THTTProtocol::EResponseState  eState ) [inline]

Sets the status of the response

void THTTPResponse::setStateWithMessage ( THTTProtocol::EResponseState  eState,
const IString rMessage 
)

Sets the status of the response with a message text

Parameters:
eState: New state
rMessage: Message text
TString THTTPResponse::toString (  ) const

Returns a string which contains the HTTP Request

Reimplemented from zeus::TZObject.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:28