QwuiAbstractRessource Class Reference

This class represents a ressource that can be served by the web server. A ressource can be any type of information that can be served by a web server. Examples: an image file, a text file, some code generating HTML, etc... A ressource is identified by its MIME-type and this class provides the ressource length, its path and is able to send the ressource to an QIODevice. More...

#include <qwuiabstractressource.h>

Inheritance diagram for QwuiAbstractRessource:

QwuiBufferedRessource QwuiFileRessource QwuiMessageRessource

List of all members.

Public Member Functions

 QwuiAbstractRessource (const QString &path=QString::null)
virtual ~QwuiAbstractRessource ()
virtual QString mimeType () const =0
virtual qint64 length () const =0
virtual QString path () const
virtual bool exists () const
virtual void sendToDevice (QIODevice *dev) const =0

Private Attributes

QString m_path


Detailed Description

This class represents a ressource that can be served by the web server. A ressource can be any type of information that can be served by a web server. Examples: an image file, a text file, some code generating HTML, etc... A ressource is identified by its MIME-type and this class provides the ressource length, its path and is able to send the ressource to an QIODevice.

Constructor & Destructor Documentation

QwuiAbstractRessource::QwuiAbstractRessource ( const QString &  path = QString::null  ) 

Parameters:
path path of the ressource.

QwuiAbstractRessource::~QwuiAbstractRessource (  )  [virtual]


Member Function Documentation

virtual QString QwuiAbstractRessource::mimeType (  )  const [pure virtual]

Subclasses must provide the MIME type of the ressource like "text/html" or "image/jpeg".

Returns:
the MIME type of the ressource.

Implemented in QwuiMessageRessource, QwuiBufferedRessource, and QwuiFileRessource.

virtual qint64 QwuiAbstractRessource::length (  )  const [pure virtual]

Returns:
the length of the ressource in bytes.

Implemented in QwuiMessageRessource, QwuiBufferedRessource, and QwuiFileRessource.

QString QwuiAbstractRessource::path (  )  const [virtual]

Returns:
the path identifying the ressource. This is added to the URL by the HTTP server.

bool QwuiAbstractRessource::exists (  )  const [virtual]

Returns:
true if the ressource exists, false otherwise.

virtual void QwuiAbstractRessource::sendToDevice ( QIODevice *  dev  )  const [pure virtual]

Writes the ressource to dev

Parameters:
dev IO device to write to.

Implemented in QwuiMessageRessource, QwuiBufferedRessource, and QwuiFileRessource.


Member Data Documentation

QString QwuiAbstractRessource::m_path [private]


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

Generated on Fri Dec 19 00:31:14 2008 for QtWui : Web User Interfaces for Qt by  doxygen 1.5.6