kio Library API Documentation

KIO::DataSlave Class Reference

This class provides a high performance implementation for the data url scheme (rfc2397). More...

#include <dataslave.h>

Inheritance diagram for KIO::DataSlave:

Inheritance graph
[legend]
Collaboration diagram for KIO::DataSlave:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DataSlave ()
virtual ~DataSlave ()
virtual void setHost (const QString &host, int port, const QString &user, const QString &passwd)
virtual void setConfig (const MetaData &config)
virtual void suspend ()
virtual void resume ()
virtual bool suspended ()
virtual void send (int cmd, const QByteArray &arr=QByteArray())
virtual void hold (const KURL &url)
virtual void get (const KURL &url)=0
virtual void mimetype (const KURL &url)=0

Protected Types

typedef QValueList< QueueStructDispatchQueue
enum  QueueType {
  Queue_mimeType = 1, Queue_totalSize, Queue_sendMetaData, Queue_data,
  Queue_finished
}

Protected Slots

void dispatchNext ()

Protected Member Functions

void setAllMetaData (const MetaData &)
void sendMetaData ()
virtual void virtual_hook (int id, void *data)

Protected Attributes

DispatchQueue dispatchQueue

Classes

struct  QueueStruct
 structure for queueing. More...

Detailed Description

This class provides a high performance implementation for the data url scheme (rfc2397).

Definition at line 49 of file dataslave.h.


Member Enumeration Documentation

enum KIO::DataSlave::QueueType [protected]
 

identifiers of functions to be queued

Definition at line 85 of file dataslave.h.


Member Function Documentation

void DataSlave::setHost const QString host,
int  port,
const QString user,
const QString passwd
[virtual]
 

Set host for url.

Parameters:
host to connect to.
port to connect to.
user to login as
passwd to login with

Reimplemented from KIO::Slave.

Definition at line 148 of file dataslave.cpp.

Referenced by virtual_hook().

void DataSlave::setConfig const MetaData config  )  [virtual]
 

Configure slave.

Reimplemented from KIO::Slave.

Definition at line 153 of file dataslave.cpp.

Referenced by virtual_hook().

void DataSlave::suspend  )  [virtual]
 

Suspends the operation of the attached kioslave.

Reimplemented from KIO::Slave.

Definition at line 76 of file dataslave.cpp.

References QTimer::stop().

Referenced by virtual_hook().

void DataSlave::resume  )  [virtual]
 

Resumes the operation of the attached kioslave.

Reimplemented from KIO::Slave.

Definition at line 82 of file dataslave.cpp.

References QTimer::start().

Referenced by virtual_hook().

bool DataSlave::suspended  )  [virtual]
 

Tells wether the kioslave is suspended.

Returns:
true if the kioslave is suspended.
Since:
3.2

Reimplemented from KIO::Slave.

Definition at line 144 of file dataslave.cpp.

Referenced by virtual_hook().

void DataSlave::send int  cmd,
const QByteArray arr = QByteArray()
[virtual]
 

Sends the given command to the kioslave.

Parameters:
cmd command id
data byte array containing data
Since:
3.2

Reimplemented from KIO::Slave.

Definition at line 118 of file dataslave.cpp.

References QString::fromLatin1(), KIO::get(), KIO::mimetype(), and KIO::unsupportedActionErrorString().

Referenced by virtual_hook().

void DataSlave::hold const KURL url  )  [virtual]
 

Puts the kioslave associated with url at halt.

Reimplemented from KIO::Slave.

Definition at line 72 of file dataslave.cpp.

Referenced by virtual_hook().

void DataSlave::setAllMetaData const MetaData  )  [protected]
 

Sets metadata.

Definition at line 163 of file dataslave.cpp.

Referenced by KIO::DataProtocol::get().

void DataSlave::sendMetaData  )  [protected]
 

Sends metadata set with setAllMetaData.

Definition at line 167 of file dataslave.cpp.

Referenced by dispatchNext(), and KIO::DataProtocol::get().

void DataSlave::dispatchNext  )  [protected, slot]
 

dispatches next queued method.

Does nothing if there are no queued methods.

Definition at line 99 of file dataslave.cpp.

References KIO::DataSlave::QueueStruct::ba, dispatchQueue, QValueList::empty(), QValueList::front(), QValueList::pop_front(), KIO::DataSlave::QueueStruct::s, sendMetaData(), KIO::DataSlave::QueueStruct::size, QTimer::stop(), and KIO::DataSlave::QueueStruct::type.

Referenced by DataSlave().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 16 07:00:06 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003