• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

KIO::Slave

KIO::Slave Class Reference

#include <slave.h>

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

List of all members.

Public Slots

void accept ()
void gotInput ()
void timeout ()

Signals

void slaveDied (KIO::Slave *slave)

Public Member Functions

 Slave (const QString &protocol, QObject *parent=0)
virtual ~Slave ()
void deref ()
virtual void hold (const KUrl &url)
QString host ()
time_t idleTime ()
bool isAlive ()
bool isConnected ()
void kill ()
QString passwd ()
quint16 port ()
QString protocol ()
void ref ()
void resetHost ()
virtual void resume ()
virtual void send (int cmd, const QByteArray &arr=QByteArray())
virtual void setConfig (const MetaData &config)
void setConnected (bool c)
virtual void setHost (const QString &host, quint16 port, const QString &user, const QString &passwd)
void setIdle ()
void setPID (pid_t)
void setProtocol (const QString &protocol)
int slave_pid ()
QString slaveProtocol ()
virtual void suspend ()
virtual bool suspended ()
QString user ()

Static Public Member Functions

static Slave * createSlave (const QString &protocol, const KUrl &url, int &error, QString &error_text)
static Slave * holdSlave (const QString &protocol, const KUrl &url)

Detailed Description

Definition at line 47 of file slave.h.


Constructor & Destructor Documentation

Slave::Slave ( const QString &  protocol,
QObject *  parent = 0 
) [explicit]

Definition at line 156 of file slave.cpp.

Slave::~Slave (  )  [virtual]

Definition at line 165 of file slave.cpp.


Member Function Documentation

void Slave::accept (  )  [slot]

Definition at line 113 of file slave.cpp.

Slave * Slave::createSlave ( const QString &  protocol,
const KUrl &  url,
int &  error,
QString &  error_text 
) [static]

Creates a new slave.

Parameters:
protocol the protocol
url is the url
error is the error code on failure and undefined else.
error_text is the error text on failure and undefined else.
Returns:
0 on failure, or a pointer to a slave otherwise.

Definition at line 379 of file slave.cpp.

void Slave::deref (  ) 

Definition at line 237 of file slave.cpp.

void Slave::gotInput (  )  [slot]

Definition at line 316 of file slave.cpp.

void Slave::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 in KIO::DataSlave.

Definition at line 272 of file slave.cpp.

Slave * Slave::holdSlave ( const QString &  protocol,
const KUrl &  url 
) [static]

Requests a slave on hold for ths url, from klauncher, if there is such a job.

See hold()

Definition at line 452 of file slave.cpp.

QString Slave::host (  ) 
Returns:
Host this slave is (was?) connected to

Definition at line 189 of file slave.cpp.

time_t Slave::idleTime (  ) 
Returns:
The time this slave has been idle.

Definition at line 248 of file slave.cpp.

bool Slave::isAlive (  ) 
Returns:
true if the slave survived the last mission.

Definition at line 266 of file slave.cpp.

bool Slave::isConnected (  ) 

Definition at line 219 of file slave.cpp.

void Slave::kill (  ) 

Force termination.

Definition at line 337 of file slave.cpp.

QString Slave::passwd (  ) 
Returns:
Passwd used to log in

Definition at line 207 of file slave.cpp.

quint16 Slave::port (  ) 
Returns:
port this slave is (was?) connected to

Definition at line 195 of file slave.cpp.

QString Slave::protocol (  ) 

The protocol this slave handles.

Returns:
name of protocol handled by this slave, as seen by the user

Definition at line 171 of file slave.cpp.

void Slave::ref (  ) 

Definition at line 231 of file slave.cpp.

void Slave::resetHost (  ) 

Clear host info.

Definition at line 364 of file slave.cpp.

void Slave::resume (  )  [virtual]

Resumes the operation of the attached kioslave.

Reimplemented in KIO::DataSlave.

Definition at line 298 of file slave.cpp.

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

Sends the given command to the kioslave.

Parameters:
cmd command id
arr byte array containing data

Reimplemented in KIO::DataSlave.

Definition at line 310 of file slave.cpp.

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

Configure slave.

Reimplemented in KIO::DataSlave.

Definition at line 370 of file slave.cpp.

void Slave::setConnected ( bool  c  ) 

Definition at line 225 of file slave.cpp.

void Slave::setHost ( const QString &  host,
quint16  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 in KIO::DataSlave.

Definition at line 349 of file slave.cpp.

void Slave::setIdle (  ) 

Marks this slave as idle.

Definition at line 213 of file slave.cpp.

void Slave::setPID ( pid_t  pid  ) 

Definition at line 254 of file slave.cpp.

void Slave::setProtocol ( const QString &  protocol  ) 

Definition at line 177 of file slave.cpp.

int Slave::slave_pid (  ) 

Definition at line 260 of file slave.cpp.

void KIO::Slave::slaveDied ( KIO::Slave *  slave  )  [signal]
QString Slave::slaveProtocol (  ) 

The actual protocol used to handle the request.

This method will return a different protocol than the one obtained by using protocol() if a proxy-server is used for the given protocol. This usually means that this method will return "http" when the actuall request was to retrieve a resource from an "ftp" server by going through a proxy server.

Returns:
the actual protocol (io-slave) that handled the request

Definition at line 183 of file slave.cpp.

void Slave::suspend (  )  [virtual]

Suspends the operation of the attached kioslave.

Reimplemented in KIO::DataSlave.

Definition at line 292 of file slave.cpp.

bool Slave::suspended (  )  [virtual]

Tells whether the kioslave is suspended.

Returns:
true if the kioslave is suspended.

Reimplemented in KIO::DataSlave.

Definition at line 304 of file slave.cpp.

void Slave::timeout (  )  [slot]

Definition at line 123 of file slave.cpp.

QString Slave::user (  ) 
Returns:
User this slave is (was?) logged in as

Definition at line 201 of file slave.cpp.


The documentation for this class was generated from the following files:
  • slave.h
  • slave.cpp

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
  • KUtils
  • Nepomuk
  • Plasma
  •     Sodep
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal