diff options
author | lloyd <[email protected]> | 2008-09-30 04:35:34 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-30 04:35:34 +0000 |
commit | 3c55f159b8e2ff80c0f0ab0820de0afc414be7db (patch) | |
tree | 6370650255987e8df89b8ef90f46a5eec92b70ed /src/core/libstate/init.h | |
parent | eee6e1e1ec225c3301cef6839225317a8cc9cf4a (diff) |
Split off part of the core module into libstate (basically the whole
lookup/global_state piece).
Move timer and mutex directories into utils/
Diffstat (limited to 'src/core/libstate/init.h')
-rw-r--r-- | src/core/libstate/init.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/core/libstate/init.h b/src/core/libstate/init.h new file mode 100644 index 000000000..f4296a868 --- /dev/null +++ b/src/core/libstate/init.h @@ -0,0 +1,50 @@ +/************************************************* +* Library Initialization Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_INIT_H__ +#define BOTAN_INIT_H__ + +#include <botan/build.h> +#include <string> +#include <map> + +namespace Botan { + +/************************************************* +* Options for initializing the library * +*************************************************/ +class BOTAN_DLL InitializerOptions + { + public: + bool thread_safe() const; + bool use_engines() const; + bool secure_memory() const; + bool fips_mode() const; + bool self_test() const; + + InitializerOptions(const std::string&); + private: + std::map<std::string, std::string> args; + }; + +/************************************************* +* Library Initialization/Shutdown Object * +*************************************************/ +class BOTAN_DLL LibraryInitializer + { + public: + static void initialize(const std::string& = ""); + static void initialize(const InitializerOptions&); + static void initialize(const InitializerOptions&, class Modules&); + static void deinitialize(); + + LibraryInitializer(const std::string& args = "") { initialize(args); } + LibraryInitializer(const InitializerOptions& args) { initialize(args); } + ~LibraryInitializer() { deinitialize(); } + }; + +} + +#endif |