22 #ifndef __TDEIO_DATASLAVE_H__ 23 #define __TDEIO_DATASLAVE_H__ 25 #include <tdeio/global.h> 26 #include <tdeio/slave.h> 31 #define DISPATCH_DECL(type) \ 32 void dispatch_##type(); 35 #define DISPATCH_DECL1(type, paramtype, param) \ 36 void dispatch_##type(paramtype param); 56 virtual void setHost(
const TQString &
host,
int port,
58 virtual void setConfig(
const MetaData &config);
60 virtual void suspend();
61 virtual void resume();
62 virtual bool suspended();
63 virtual void send(
int cmd,
const TQByteArray &data = TQByteArray());
65 virtual void hold(
const KURL &url);
68 virtual void get(
const KURL &url) = 0;
69 virtual void mimetype(
const KURL &url) = 0;
85 enum QueueType { Queue_mimeType = 1, Queue_totalSize,
86 Queue_sendMetaData, Queue_data, Queue_finished };
99 typedef TQValueList<QueueStruct> DispatchQueue;
100 DispatchQueue dispatchQueue;
102 DISPATCH_DECL1(mimeType,
const TQString &, s)
104 DISPATCH_DECL(sendMetaData)
105 DISPATCH_DECL1(data,
const TQByteArray &, ba)
106 DISPATCH_DECL(finished)
114 virtual void virtual_hook(
int id,
void* data );
124 #undef DISPATCH_DECL1 void dispatchNext()
dispatches next queued method.
TQ_ULLONG filesize_t
64-bit file size
void sendMetaData()
Sends metadata set with setAllMetaData.
A namespace for TDEIO globals.
void setAllMetaData(const MetaData &)
Sets metadata.
This class provides a high performance implementation for the data url scheme (rfc2397).
Attention developers: If you change the implementation of TDEIO::Slave, do not use connection() or sl...
QueueType
identifiers of functions to be queued