QwuiAbstractResource Class Reference

This class represents a resource that can be served by the web server. A resource 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 resource is identified by its MIME-type and this class provides the resource length, its path and is able to send the resource to an QIODevice. More...

#include <qwuiabstractresource.h>

Inheritance diagram for QwuiAbstractResource:
QwuiBufferedResource QwuiFileResource QwuiMessageResource

List of all members.

Public Member Functions

 QwuiAbstractResource (const QString &path=QString::null)
virtual ~QwuiAbstractResource ()
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 resource that can be served by the web server. A resource 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 resource is identified by its MIME-type and this class provides the resource length, its path and is able to send the resource to an QIODevice.


Constructor & Destructor Documentation

QwuiAbstractResource::QwuiAbstractResource ( const QString &  path = QString::null  ) 
Parameters:
path path of the resource.
QwuiAbstractResource::~QwuiAbstractResource (  )  [virtual]

Member Function Documentation

bool QwuiAbstractResource::exists (  )  const [virtual]
Returns:
true if the resource exists, false otherwise.
virtual qint64 QwuiAbstractResource::length (  )  const [pure virtual]
Returns:
the length of the resource in bytes.

Implemented in QwuiMessageResource, QwuiBufferedResource, and QwuiFileResource.

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

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

Returns:
the MIME type of the resource.

Implemented in QwuiMessageResource, QwuiBufferedResource, and QwuiFileResource.

QString QwuiAbstractResource::path (  )  const [virtual]
Returns:
the path identifying the resource. This is added to the URL by the HTTP server.
virtual void QwuiAbstractResource::sendToDevice ( QIODevice *  dev  )  const [pure virtual]

Writes the resource to dev

Parameters:
dev IO device to write to.

Implemented in QwuiMessageResource, QwuiBufferedResource, and QwuiFileResource.


Member Data Documentation

QString QwuiAbstractResource::m_path [private]

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