QwuiAbstractResourceProvider Class Reference

A resource provider is a class that builds a QwuiAbstractResource for a given HTTP request. This class represents an HTTP session and provides only the session management informations to subclasses. Subclasses must implement the provide() method to return a QwuiAbstractResource corresponding to the given HTTP request. More...

#include <qwuiabstractresourceprovider.h>

Inheritance diagram for QwuiAbstractResourceProvider:
QwuiApplication QwuiFileResourceProvider

List of all members.

Public Member Functions

 QwuiAbstractResourceProvider (const QString &sessionId=QString::null)
virtual ~QwuiAbstractResourceProvider ()
virtual QwuiAbstractResourceprovide (const QHttpRequestHeader &header, const QString &postContent)=0
QString sessionId () const
bool keepSessions () const
void setKeepSessions (bool keep)
QDateTime sessionTimeoutDate () const
void resetSessionTimeoutDate ()
bool isSessionTimedOut () const
int sessionLifeTime () const
void setSessionLifeTime (int secs)

Private Attributes

bool m_keepSessions
QDateTime m_sessionTimeoutDate
int m_sessionLifeTime
QString m_sessionId

Detailed Description

A resource provider is a class that builds a QwuiAbstractResource for a given HTTP request. This class represents an HTTP session and provides only the session management informations to subclasses. Subclasses must implement the provide() method to return a QwuiAbstractResource corresponding to the given HTTP request.


Constructor & Destructor Documentation

QwuiAbstractResourceProvider::QwuiAbstractResourceProvider ( const QString &  sessionId = QString::null  ) 
Parameters:
sessionId session ID for this resource provider.
QwuiAbstractResourceProvider::~QwuiAbstractResourceProvider (  )  [virtual]

Member Function Documentation

bool QwuiAbstractResourceProvider::isSessionTimedOut (  )  const
Returns:
true if the session timed out, false otherwise.
bool QwuiAbstractResourceProvider::keepSessions (  )  const
Returns:
true if the session must be kept between HTTP requests of the same object, false otherwise.
virtual QwuiAbstractResource* QwuiAbstractResourceProvider::provide ( const QHttpRequestHeader &  header,
const QString &  postContent 
) [pure virtual]

Subclasses must implement this method and return a QwuiAbstractResource object corresponding to the HTTP request.

Parameters:
header HTTP request header
postContent HTTP post content.
Returns:
a QwuiAbstractResource object corresponding to the HTTP request.

Implemented in QwuiApplication, and QwuiFileResourceProvider.

void QwuiAbstractResourceProvider::resetSessionTimeoutDate (  ) 

Resets the session time-out date.

QString QwuiAbstractResourceProvider::sessionId (  )  const
Returns:
the current session identifier.
int QwuiAbstractResourceProvider::sessionLifeTime (  )  const
Returns:
session lifetime in seconds.
QDateTime QwuiAbstractResourceProvider::sessionTimeoutDate (  )  const
Returns:
the session time-out date.
void QwuiAbstractResourceProvider::setKeepSessions ( bool  keep  ) 
Parameters:
keep true if the session must be kept between HTTP requests of the same object, false otherwise.
void QwuiAbstractResourceProvider::setSessionLifeTime ( int  secs  ) 
Parameters:
secs session lifetime in seconds.

Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Fri Jun 4 01:18:58 2010 for QtWui : Web User Interfaces for Qt by  doxygen 1.6.3