6#ifndef POOL_ISTORAGESVC_H
7#define POOL_ISTORAGESVC_H
66 static const char*
category() {
return "pool_IStorageSvc"; }
99 const std::string& refCont,
103 Token*& refpTok) = 0;
150 const std::string& cntName,
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition of the DbConnection class.
This class is highly inspired by the error code distribution system as it is used in DEC/VMS or MS/WN...
The IStorageSvc interface is able to handle user request for.
virtual DbStatus existsConnection(const SessionH sessionH, int mode, const FileDescriptor &refDB)=0
Check the existence of a logical Database unit.
virtual std::string getContName(FileDescriptor &refDB, Token &pToken)=0
Get container name for object.
virtual DbStatus read(const FileDescriptor &refDB, const Token &pToken, ShapeH shapeH, void **object)=0
Read a persistent object from the medium.
virtual DbStatus endSession(const SessionH session)=0
End the Database session.
@ SHAPE_NOT_AVAILIBLE
Requested shape is unfortunately not availible.
@ INVALID_CONNECTION_TOKEN
Invalid Database connection token.
@ INVALID_OBJECT
Object pointer is invalid.
@ ISTORAGESVC_INFO
Info tag.
@ ISTORAGESVC_ERROR
Error tag.
@ IS_PERSISTENT_SHAPE
Requested shape the persistent shape.
@ INVALID_SESSION_TOKEN
Invalid Database session token.
@ INVALID_AUTHENTICATION
Invalid Database authentication.
@ ISTORAGESVC_LAST
Terminator.
@ INVALID_OBJ_TOKEN
Invalid object address.
@ INVALID_TRANSACTION_TOKEN
Invalid Database Transaction token.
@ CONNECTION_NOT_EXISTING
Database does not exist.
@ TRANSACTION_FAILED
The Transaction failed.
@ OBJ_NOT_LOADED
Sorry, the requested object is not loaded.
virtual DbStatus openMode(FileDescriptor &refDB, int &mode)=0
Query the access mode of a Database unit.
virtual DbStatus endTransaction(ConnectionH conn, Transaction::Action typ)=0
End/Finish an existing Transaction sequence.
virtual ~IStorageSvc()
Destructor (called only by sub-classes)
virtual DbStatus allocate(FileDescriptor &refDB, const std::string &refCont, int technology, const void *object, ShapeH shapeH, Token *&refpTok)=0
Register object for write.
virtual DbStatus disconnect(FileDescriptor &refDB)=0
Disconnect from a logical Database unit.
static const Guid & interfaceID()
Retrieve interface ID.
virtual DbStatus startSession(int mode, int tech, SessionH &session)=0
Start a new Database Session.
virtual unsigned int addRef()=0
IInterface implementation: Reference Interface instance.
virtual DbStatus connect(const SessionH sessionH, int mode, FileDescriptor &refDB)=0
Connect to a logical Database unit.
virtual DbStatus queryInterface(const Guid &riid, void **ppvUnkn)=0
IInterface implementation: Query interfaces of Interface.
static const char * category()
Retrieve category name.
virtual DbStatus getShape(FileDescriptor &refDB, const Guid &objType, ShapeH &shapeH)=0
Retrieve persistent shape from Storage manager.
virtual DbStatus createShape(const FileDescriptor &refDB, const std::string &cntName, const Guid &shapeID, ShapeH &shapeH)=0
Create a persistent shape a given Database container.
virtual unsigned int release()=0
IInterface implementation: Release Interface instance.
IStorageSvc * createStorageSvc(const std::string &componentName)
class DatabaseConnection * ConnectionH
const class Shape * ShapeH