tdeio/tdeio
TDEIO::Slave Class Reference
Attention developers: If you change the implementation of TDEIO::Slave, do *not* use connection() or slaveconn but the respective TDEIO::Slave accessor methods. More...
#include <slave.h>

Public Slots | |
void | accept (TDESocket *socket) |
void | gotInput () |
void | timeout () |
Signals | |
void | slaveDied (TDEIO::Slave *slave) |
Public Member Functions | |
Slave (TDEServerSocket *unixdomain, const TQString &protocol, const TQString &socketname) | |
void | setPID (pid_t) |
int | slave_pid () |
void | kill () |
bool | isAlive () |
void | setHost (const TQString &host, int port, const TQString &user, const TQString &passwd) |
void | resetHost () |
void | setConfig (const MetaData &config) |
TQString | protocol () |
void | setProtocol (const TQString &protocol) |
TQString | slaveProtocol () |
TQString | host () |
int | port () |
TQString | user () |
TQString | passwd () |
void | suspend () |
void | resume () |
bool | suspended () |
void | send (int cmd, const TQByteArray &data=TQByteArray()) |
void | hold (const KURL &url) |
time_t | idleTime () |
void | setIdle () |
bool | isConnected () |
void | setConnected (bool c) |
KDE_DEPRECATED Connection * | connection () |
void | ref () |
void | deref () |
Static Public Member Functions | |
static Slave * | createSlave (const TQString &protocol, const KURL &url, int &error, TQString &error_text) |
static Slave * | holdSlave (const TQString &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, TDEServerSocket *unixdomain, const TQString &protocol, const TQString &socketname) | |
void | unlinkSocket () |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
Attention developers: If you change the implementation of TDEIO::Slave, do *not* use connection() or slaveconn but the respective TDEIO::Slave accessor methods.
Otherwise classes derived from Slave might break. (LS)
Definition at line 44 of file slave.h.
Constructor & Destructor Documentation
Member Function Documentation
KDE_DEPRECATED Connection* TDEIO::Slave::connection | ( | ) | [inline] |
- Deprecated:
- This method is obsolete, use the accessor methods within TDEIO::Slave instead. Old code directly accessing connection() will not be able to access special protocols.
Slave * Slave::createSlave | ( | const TQString & | protocol, | |
const KURL & | url, | |||
int & | error, | |||
TQString & | 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?
void Slave::hold | ( | const KURL & | url | ) |
Puts the tdeioslave associated with url
at halt.
Reimplemented in TDEIO::DataSlave.
TQString TDEIO::Slave::host | ( | ) | [inline] |
time_t Slave::idleTime | ( | ) |
bool TDEIO::Slave::isAlive | ( | ) | [inline] |
TQString TDEIO::Slave::passwd | ( | ) | [inline] |
int TDEIO::Slave::port | ( | ) | [inline] |
TQString TDEIO::Slave::protocol | ( | ) | [inline] |
void Slave::resume | ( | ) |
Resumes the operation of the attached tdeioslave.
Reimplemented in TDEIO::DataSlave.
void Slave::send | ( | int | cmd, | |
const TQByteArray & | data = TQByteArray() | |||
) |
Sends the given command to the tdeioslave.
- Parameters:
-
cmd command id data byte array containing data
- Since:
- 3.2
Reimplemented in TDEIO::DataSlave.
void Slave::setConfig | ( | const MetaData & | config | ) |
void Slave::setHost | ( | const TQString & | host, | |
int | port, | |||
const TQString & | user, | |||
const TQString & | passwd | |||
) |
Set host for url.
- Parameters:
-
host to connect to. port to connect to. user to login as passwd to login with
Reimplemented in TDEIO::DataSlave.
TQString TDEIO::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
void Slave::suspend | ( | ) |
Suspends the operation of the attached tdeioslave.
Reimplemented in TDEIO::DataSlave.
bool Slave::suspended | ( | ) |
Tells wether the tdeioslave is suspended.
- Returns:
- true if the tdeioslave is suspended.
- Since:
- 3.2
Reimplemented in TDEIO::DataSlave.
TQString TDEIO::Slave::user | ( | ) | [inline] |
The documentation for this class was generated from the following files: