31 #include "tdeio/slaveinterface.h"
32 #include "tdeio/connection.h"
34 class TDEServerSocket;
55 Slave(
bool derived, TDEServerSocket *unixdomain,
const TQString &protocol,
56 const TQString &socketname);
59 Slave(TDEServerSocket *unixdomain,
60 const TQString &protocol,
const TQString &socketname);
66 int slave_pid() {
return m_pid; }
85 void setHost(
const TQString &host,
int port,
86 const TQString &user,
const TQString &passwd);
96 void setConfig(
const MetaData &config);
105 void setProtocol(
const TQString & protocol);
123 TQString
host() {
return m_host; }
133 TQString
user() {
return m_user; }
151 static Slave* createSlave(
const TQString &protocol,
const KURL& url,
int& error, TQString& error_text );
153 static Slave* holdSlave(
const TQString &protocol,
const KURL& url );
178 void send(
int cmd,
const TQByteArray &data = TQByteArray());
184 void hold(
const KURL &url);
200 bool isConnected() {
return contacted; }
201 void setConnected(
bool c) { contacted = c; }
209 void ref() { m_refCount++; }
210 void deref() { m_refCount--;
if (!m_refCount)
delete this; }
213 void accept(TDESocket *socket);
224 TQString m_slaveProtocol;
229 TDEServerSocket *serv;
234 time_t contact_started;
239 virtual void virtual_hook(
int id,
void* data );
241 enum { VIRTUAL_SUSPEND = 0x200, VIRTUAL_RESUME, VIRTUAL_SEND,
242 VIRTUAL_HOLD, VIRTUAL_SUSPENDED,
243 VIRTUAL_SET_HOST, VIRTUAL_SET_CONFIG };
246 const TQByteArray *arr;
251 struct SuspendedParams {
254 struct SetHostParams {
255 const TQString *host;
257 const TQString *user;
258 const TQString *passwd;
260 struct SetConfigParams {
261 const MetaData *config;
264 class SlavePrivate* d;
This class provides a simple means for IPC between two applications via a pipe.
There are two classes that specifies the protocol between application (TDEIO::Job) and tdeioslave.
Attention developers: If you change the implementation of TDEIO::Slave, do not use connection() or sl...
TQString slaveProtocol()
The actual protocol used to handle the request.
TQString protocol()
The protocol this slave handles.
TDE_DEPRECATED Connection * connection()
A namespace for TDEIO globals.