QwuiBufferedRessource Class Reference

A ressource that wraps a simple byte array. This class makes it possible to send a buffer of data to the client. More...

#include <qwuibufferedressource.h>

Inheritance diagram for QwuiBufferedRessource:

QwuiAbstractRessource

List of all members.

Public Member Functions

 QwuiBufferedRessource (const QString &path, const QString &mimeType, const QByteArray &source)
virtual ~QwuiBufferedRessource ()
virtual QString mimeType () const
virtual qint64 length () const
virtual void sendToDevice (QIODevice *dev) const

Private Attributes

QString m_mimeType
QByteArray m_source


Detailed Description

A ressource that wraps a simple byte array. This class makes it possible to send a buffer of data to the client.

Constructor & Destructor Documentation

QwuiBufferedRessource::QwuiBufferedRessource ( const QString &  path,
const QString &  mimeType,
const QByteArray &  source 
)

Parameters:
path path identifying the buffer content.
mimeType MIME-type of the buffer content.
source buffer data.

QwuiBufferedRessource::~QwuiBufferedRessource (  )  [virtual]


Member Function Documentation

QString QwuiBufferedRessource::mimeType (  )  const [virtual]

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

Returns:
the MIME type of the ressource.

Implements QwuiAbstractRessource.

qint64 QwuiBufferedRessource::length (  )  const [virtual]

Returns:
the length of the ressource in bytes.

Implements QwuiAbstractRessource.

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

Writes the ressource to dev

Parameters:
dev IO device to write to.

Implements QwuiAbstractRessource.


Member Data Documentation

QByteArray QwuiBufferedRessource::m_source [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