4#ifndef DMLITE_CPP_DMLITE_H
5#define DMLITE_CPP_DMLITE_H
7#include "dmlite/common/config.h"
10#include <boost/any.hpp>
54 const std::
string&
id) ;
60 const std::
string& value) ;
173 void set(
const std::string& key,
const boost::any& value) ;
178 boost::any
get(
const std::string& key)
const ;
182 void erase(
const std::string& key) ;
237 std::map<std::
string, boost::any> stackMsg_;
239 void setSecurityContextImpl_(
void);
254 #define PLUGIN_ID_HEADER dmlite::API_VERSION
AuthnFactory.
Definition authn.h:217
Base class for factories.
Definition base.h:48
Plug-ins must implement a concrete factory to be instantiated.
Definition catalog.h:237
Interface for Catalog (Namespaces).
Definition catalog.h:30
INodeFactory.
Definition inode.h:292
Plug-ins must implement a concrete factory to be instantiated.
Definition io.h:153
IO Driver.
Definition io.h:111
Joint between plugins and plugin-manager.
Definition dmlite.h:243
unsigned ApiVersion
Used to make sure API is consistent.
Definition dmlite.h:246
CatalogInterface can only be instantiated through this class.
Definition dmlite.h:42
std::list< IODriverFactory * > io_plugins_
Definition dmlite.h:139
PoolDriverFactory * getPoolDriverFactory(const std::string &pooltype)
Get the appropiate pool driver factory for the pool.
void configure(const std::string &key, const std::string &value)
CatalogFactory * getCatalogFactory()
Get the CatalogFactory implementation on top of the plugin stack.
void registerINodeFactory(INodeFactory *factory)
void registerCatalogFactory(CatalogFactory *factory)
std::string getConfiguration(const std::string &key)
void registerConfigureFactory(BaseFactory *factory)
std::list< void * > dlHandles_
Keep pointers returned by dlopen at hand to free on destruction.
Definition dmlite.h:144
INodeFactory * getINodeFactory()
AuthnFactory * getAuthnFactory()
Get the AuthnFactory implementation on top of the plugin stack.
std::list< PoolManagerFactory * > pool_plugins_
Definition dmlite.h:138
void loadPlugin(const std::string &lib, const std::string &id)
PoolManagerFactory * getPoolManagerFactory()
Get the PoolFactory implementation on top of the plugin stack.
void loadConfiguration(const std::string &file)
std::map< std::string, std::string > confValues_
Configuration key/value.
Definition dmlite.h:132
std::list< INodeFactory * > inode_plugins_
Definition dmlite.h:136
std::list< AuthnFactory * > authn_plugins_
Internal list of loaded plug-ins.
Definition dmlite.h:135
IODriverFactory * getIODriverFactory()
Get the IOFactory implementation on top of the plugin stack.
std::list< PoolDriverFactory * > pool_driver_plugins_
Definition dmlite.h:140
std::list< BaseFactory * > configure_factory_
Definition dmlite.h:141
PluginManager()
Constructor.
void registerAuthnFactory(AuthnFactory *factory)
void registerPoolDriverFactory(PoolDriverFactory *factory)
void registerIODriverFactory(IODriverFactory *factory)
std::list< CatalogFactory * > catalog_plugins_
Definition dmlite.h:137
void registerPoolManagerFactory(PoolManagerFactory *factory)
PoolDriver factory.
Definition pooldriver.h:126
Interface for a pool driver.
Definition pooldriver.h:101
Plug-ins must implement a concrete factory to be instantiated.
Definition poolmanager.h:109
Interface for pool types.
Definition poolmanager.h:41
Security context. To be created by the Authn.
Definition authn.h:73
Security credentials. To be filled by the front-end.
Definition authn.h:23
void eraseAll(void)
Erase all the values set previously.
const SecurityContext * getSecurityContext(void) const
Return the security context.
bool isTherePoolManager()
boost::any get(const std::string &key) const
bool contains(const std::string &key)
void erase(const std::string &key)
void setSecurityCredentials(const SecurityCredentials &cred)
Set the security credentials.
~StackInstance()
Destructor.
Catalog * getCatalog()
Get the catalog.
StackInstance(PluginManager *pm)
Constructor.
Authn * getAuthn()
Get the UsersDb interface.
PluginManager * getPluginManager()
Get the plugin manager.
void set(const std::string &key, const boost::any &value)
void setSecurityContext(const SecurityContext &ctx)
Set the security context.
INode * getINode()
Get the INode.
Exceptions used by the API.
Namespace for the dmlite C++ API.
Definition authn.h:16
const unsigned API_VERSION
API Version.
Definition dmlite.h:20
Logger::bitmask stackinstancelogmask
Logger::component stackinstancelogname