QwuiBufferedResource Class Reference

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

#include <qwuibufferedresource.h>

Inheritance diagram for QwuiBufferedResource:
QwuiAbstractResource

List of all members.

Public Member Functions

 QwuiBufferedResource (const QString &path, const QString &mimeType, const QByteArray &source)
virtual ~QwuiBufferedResource ()
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 resource that wraps a simple byte array. This class makes it possible to send a buffer of data to the client.


Constructor & Destructor Documentation

QwuiBufferedResource::QwuiBufferedResource ( 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.
QwuiBufferedResource::~QwuiBufferedResource (  )  [virtual]

Member Function Documentation

qint64 QwuiBufferedResource::length (  )  const [virtual]
Returns:
the length of the resource in bytes.

Implements QwuiAbstractResource.

QString QwuiBufferedResource::mimeType (  )  const [virtual]

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

Returns:
the MIME type of the resource.

Implements QwuiAbstractResource.

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

Writes the resource to dev

Parameters:
dev IO device to write to.

Implements QwuiAbstractResource.


Member Data Documentation

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