PTLib  Version 2.10.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PHTTPConnectionInfo Class Reference

This object describes the connectiono associated with a HyperText Transport Protocol request. More...

#include <http.h>

Inheritance diagram for PHTTPConnectionInfo:
PObject

Public Member Functions

 PHTTPConnectionInfo ()
PHTTP::Commands GetCommandCode () const
const PStringGetCommandName () const
const PURLGetURL () const
const PMIMEInfoGetMIME () const
void SetMIME (const PString &tag, const PString &value)
PBoolean IsCompatible (int major, int minor) const
bool IsPersistent () const
bool WasPersistent () const
bool IsProxyConnection () const
int GetMajorVersion () const
int GetMinorVersion () const
long GetEntityBodyLength () const
PTimeInterval GetPersistenceTimeout () const
 Get the maximum time a persistent connection may persist.
void SetPersistenceTimeout (const PTimeInterval &t)
 Set the maximum time a persistent connection may persist.
unsigned GetPersistenceMaximumTransations () const
 Get the maximum number of transations (GET/POST etc) for persistent connection.
void SetPersistenceMaximumTransations (unsigned m)
 Set the maximum number of transations (GET/POST etc) for persistent connection.
const PMultiPartListGetMultipartFormInfo () const
void ResetMultipartFormInfo ()
PString GetEntityBody () const
- Public Member Functions inherited from PObject
virtual ~PObject ()
virtual PObjectClone () const
 Create a copy of the class on the heap.
virtual PINDEX HashFunction () const
 This function yields a hash value required by the PDictionary class.
virtual Comparison Compare (const PObject &obj) const
 Compare the two objects and return their relative rank.
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
 Determine the byte wise comparison of two objects.
bool operator== (const PObject &obj) const
 Compare the two objects.
bool operator!= (const PObject &obj) const
 Compare the two objects.
bool operator< (const PObject &obj) const
 Compare the two objects.
bool operator> (const PObject &obj) const
 Compare the two objects.
bool operator<= (const PObject &obj) const
 Compare the two objects.
bool operator>= (const PObject &obj) const
 Compare the two objects.
virtual const char * GetClass (unsigned ancestor=0) const
 Get the current dynamic type of the object instance.
PBoolean IsClass (const char *cls) const
virtual PBoolean InternalIsDescendant (const char *clsName) const
 Determine if the dynamic type of the current instance is a descendent of the specified class.
virtual void PrintOn (ostream &strm) const
 Output the contents of the object to the stream.
virtual void ReadFrom (istream &strm)
 Input the contents of the object from the stream.

Protected Member Functions

PBoolean Initialise (PHTTPServer &server, PString &args)
bool DecodeMultipartFormInfo ()
- Protected Member Functions inherited from PObject
 PObject ()
 Constructor for PObject, made protected so cannot ever create one on its own.

Protected Attributes

PHTTP::Commands commandCode
PString commandName
PURL url
PMIMEInfo mimeInfo
bool isPersistent
bool wasPersistent
bool isProxyConnection
int majorVersion
int minorVersion
PString entityBody
long entityBodyLength
PTimeInterval persistenceTimeout
unsigned persistenceMaximum
PMultiPartList m_multipartFormInfo

Additional Inherited Members

- Public Types inherited from PObject
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
 Result of the comparison operation performed by the Compare() function. More...
- Static Public Member Functions inherited from PObject
static Comparison InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size)
 Internal function caled from CompareObjectMemoryDirect()
static const char * Class ()
 Get the name of the class as a C string.
- Friends inherited from PObject

Detailed Description

This object describes the connectiono associated with a HyperText Transport Protocol request.

This information is required by handler functions on PHTTPResource descendant classes to manage the connection correctly.

Constructor & Destructor Documentation

PHTTPConnectionInfo::PHTTPConnectionInfo ( )

Member Function Documentation

bool PHTTPConnectionInfo::DecodeMultipartFormInfo ( )
inlineprotected
PHTTP::Commands PHTTPConnectionInfo::GetCommandCode ( ) const
inline

References commandCode.

const PString& PHTTPConnectionInfo::GetCommandName ( ) const
inline

References commandName.

PString PHTTPConnectionInfo::GetEntityBody ( ) const
inline

References entityBody.

long PHTTPConnectionInfo::GetEntityBodyLength ( ) const
inline

References entityBodyLength.

int PHTTPConnectionInfo::GetMajorVersion ( ) const
inline

References majorVersion.

const PMIMEInfo& PHTTPConnectionInfo::GetMIME ( ) const
inline

References mimeInfo.

int PHTTPConnectionInfo::GetMinorVersion ( ) const
inline

References minorVersion.

const PMultiPartList& PHTTPConnectionInfo::GetMultipartFormInfo ( ) const
inline

References m_multipartFormInfo.

unsigned PHTTPConnectionInfo::GetPersistenceMaximumTransations ( ) const
inline

Get the maximum number of transations (GET/POST etc) for persistent connection.

If this is zero then there is no maximum.

References persistenceMaximum.

PTimeInterval PHTTPConnectionInfo::GetPersistenceTimeout ( ) const
inline

Get the maximum time a persistent connection may persist.

References persistenceTimeout.

const PURL& PHTTPConnectionInfo::GetURL ( ) const
inline

References url.

PBoolean PHTTPConnectionInfo::Initialise ( PHTTPServer server,
PString args 
)
protected
PBoolean PHTTPConnectionInfo::IsCompatible ( int  major,
int  minor 
) const
bool PHTTPConnectionInfo::IsPersistent ( ) const
inline

References isPersistent.

bool PHTTPConnectionInfo::IsProxyConnection ( ) const
inline

References isProxyConnection.

void PHTTPConnectionInfo::ResetMultipartFormInfo ( )
inline
void PHTTPConnectionInfo::SetMIME ( const PString tag,
const PString value 
)
void PHTTPConnectionInfo::SetPersistenceMaximumTransations ( unsigned  m)
inline

Set the maximum number of transations (GET/POST etc) for persistent connection.

If this is zero then there is no maximum.

References persistenceMaximum.

void PHTTPConnectionInfo::SetPersistenceTimeout ( const PTimeInterval t)
inline

Set the maximum time a persistent connection may persist.

References persistenceTimeout.

bool PHTTPConnectionInfo::WasPersistent ( ) const
inline

References wasPersistent.

Member Data Documentation

PHTTP::Commands PHTTPConnectionInfo::commandCode
protected

Referenced by GetCommandCode().

PString PHTTPConnectionInfo::commandName
protected

Referenced by GetCommandName().

PString PHTTPConnectionInfo::entityBody
protected
long PHTTPConnectionInfo::entityBodyLength
protected

Referenced by GetEntityBodyLength().

bool PHTTPConnectionInfo::isPersistent
protected

Referenced by IsPersistent().

bool PHTTPConnectionInfo::isProxyConnection
protected

Referenced by IsProxyConnection().

PMultiPartList PHTTPConnectionInfo::m_multipartFormInfo
protected
int PHTTPConnectionInfo::majorVersion
protected

Referenced by GetMajorVersion().

PMIMEInfo PHTTPConnectionInfo::mimeInfo
protected

Referenced by DecodeMultipartFormInfo(), and GetMIME().

int PHTTPConnectionInfo::minorVersion
protected

Referenced by GetMinorVersion().

unsigned PHTTPConnectionInfo::persistenceMaximum
protected
PTimeInterval PHTTPConnectionInfo::persistenceTimeout
protected
PURL PHTTPConnectionInfo::url
protected

Referenced by GetURL().

bool PHTTPConnectionInfo::wasPersistent
protected

Referenced by WasPersistent().


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