5 #ifndef DMLITE_CPP_IO_H
6 #define DMLITE_CPP_IO_H
38 return std::string(
"IOHandler");
48 virtual struct ::stat
fstat(
void) throw (DmException);
54 virtual
size_t read(
char* buffer,
size_t count) throw (DmException);
60 virtual
size_t write(const
char* buffer,
size_t count) throw (DmException);
68 virtual
size_t readv(const struct iovec* vector,
size_t count) throw (DmException);
76 virtual
size_t writev(const struct iovec* vector,
size_t count) throw (DmException);
83 virtual
size_t pread(
void* buffer,
size_t count, off_t offset) throw (DmException);
90 virtual
size_t pwrite(const
void* buffer,
size_t count, off_t offset) throw (DmException);
95 virtual
void seek(off_t offset,
Whence whence) throw (DmException);
98 virtual off_t
tell(
void) throw (DmException);
101 virtual
void flush(
void) throw (DmException);
104 virtual
bool eof(
void) throw (DmException);
113 enum { kInsecure = 010 };
119 virtual std::string
getImplId(
void)
const throw() = 0;
126 virtual
IOHandler* createIOHandler(const std::
string& pfn,
129 mode_t mode = 0660) throw (DmException);
131 const std::
string& pfn,
134 mode_t mode = 0660) throw (DmException);
139 virtual
void doneWriting(const
Location& loc) throw (DmException);
144 virtual
void setSecurityContext(const
SecurityContext* ctx) throw (DmException);
145 static
void setSecurityContext(
IODriver* i,
156 friend class StackInstance;
165 #endif // DMLITE_CPP_IO_H