# class Slave

###

Module | kio
Namespace | KIO
Class | Slave
Inherits | KIO::SlaveInterface

### methods

- Slave (protocol, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  protocol | QString |
  parent | QObject | 0

- Slave (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |
  a1 | QObject | 0

- accept ( )

  returns Nothing

- createSlave (protocol, url, error_text)

  returns KIO.Slave, int (error)
  static

  Argument | Type | Default
  --- | --- | ---
  protocol | QString |
  url | KUrl |
  error_text | QString |

  Creates a new slave.

  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.

- deref ( )

  returns Nothing

- gotInput ( )

  returns Nothing

- hold (url)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  url | KUrl |

  Puts the kioslave associated with url at halt.

- holdSlave (protocol, url)

  returns KIO.Slave
  static

  Argument | Type | Default
  --- | --- | ---
  protocol | QString |
  url | KUrl |

- host ( )

  returns QString

  Returns Host this slave is (was?) connected to

- idleTime ( )

  returns time_t

  Returns The time this slave has been idle.

- isAlive ( )

  returns bool

  Returns true if the slave survived the last mission.

- isConnected ( )

  returns bool

- kill ( )

  returns Nothing

  Force termination

- passwd ( )

  returns QString

  Returns Passwd used to log in

- port ( )

  returns quint16

  Returns port this slave is (was?) connected to

- protocol ( )

  returns QString

  The protocol this slave handles.

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

- ref ( )

  returns Nothing

- resetHost ( )

  returns Nothing

  Clear host info.

- resume ( )

  returns Nothing

  Resumes the operation of the attached kioslave.

- send (cmd, arr)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  cmd | int |
  arr | QByteArray | QByteArray()

  Sends the given command to the kioslave.

  cmd - command id

  arr - byte array containing data

- setConfig (config)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  config | KIO.MetaData |

  Configure slave

- setConnected (c)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  c | bool |

- setHost (host, port, user, passwd)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  host | QString |
  port | quint16 |
  user | QString |
  passwd | QString |

  Set host for url

  host - to connect to.

  port - to connect to.

  user - to login as

  passwd - to login with

- setIdle ( )

  returns Nothing

  Marks this slave as idle.

- setPID (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | pid_t |

- setProtocol (protocol)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  protocol | QString |

- slaveDied (slave)

  returns Nothing
  SIGNAL ("slaveDied (Slave*)")

  Argument | Type | Default
  --- | --- | ---
  slave | KIO.Slave |

- slaveProtocol ( )

  returns QString

  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

- slave_pid ( )

  returns int

- suspend ( )

  returns Nothing

  Suspends the operation of the attached kioslave.

- suspended ( )

  returns bool

  Tells whether the kioslave is suspended. Returns true if the kioslave is suspended.

- timeout ( )

  returns Nothing

- user ( )

  returns QString

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