PixelLightAPI  .
Public Member Functions | Protected Attributes
PLCore::HttpHeader Class Reference

HTTP header. More...

#include <HttpHeader.h>

List of all members.

Public Member Functions

PLCORE_API HttpHeader ()
 Constructor.
PLCORE_API HttpHeader (const HttpHeader &cSource)
 Copy constructor.
 ~HttpHeader ()
 Destructor.
PLCORE_API HttpHeaderoperator= (const HttpHeader &cSource)
 Assignment operator.
PLCORE_API void Clear ()
 Clear header.
PLCORE_API bool IsComplete () const
 Check if HTTP header is complete.
const Container< String > & GetEntries () const
 Get header entries.
void AddEntry (const String &sEntry)
 Add entry.
PLCORE_API void Parse ()
 Parse header.
PLCORE_API void Print (bool bRaw=false) const
 Print header entries to console.
EHttpProtocol GetProtocol () const
 Get protocol version.
EHttpMessageType GetMessageType () const
 Get message type.
EHttpRequest GetRequest () const
 Get request.
PLCORE_API String GetRequestString () const
 Get request as string.
String GetRequestUrl () const
 Get request URL.
EHttpConnection GetConnectionType () const
 Get connection type.
uint32 GetStatusCode () const
 Get status code.
String GetStatusString () const
 Get status string.
String GetLocation () const
 Get location.
String GetDate () const
 Get date.
String GetServer () const
 Get server signature.
String GetUserAgent () const
 Get client signature.
EHttpAuth GetAuthenticationType () const
 Get authentication type.
String GetAuthenticationRealm () const
 Get authentication realm.
String GetAuthorization () const
 Get authorization string.
String GetTransferEncoding () const
 Get transfer encoding.
bool IsChunked () const
 Check if data is transfered "chunked".
uint32 GetContentLength () const
 Get content length.
String GetContentLanguage () const
 Get content language.
String GetContentType () const
 Get content type.
String GetETag () const
 Get ETag.
bool IsPartial () const
 Check if partial data is returned.
uint32 GetRangeMin () const
 Get start of range.
uint32 GetRangeMax () const
 Get end of range.
uint32 GetRangeTotal () const
 Get total size.

Protected Attributes

Array< Stringm_lstEntries
EHttpProtocol m_nProtocol
EHttpMessageType m_nMessageType
EHttpRequest m_nRequest
String m_sRequestUrl
EHttpConnection m_nConnection
EHttpStatus m_nStatusCode
String m_sStatusString
String m_sLocation
String m_sDate
String m_sServer
String m_sUserAgent
EHttpAuth m_nAuthType
String m_sAuthRealm
String m_sAuthorization
String m_sTransferEncoding
uint32 m_nContentLength
String m_sContentLanguage
String m_sContentType
String m_sETag
bool m_bPartial
uint32 m_nRangeMin
uint32 m_nRangeMax
uint32 m_nRangeTotal

Detailed Description

HTTP header.


Constructor & Destructor Documentation

PLCORE_API PLCore::HttpHeader::HttpHeader ( const HttpHeader cSource)

Copy constructor.

Parameters:
[in]cSourceHTTP header

Destructor.


Member Function Documentation

PLCORE_API HttpHeader& PLCore::HttpHeader::operator= ( const HttpHeader cSource)

Assignment operator.

Parameters:
[in]cSourceHTTP header
Returns:
Reference to this header
PLCORE_API void PLCore::HttpHeader::Clear ( )

Clear header.

PLCORE_API bool PLCore::HttpHeader::IsComplete ( ) const

Check if HTTP header is complete.

Returns:
'true' if header is complete, else 'false'
const Container< String > & PLCore::HttpHeader::GetEntries ( ) const [inline]

Get header entries.

Returns:
List of header entries
void PLCore::HttpHeader::AddEntry ( const String sEntry) [inline]

Add entry.

Add header entry.

Parameters:
[in]sEntryHeader entry
PLCORE_API void PLCore::HttpHeader::Parse ( )

Parse header.

