#include <io.h>
Inherits dmlite::BaseInterface, and dmlite::BaseFactory.
Inheritance diagram for dmlite::IODriver:
Public Types | |
| kInsecure = 010 | |
| enum | { kInsecure = 010 } |
Public Member Functions | |
| virtual | ~IODriver () |
| Virtual destructor. | |
| virtual std::string | getImplId (void) const =0 throw () |
| String ID of the implementation. | |
| virtual IOHandler * | createIOHandler (const std::string &pfn, int flags, const Extensible &extras, mode_t mode=0660) throw (DmException) |
| virtual void | doneWriting (const Location &loc) throw (DmException) |
Static Public Member Functions | |
| static IOHandler * | createIOHandler (IODriver *factory, const std::string &pfn, int flags, const Extensible &extras, mode_t mode=0660) throw (DmException) |
Protected Member Functions | |
| virtual void | setSecurityContext (const SecurityContext *ctx) throw (DmException) |
| Set the security context. | |
Static Protected Member Functions | |
| static void | setSecurityContext (IODriver *i, const SecurityContext *ctx) throw (DmException) |
Friends | |
| class | StackInstance |
| anonymous enum |
Use this flag in addition to the standard ones to skip any security check (i.e. token validation) Example: createIOHandler("/file.txt", O_RDONLY | IODriver::kInsecure, extras);
| virtual dmlite::IODriver::~IODriver | ( | ) | [virtual] |
Virtual destructor.
| static IOHandler* dmlite::IODriver::createIOHandler | ( | IODriver * | factory, | |
| const std::string & | pfn, | |||
| int | flags, | |||
| const Extensible & | extras, | |||
| mode_t | mode = 0660 | |||
| ) | throw (DmException) [static] |
| virtual IOHandler* dmlite::IODriver::createIOHandler | ( | const std::string & | pfn, | |
| int | flags, | |||
| const Extensible & | extras, | |||
| mode_t | mode = 0660 | |||
| ) | throw (DmException) [virtual] |
Instantiate a implementation of IOHandler
| pfn | The file name. | |
| flags | The open mode. See man 2 open. | |
| extras | As was given by the PoolHandler. | |
| mode | When called with O_CREAT, it will be used to create the file. |
| virtual void dmlite::IODriver::doneWriting | ( | const Location & | loc | ) | throw (DmException) [virtual] |
Must be called when the front-end is done writing.
| pfn | The file name. | |
| loc | The Location object as returned by whereToWrite |
| virtual std::string dmlite::IODriver::getImplId | ( | void | ) | const throw () [pure virtual] |
| static void dmlite::IODriver::setSecurityContext | ( | IODriver * | i, | |
| const SecurityContext * | ctx | |||
| ) | throw (DmException) [static, protected] |
| virtual void dmlite::IODriver::setSecurityContext | ( | const SecurityContext * | ctx | ) | throw (DmException) [protected, virtual] |
friend class StackInstance [friend] |
Reimplemented from dmlite::BaseInterface.
1.4.7