5 #ifndef DMLITE_CPP_IO_H
6 #define DMLITE_CPP_IO_H
38 return std::string(
"IOHandler");
45 virtual
int fileno(
void) throw (DmException);
51 virtual struct ::stat
fstat(
void) throw (DmException);
57 virtual
size_t read(
char* buffer,
size_t count) throw (DmException);
63 virtual
size_t write(const
char* buffer,
size_t count) throw (DmException);
71 virtual
size_t readv(const struct iovec* vector,
size_t count) throw (DmException);
79 virtual
size_t writev(const struct iovec* vector,
size_t count) throw (DmException);
86 virtual
size_t pread(
void* buffer,
size_t count, off_t offset) throw (DmException);
93 virtual
size_t pwrite(const
void* buffer,
size_t count, off_t offset) throw (DmException);
98 virtual
void seek(off_t offset,
Whence whence) throw (DmException);
101 virtual off_t
tell(
void) throw (DmException);
104 virtual
void flush(
void) throw (DmException);
107 virtual
bool eof(
void) throw (DmException);
116 enum { kInsecure = 010 };
122 virtual std::string
getImplId(
void)
const throw() = 0;
129 virtual
IOHandler* createIOHandler(const std::
string& pfn,
132 mode_t mode = 0660) throw (DmException);
134 const std::
string& pfn,
137 mode_t mode = 0660) throw (DmException);
142 virtual
void doneWriting(const
Location& loc) throw (DmException);
147 virtual
void setSecurityContext(const
SecurityContext* ctx) throw (DmException);
148 static
void setSecurityContext(
IODriver* i,
159 friend class StackInstance;
168 #endif // DMLITE_CPP_IO_H
virtual size_t pwrite(const void *buffer, size_t count, off_t offset)
virtual size_t writev(const struct iovec *vector, size_t count)
Beginning of the file.
Definition: io.h:28
Base class for interfaces.
Definition: base.h:18
virtual size_t write(const char *buffer, size_t count)
virtual void seek(off_t offset, Whence whence)
Security context. To be created by the Authn.
Definition: authn.h:64
virtual ~IOHandler()
Virtual destructor.
Header generated by CMake with the build configuration used.
Current position.
Definition: io.h:29
Represent the complete location of a file.
Definition: pooldriver.h:42
Base exception class.
Definition: exceptions.h:17
virtual size_t read(char *buffer, size_t count)
CatalogInterface can only be instantiated through this class.
Definition: dmlite.h:42
virtual bool eof(void)
Return true if end of file.
std::string getImplId(void) const
String ID of the implementation.
Definition: io.h:37
virtual int fileno(void)
Return internal file descriptor, if any.
IO interface.
Definition: io.h:26
Whence
Definition: io.h:28
Exceptions used by the API.
Plug-ins must implement a concrete factory to be instantiated.
Definition: io.h:153
Helpful typedef for KeyValue containers.
Definition: extensible.h:20
virtual size_t readv(const struct iovec *vector, size_t count)
Base class for factories.
Definition: base.h:48
Extensible types (hold metadata).
virtual off_t tell(void)
Return the cursor position.
virtual void flush(void)
Flush the buffer.
virtual size_t pread(void *buffer, size_t count, off_t offset)
End of file.
Definition: io.h:30
IO Driver.
Definition: io.h:111
virtual void close(void)
Close.
virtual struct::stat fstat(void)