Remarks:
This function will parse and interpret all header entries. Call this function after you have received the header, then you can access the parsed information via their get-methods (GetSize(), GetContentType(), etc.)
PLCORE_API void PLCore::HttpHeader::Print ( bool  bRaw = false) const

Print header entries to console.

Parameters:
[in]bRawIf 'true', all header entries will be printed out, otherwise only those which are known by this implementation

Get protocol version.

Returns:
HTTP Protocol version
Remarks:
To access this information, Parse() has to be called first

Get message type.

Returns:
HTTP message type (request or response)
Remarks:
To access this information, Parse() has to be called first

Get request.

Returns:
HTTP request type
Remarks:
To access this information, Parse() has to be called first

Get request as string.

Returns:
HTTP request type
Remarks:
To access this information, Parse() has to be called first

Get request URL.

Returns:
HTTP request URL
Remarks:
To access this information, Parse() has to be called first

Get connection type.

Returns:
HTTP connection type
Remarks:
To access this information, Parse() has to be called first
uint32 PLCore::HttpHeader::GetStatusCode ( ) const [inline]

Get status code.

Returns:
Status code
Remarks:
To access this information, Parse() has to be called first

Get status string.

Returns:
Status string
Remarks:
To access this information, Parse() has to be called first

Get location.

Returns:
Location
Remarks:
To access this information, Parse() has to be called first
String PLCore::HttpHeader::GetDate ( ) const [inline]

Get date.

Returns:
Date
Remarks:
To access this information, Parse() has to be called first

Get server signature.

Returns:
Server signature
Remarks:
To access this information, Parse() has to be called first

Get client signature.

Returns:
Client signature
Remarks:
To access this information, Parse() has to be called first

Get authentication type.

Returns:
Authentication type
Remarks:
To access this information, Parse() has to be called first

Get authentication realm.

Returns:
Authentication realm
Remarks:
To access this information, Parse() has to be called first

Get authorization string.

Returns:
Authorization string
Remarks:
To access this information, Parse() has to be called first

Get transfer encoding.

Returns:
Transfer encoding
Remarks:
To access this information, Parse() has to be called first
bool PLCore::HttpHeader::IsChunked ( ) const [inline]

Check if data is transfered "chunked".

Returns:
'true' if transfer encoding is "chunked", else 'false'
Remarks:
To access this information, Parse() has to be called first
uint32 PLCore::HttpHeader::GetContentLength ( ) const [inline]

Get content length.

Returns:
Content length
Remarks:
To access this information, Parse() has to be called first

Get content language.

Returns:
Content language
Remarks:
To access this information, Parse() has to be called first

Get content type.

Returns:
Content type
Remarks:
To access this information, Parse() has to be called first
String PLCore::HttpHeader::GetETag ( ) const [inline]

Get ETag.

Returns:
ETag for content
Remarks:
To access this information, Parse() has to be called first
bool PLCore::HttpHeader::IsPartial ( ) const [inline]

Check if partial data is returned.

Returns:
'true' if partial data is returned, else 'false'
Remarks:
To access this information, Parse() has to be called first
uint32 PLCore::HttpHeader::GetRangeMin ( ) const [inline]

Get start of range.

Returns:
Byte position
Remarks:
To access this information, Parse() has to be called first
uint32 PLCore::HttpHeader::GetRangeMax ( ) const [inline]

Get end of range.

Returns:
Byte position
Remarks:
To access this information, Parse() has to be called first
uint32 PLCore::HttpHeader::GetRangeTotal ( ) const [inline]

Get total size.

Returns:
Size
Remarks:
To access this information, Parse() has to be called first

Member Data Documentation

Header entries

HTTP protocol version

Message type (request or response)

Request type

Request URL

Connection type (Close or KeepAlive)

Status code

Status string

Location

Date

Server signature

Client signature

Authentication type

Authentication realm

Authorization string

Transfer encoding

Content size

Content language

Content type (MIME type)

ETag (identifier for content)

Partial download?

uint32 PLCore::HttpHeader::m_nRangeMin [protected]

Start of range (for partial content)

uint32 PLCore::HttpHeader::m_nRangeMax [protected]

End of range (for partial content)

Total size (for partial content)


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:15
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported