• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.8.3 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • KIO
  • DataSlave
Classes | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes
KIO::DataSlave Class Reference

#include <dataslave.h>

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

List of all members.

Classes

struct  QueueStruct
 structure for queuing. More...

Public Member Functions

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

Protected Types

typedef QList< QueueStruct > DispatchQueue
enum  QueueType {
  Queue_mimeType = 1, Queue_totalSize, Queue_sendMetaData, Queue_data,
  Queue_finished
}

Protected Slots

void dispatchNext ()

Protected Member Functions

void sendMetaData ()
void setAllMetaData (const MetaData &)

Protected Attributes

DispatchQueue dispatchQueue

Detailed Description

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

Do not use this class in external applications. It is an implementation detail of KIO and subject to change without notice.

Author:
Leo Savernik

Definition at line 49 of file dataslave.h.


Member Typedef Documentation

typedef QList<QueueStruct> KIO::DataSlave::DispatchQueue [protected]

Definition at line 99 of file dataslave.h.


Member Enumeration Documentation

enum KIO::DataSlave::QueueType [protected]

identifiers of functions to be queued

Enumerator:
Queue_mimeType 
Queue_totalSize 
Queue_sendMetaData 
Queue_data 
Queue_finished 

Definition at line 85 of file dataslave.h.


Constructor & Destructor Documentation

DataSlave::DataSlave ( )

Definition at line 60 of file dataslave.cpp.

DataSlave::~DataSlave ( ) [virtual]

Definition at line 69 of file dataslave.cpp.


Member Function Documentation

void DataSlave::dispatchNext ( ) [protected, slot]

dispatches next queued method.

Does nothing if there are no queued methods.

Definition at line 101 of file dataslave.cpp.

virtual void KIO::DataSlave::get ( const KUrl &  url) [pure virtual]

Implemented in KIO::DataProtocol.

void DataSlave::hold ( const KUrl &  url) [virtual]

Puts the kioslave associated with url at halt, and return it to klauncher, in order to let another application connect to it and finish the job.

This is for the krunner case: type a URL in krunner, it will start downloading to find the mimetype (KRun), and then hold the slave, publish the held slave using, this method, and the final application can continue the same download by requesting the same URL.

Reimplemented from KIO::Slave.

Definition at line 73 of file dataslave.cpp.

virtual void KIO::DataSlave::mimetype ( const KUrl &  url) [pure virtual]

Implemented in KIO::DataProtocol.

void DataSlave::resume ( ) [virtual]

Resumes the operation of the attached kioslave.

Reimplemented from KIO::Slave.

Definition at line 83 of file dataslave.cpp.

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

Sends the given command to the kioslave.

Parameters:
cmdcommand id
arrbyte array containing data

Reimplemented from KIO::Slave.

Definition at line 120 of file dataslave.cpp.

void DataSlave::sendMetaData ( ) [protected]

Sends metadata set with setAllMetaData.

Definition at line 170 of file dataslave.cpp.

void DataSlave::setAllMetaData ( const MetaData &  md) [protected]

Sets metadata.

Definition at line 166 of file dataslave.cpp.

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

Configure slave.

Reimplemented from KIO::Slave.

Definition at line 156 of file dataslave.cpp.

void DataSlave::setHost ( const QString &  host,
quint16  port,
const QString &  user,
const QString &  passwd 
) [virtual]

Set host for url.

Parameters:
hostto connect to.
portto connect to.
userto login as
passwdto login with

Reimplemented from KIO::Slave.

Definition at line 151 of file dataslave.cpp.

void DataSlave::suspend ( ) [virtual]

Suspends the operation of the attached kioslave.

Reimplemented from KIO::Slave.

Definition at line 77 of file dataslave.cpp.

bool DataSlave::suspended ( ) [virtual]

Tells whether the kioslave is suspended.

Returns:
true if the kioslave is suspended.

Reimplemented from KIO::Slave.

Definition at line 147 of file dataslave.cpp.


Member Data Documentation

DispatchQueue KIO::DataSlave::dispatchQueue [protected]

Definition at line 100 of file dataslave.h.


The documentation for this class was generated from the following files:
  • dataslave.h
  • dataslave.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 20:55:29 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.8.3 API Reference

Skip menu "kdelibs-4.8.3 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal