21 #ifndef __TDEIO_DATASLAVE_H__ 22 #define __TDEIO_DATASLAVE_H__ 24 #include <tdeio/global.h> 25 #include <tdeio/slave.h> 30 #define DISPATCH_DECL(type) \ 31 void dispatch_##type(); 34 #define DISPATCH_DECL1(type, paramtype, param) \ 35 void dispatch_##type(paramtype param); 55 virtual void setHost(
const TQString &
host,
int port,
57 virtual void setConfig(
const MetaData &config);
59 virtual void suspend();
60 virtual void resume();
61 virtual bool suspended();
62 virtual void send(
int cmd,
const TQByteArray &data = TQByteArray());
64 virtual void hold(
const KURL &url);
67 virtual void get(
const KURL &url) = 0;
68 virtual void mimetype(
const KURL &url) = 0;
84 enum QueueType { Queue_mimeType = 1, Queue_totalSize,
85 Queue_sendMetaData, Queue_data, Queue_finished };
98 typedef TQValueList<QueueStruct> DispatchQueue;
99 DispatchQueue dispatchQueue;
101 DISPATCH_DECL1(mimeType,
const TQString &, s)
103 DISPATCH_DECL(sendMetaData)
104 DISPATCH_DECL1(data,
const TQByteArray &, ba)
105 DISPATCH_DECL(finished)
113 virtual void virtual_hook(
int id,
void* data );
123 #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