5 #ifndef DMLITE_CPP_IO_H
6 #define DMLITE_CPP_IO_H
8 #include "../common/config.h"
41 virtual struct stat
fstat(
void) throw (DmException);
47 virtual
size_t read(
char* buffer,
size_t count) throw (DmException);
53 virtual
size_t write(const
char* buffer,
size_t count) throw (DmException);
61 virtual
size_t readv(const struct iovec* vector,
size_t count) throw (DmException);
69 virtual
size_t writev(const struct iovec* vector,
size_t count) throw (DmException);
76 virtual
size_t pread(
void* buffer,
size_t count, off_t offset) throw (DmException);
83 virtual
size_t pwrite(const
void* buffer,
size_t count, off_t offset) throw (DmException);
88 virtual
void seek(off_t offset,
Whence whence) throw (DmException);
91 virtual off_t
tell(
void) throw (DmException);
94 virtual
void flush(
void) throw (DmException);
97 virtual
bool eof(
void) throw (DmException);
106 enum { kInsecure = 010 };
112 virtual std::string getImplId(
void)
const throw() = 0;
119 virtual
IOHandler* createIOHandler(const std::
string& pfn,
122 mode_t mode = 0660) throw (DmException);
127 virtual
void doneWriting(const
Location& loc) throw (DmException);
132 virtual
void setSecurityContext(const
SecurityContext* ctx) throw (DmException);
133 static
void setSecurityContext(IODriver* i,
144 friend class StackInstance;
147 virtual IODriver* createIODriver(
PluginManager* pm)
throw (DmException);
152 #endif // DMLITE_CPP_IO_H