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

kio

KIO::Slave

KIO::Slave Class Reference

Attention developers: If you change the implementation of KIO::Slave, do *not* use connection() or slaveconn but the respective KIO::Slave accessor methods. More...

#include <slave.h>

Inheritance diagram for KIO::Slave:

Inheritance graph
[legend]

List of all members.


Classes

struct  HoldParams
struct  SendParams
struct  SetConfigParams
struct  SetHostParams
struct  SuspendedParams

Public Slots

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

Signals

void slaveDied (KIO::Slave *slave)

Public Member Functions

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

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)

Protected Types

enum  {
  VIRTUAL_SUSPEND = 0x200, VIRTUAL_RESUME, VIRTUAL_SEND, VIRTUAL_HOLD,
  VIRTUAL_SUSPENDED, VIRTUAL_SET_HOST, VIRTUAL_SET_CONFIG
}

Protected Member Functions

 Slave (bool derived, KServerSocket *unixdomain, const QString &protocol, const QString &socketname)
void unlinkSocket ()
virtual void virtual_hook (int id, void *data)

Detailed Description

Attention developers: If you change the implementation of KIO::Slave, do *not* use connection() or slaveconn but the respective KIO::Slave accessor methods.

Otherwise classes derived from Slave might break. (LS)

Definition at line 44 of file slave.h.


Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
VIRTUAL_SUSPEND 
VIRTUAL_RESUME 
VIRTUAL_SEND 
VIRTUAL_HOLD 
VIRTUAL_SUSPENDED 
VIRTUAL_SET_HOST 
VIRTUAL_SET_CONFIG 

Definition at line 241 of file slave.h.


Constructor & Destructor Documentation

Slave::Slave ( bool  derived,
KServerSocket *  unixdomain,
const QString &  protocol,
const QString &  socketname 
) [protected]

Use this constructor if you derive your own class from Slave derived must be true in any case.

For internal use only.

Since:
3.2

Definition at line 160 of file slave.cpp.

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

Definition at line 141 of file slave.cpp.

Slave::~Slave (  )  [virtual]

Definition at line 183 of file slave.cpp.


Member Function Documentation

void Slave::accept ( KSocket *  socket  )  [slot]

Definition at line 90 of file slave.cpp.

KDE_DEPRECATED Connection* KIO::Slave::connection (  )  [inline]

Deprecated:
This method is obsolete, use the accessor methods within KIO::Slave instead. Old code directly accessing connection() will not be able to access special protocols.

Definition at line 207 of file slave.h.

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

Creates a new slave.

Parameters:
protocol protocol the slave is for.
url URL the slave should operate on.
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.
Todo:
What are legal protocol values?

Definition at line 355 of file slave.cpp.

void KIO::Slave::deref (  )  [inline]

Definition at line 210 of file slave.h.

void Slave::gotInput (  )  [slot]

Definition at line 297 of file slave.cpp.

void Slave::hold ( const KURL &  url  ) 

Puts the kioslave associated with url at halt.

Reimplemented in KIO::DataSlave.

Definition at line 216 of file slave.cpp.

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

Definition at line 460 of file slave.cpp.

QString KIO::Slave::host (  )  [inline]

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

Definition at line 123 of file slave.h.

time_t Slave::idleTime (  ) 

Returns:
The time this slave has been idle.

Definition at line 206 of file slave.cpp.

bool KIO::Slave::isAlive (  )  [inline]

Returns:
true if the slave survived the last mission.

Definition at line 76 of file slave.h.

bool KIO::Slave::isConnected (  )  [inline]

Definition at line 200 of file slave.h.

void Slave::kill (  ) 

Force termination.

Definition at line 317 of file slave.cpp.

QString KIO::Slave::passwd (  )  [inline]

Returns:
Passwd used to log in

Definition at line 138 of file slave.h.

int KIO::Slave::port (  )  [inline]

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

Definition at line 128 of file slave.h.

QString KIO::Slave::protocol (  )  [inline]

The protocol this slave handles.

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

Definition at line 103 of file slave.h.

void KIO::Slave::ref (  )  [inline]

Definition at line 209 of file slave.h.

void Slave::resetHost (  ) 

Clear host info.

Definition at line 342 of file slave.cpp.

void Slave::resume (  ) 

Resumes the operation of the attached kioslave.

Reimplemented in KIO::DataSlave.

Definition at line 264 of file slave.cpp.

void Slave::send ( int  cmd,
const QByteArray &  data = QByteArray() 
)

Sends the given command to the kioslave.

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

Reimplemented in KIO::DataSlave.

Definition at line 285 of file slave.cpp.

void Slave::setConfig ( const MetaData &  config  ) 

Configure slave.

Reimplemented in KIO::DataSlave.

Definition at line 347 of file slave.cpp.

void KIO::Slave::setConnected ( bool  c  )  [inline]

Definition at line 201 of file slave.h.

void Slave::setHost ( const QString &  host,
int  port,
const QString &  user,
const QString &  passwd 
)

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 328 of file slave.cpp.

void Slave::setIdle (  ) 

Marks this slave as idle.

Definition at line 201 of file slave.cpp.

void Slave::setPID ( pid_t  pid  ) 

Definition at line 211 of file slave.cpp.

void Slave::setProtocol ( const QString &  protocol  ) 

Definition at line 196 of file slave.cpp.

int KIO::Slave::slave_pid (  )  [inline]

Definition at line 66 of file slave.h.

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

QString KIO::Slave::slaveProtocol (  )  [inline]

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 118 of file slave.h.

void Slave::suspend (  ) 

Suspends the operation of the attached kioslave.

Reimplemented in KIO::DataSlave.

Definition at line 254 of file slave.cpp.

bool Slave::suspended (  ) 

Tells wether the kioslave is suspended.

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

Reimplemented in KIO::DataSlave.

Definition at line 274 of file slave.cpp.

void Slave::timeout (  )  [slot]

Definition at line 109 of file slave.cpp.

void Slave::unlinkSocket (  )  [protected]

Definition at line 101 of file slave.cpp.

QString KIO::Slave::user (  )  [inline]

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

Definition at line 133 of file slave.h.

void Slave::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented from KIO::SlaveInterface.

Reimplemented in KIO::DataSlave.

Definition at line 515 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
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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