32 #include "kio/slaveinterface.h"
33 #include "kio/connection.h"
56 Slave(
bool derived, KServerSocket *unixdomain,
const TQString &protocol,
57 const TQString &socketname);
60 Slave(KServerSocket *unixdomain,
61 const TQString &protocol,
const TQString &socketname);
67 int slave_pid() {
return m_pid; }
86 void setHost(
const TQString &host,
int port,
87 const TQString &user,
const TQString &passwd);
97 void setConfig(
const MetaData &config);
106 void setProtocol(
const TQString & protocol);
124 TQString
host() {
return m_host; }
134 TQString
user() {
return m_user; }
152 static Slave* createSlave(
const TQString &protocol,
const KURL& url,
int& error, TQString& error_text );
154 static Slave* holdSlave(
const TQString &protocol,
const KURL& url );
179 void send(
int cmd,
const TQByteArray &data = TQByteArray());
185 void hold(
const KURL &url);
201 bool isConnected() {
return contacted; }
202 void setConnected(
bool c) { contacted = c; }
210 void ref() { m_refCount++; }
211 void deref() { m_refCount--;
if (!m_refCount)
delete this; }
214 void accept(KSocket *socket);
225 TQString m_slaveProtocol;
235 time_t contact_started;
240 virtual void virtual_hook(
int id,
void* data );
242 enum { VIRTUAL_SUSPEND = 0x200, VIRTUAL_RESUME, VIRTUAL_SEND,
243 VIRTUAL_HOLD, VIRTUAL_SUSPENDED,
244 VIRTUAL_SET_HOST, VIRTUAL_SET_CONFIG };
247 const TQByteArray *arr;
252 struct SuspendedParams {
255 struct SetHostParams {
256 const TQString *host;
258 const TQString *user;
259 const TQString *passwd;
261 struct SetConfigParams {
262 const MetaData *config;
265 class SlavePrivate* d;