| Home · All Classes · All Namespaces · Modules · Functions · Files

Public Member Functions | Protected Member Functions | List of all members
Tp::IODevice Class Reference
Utililty classes

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

`#include </build/telepathy-qt-h4W587/telepathy-qt-0.9.7/TelepathyQt/io-device.h>`

Inheritance diagram for Tp::IODevice:
[legend]

## Public Member Functions

| IODevice (QObject *parent=0)
| ~IODevice ()
bool | isSequential () const
qint64 | bytesAvailable () const
Public Member Functions inherited from QIODevice
| QIODevice ()
| QIODevice (QObject *parent)
virtual | ~QIODevice ()
OpenMode | openMode () const
void | setTextModeEnabled (bool enabled)
bool | isTextModeEnabled () const
bool | isOpen () const
bool | isReadable () const
bool | isWritable () const
virtual bool | open (QFlags< QIODevice::OpenModeFlag > mode)
virtual void | close ()
virtual qint64 | pos () const
virtual qint64 | size () const
virtual bool | seek (qint64 pos)
virtual bool | atEnd () const
virtual bool | reset ()
virtual qint64 | bytesToWrite () const
qint64 | read (char *data, qint64 maxSize)
QByteArray | read (qint64 maxSize)
QByteArray | readAll ()
qint64 | readLine (char *data, qint64 maxSize)
QByteArray | readLine (qint64 maxSize)
virtual bool | canReadLine () const
qint64 | write (const char *data, qint64 maxSize)
qint64 | write (const char *data)
qint64 | write (const QByteArray &byteArray)
qint64 | peek (char *data, qint64 maxSize)
QByteArray | peek (qint64 maxSize)
virtual bool | waitForReadyRead (int msecs)
virtual bool | waitForBytesWritten (int msecs)
void | ungetChar (char c)
bool | putChar (char c)
bool | getChar (char *c)
QString | errorString () const
void | readyRead ()
void | bytesWritten (qint64 bytes)
void | aboutToClose ()
void | readChannelFinished ()
int | flags () const
int | mode () const
int | state () const
bool | isDirectAccess () const
bool | isSequentialAccess () const
bool | isCombinedAccess () const
bool | isBuffered () const
bool | isRaw () const
bool | isSynchronous () const
bool | isAsynchronous () const
bool | isTranslated () const
bool | isInactive () const
Status | status () const
void | resetStatus ()
Offset | at () const
bool | at (Offset offset)
qint64 | readBlock (char *data, quint64 size)
qint64 | writeBlock (const char *data, quint64 size)
qint64 | writeBlock (const QByteArray &data)
int | getch ()
int | putch (int ch)
int | ungetch (int ch)
Public Member Functions inherited from QObject
| QObject (QObject *parent)
virtual | ~QObject ()
virtual bool | event (QEvent *e)
virtual bool | eventFilter (QObject *watched, QEvent *event)
virtual const QMetaObject * | metaObject () const
QString | objectName () const
void | setObjectName (const QString &name)
bool | isWidgetType () const
bool | signalsBlocked () const
bool | blockSignals (bool block)
QThread * | thread () const
void | moveToThread (QThread *targetThread)
int | startTimer (int interval)
void | killTimer (int id)
T | findChild (const QString &name) const
QList< T > | findChildren (const QString &name) const
QList< T > | findChildren (const QRegExp &regExp) const
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
const QObjectList & | children () const
void | setParent (QObject *parent)
void | installEventFilter (QObject *filterObj)
void | removeEventFilter (QObject *obj)
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
bool | disconnect (const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *receiver, const char *method)
void | dumpObjectTree ()
void | dumpObjectInfo ()
bool | setProperty (const char *name, const QVariant &value)
QVariant | property (const char *name) const
QList< QByteArray > | dynamicPropertyNames () const
void | destroyed (QObject *obj)
QObject * | parent () const
bool | inherits (const char *className) const
void | deleteLater ()
| QObject (QObject *parent, const char *name)
void | insertChild (QObject *object)
void | removeChild (QObject *object)
bool | isA (const char *className) const
const char * | className () const
const char * | name () const
const char * | name (const char *defaultName) const
void | setName (const char *name)

## Protected Member Functions

qint64 | readData (char *data, qint64 maxSize)
qint64 | writeData (const char *data, qint64 maxSize)
Protected Member Functions inherited from QIODevice
virtual qint64 | readData (char *data, qint64 maxSize)=0
virtual qint64 | readLineData (char *data, qint64 maxSize)
virtual qint64 | writeData (const char *data, qint64 maxSize)=0
void | setOpenMode (QFlags< QIODevice::OpenModeFlag > openMode)
void | setErrorString (const QString &str)
Protected Member Functions inherited from QObject
QObject * | sender () const
int | senderSignalIndex () const
int | receivers (const char *signal) const
virtual void | timerEvent (QTimerEvent *event)
virtual void | childEvent (QChildEvent *event)
virtual void | customEvent (QEvent *event)
virtual void | connectNotify (const char *signal)
virtual void | disconnectNotify (const char *signal)
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method)

## Additional Inherited Members

Static Public Member Functions inherited from QObject
QString | tr (const char *sourceText, const char *disambiguation, int n)
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n)
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
Public Attributes inherited from QIODevice
typedef | OpenMode
typedef | Offset
typedef | Status
Static Protected Member Functions inherited from QObject
QByteArray | normalizeSignalSlot (const char *signalSlot)
Properties inherited from QObject
| objectName

## 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

## § IODevice()

Tp::IODevice::IODevice | ( | QObject * | parent = `0` | ) |

explicit

## § ~IODevice()

Tp::IODevice::~IODevice | ( |  | ) |

## Member Function Documentation

## § isSequential()

bool Tp::IODevice::isSequential | ( |  | ) | const

virtual

Returns the number of bytes that are available for reading.

Returns
  the number of bytes that are available for reading.

Reimplemented from QIODevice.

## § bytesAvailable()

qint64 Tp::IODevice::bytesAvailable | ( |  | ) | const

virtual

Reimplemented from QIODevice.

## § readData()

qint64 Tp::IODevice::readData | ( | char * | data,
|  | qint64 | maxSize
| ) |  |

protected

## § writeData()

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

  data | The data to write.
  maxSize | The number for bytes to write.

Returns
  The number of bytes that were written.