class Slave

# class Slave |
Full name | `KIO::Slave`
Definition | `#include <slave.h>`
Inherits | KIO::SlaveInterface [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- Slave (KServerSocket *unixdomain, const QString &protocol, const QString &socketname)
- virtual ~Slave ()
- void setPID (pid_t)
- int slave_pid ()
- void kill ()
- bool isAlive ()
- void setHost ( const QString &host, int port, const QString &user, const QString &passwd)
- void resetHost ()
- void setConfig (const MetaData &config)
- QString protocol ()
- void setProtocol (const QString & protocol)
- QString slaveProtocol ()
- QString host ()
- int port ()
- QString user ()
- QString passwd ()
- void suspend ()
- void resume ()
- void hold (const KURL &url)
- bool suspended ()
- time_t idleTime ()
- void setIdle ()
- bool isConnected ()
- void setConnected (bool c)
- Connection * connection ()
- void ref ()
- void deref ()

#### Public Slots

- void accept (KSocket *socket)
- void gotInput ()
- void timeout ()

#### Signals

- void slaveDied (KIO::Slave *slave)

#### Public Static Methods

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

#### Protected Methods

- void unlinkSocket ()
- virtual void virtual_hook ( int id, void* data )

## Detailed Description

Slave (KServerSocket *unixdomain, const QString &protocol, const QString &socketname) | ### Slave

~Slave () | ### ~Slave

[virtual]

void setPID (pid_t) | ### setPID

int slave_pid () | ### slave_pid

void kill () | ### kill

Force termination

bool isAlive () | ### isAlive

Returns: true if the slave survided the last mission.

void setHost ( const QString &host, int port, const QString &user, const QString &passwd) | ### setHost

Set host for url

Parameters:

host | to connect to.
port | to connect to.
user | to login as
passwd | to login with

void resetHost () | ### resetHost

Clear host info.

void setConfig (const MetaData &config) | ### setConfig

Configure slave

QString protocol () | ### protocol

The protocol this slave handles.

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

void setProtocol (const QString & protocol) | ### setProtocol

QString slaveProtocol () | ### 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

QString host () | ### host

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

int port () | ### port

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

QString user () | ### user

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

QString passwd () | ### passwd

Returns: Passwd used to log in

Slave* createSlave ( const QString &protocol, const KURL& url, int& error, QString& error_text ) | ### createSlave

[static]

Creates a new slave.

Parameters:

_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.

Slave* holdSlave ( const QString &protocol, const KURL& url ) | ### holdSlave

[static]

void suspend () | ### suspend

void resume () | ### resume

void hold (const KURL &url) | ### hold

bool suspended () | ### suspended

time_t idleTime () | ### idleTime

Returns: The time this slave has been idle.

void setIdle () | ### setIdle

Marks this slave as idle.

bool isConnected () | ### isConnected

void setConnected (bool c) | ### setConnected

Connection * connection () | ### connection

Reimplemented from SlaveInterface.

void ref () | ### ref

void deref () | ### deref

void accept (KSocket *socket) | ### accept

[slot]

void gotInput () | ### gotInput

[slot]

void timeout () | ### timeout

[slot]

void slaveDied (KIO::Slave *slave) | ### slaveDied

[signal]

void unlinkSocket () | ### unlinkSocket

[protected]

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Reimplemented from SlaveInterface.

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:57 2003, using kdoc 2.0a54.