00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef QIODEVICES_H
00023 #define QIODEVICES_H
00024
00025 #include "QIODevice.h"
00026
00027 namespace FX {
00028
00052 class FXAPI QIODeviceS : public QIODevice
00053 {
00054 protected:
00055 QIODeviceS(const QIODeviceS &o) : QIODevice(o) { }
00056 public:
00057 QIODeviceS() : QIODevice() { }
00058 virtual bool isSynchronous() const { return true; }
00059
00061 virtual bool create(FXuint mode=IO_ReadWrite)=0;
00063 virtual bool open(FXuint mode=IO_ReadWrite)=0;
00065 virtual void truncate(FXfval) { }
00067 virtual FXfval at() const { return 0; }
00069 virtual bool at(FXfval) { return false; }
00071 virtual bool atEnd() const { return size()==0; }
00072
00074 virtual FXuval readBlockFrom(char *data, FXuval maxlen, FXfval pos);
00076 virtual FXuval writeBlockTo(FXfval pos, const char *data, FXuval maxlen);
00077 public:
00086 static bool waitForData(QIODeviceS **signalled, FXuint no, QIODeviceS **list, FXuint waitfor=FXINFINITE);
00088 static FXuint waitForDataMax() throw();
00089 private:
00090 friend class QSSLDevice;
00091 virtual FXDLLLOCAL void *int_getOSHandle() const=0;
00092 };
00093
00094 }
00095
00096 #endif