Home · All Classes · All Namespaces · Modules · Functions · Files
Public Member Functions | Protected Member Functions
Tp::IODevice Class Reference

The IODevice class represents a buffer with independent read-write. More...

#include </usr/src/RPM/BUILD/telepathy-qt-0.9.7/TelepathyQt/io-device.h>

List of all members.

Public Member Functions

 IODevice (QObject *parent=0)
 ~IODevice ()
bool isSequential () const
qint64 bytesAvailable () const

Protected Member Functions

qint64 readData (char *data, qint64 maxSize)
qint64 writeData (const char *data, qint64 maxSize)

Detailed Description

The IODevice class represents a buffer with independent read-write.

QBuffer has one position pointer, so when we write data, the position pointer points to the end of the buffer and no bytes can be read.

This class is interesting for all CMs that use a library that accepts a QIODevice for file transfers.

Note: This class belongs to the service library.


Constructor & Destructor Documentation

Tp::IODevice::IODevice ( QObject *  parent = 0) [explicit]

Member Function Documentation

Returns the number of bytes that are available for reading.

Returns:
the number of bytes that are available for reading.
qint64 Tp::IODevice::bytesAvailable ( ) const
qint64 Tp::IODevice::readData ( char *  data,
qint64  maxSize 
) [protected]
qint64 Tp::IODevice::writeData ( const char *  data,
qint64  maxSize 
) [protected]

Writes the data to the buffer.

Writes up to maxSize bytes from data to the buffer. If maxSize is not a zero, emits readyRead() and bytesWritten() signals.

Parameters:
dataThe data to write.
maxSizeThe number for bytes to write.
Returns:
The number of bytes that were written.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.7