diff options
author | lloyd <[email protected]> | 2010-03-10 16:35:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-10 16:35:12 +0000 |
commit | ffebc65a41fbe22934830203cfa4ee791804796b (patch) | |
tree | 8ce04eba960bd524f58e096ac979e7f639696c6a /src/libstate/libstate.h | |
parent | d3e279ec353133e9f80f13a536aae15e49c2a206 (diff) | |
parent | fd79f63a44ad0b59507ac67bdb3eccbe4d45adbc (diff) |
propagate from branch 'net.randombit.botan' (head 74e9e8642943d126a5e5efa5be1da8351f0fb6d7)
to branch 'net.randombit.botan.c++0x' (head 24371f742c2a1c7e5f3aace364fbb21e01c94657)
Diffstat (limited to 'src/libstate/libstate.h')
-rw-r--r-- | src/libstate/libstate.h | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h index 5a84f9cb1..36c428ecb 100644 --- a/src/libstate/libstate.h +++ b/src/libstate/libstate.h @@ -36,7 +36,7 @@ class BOTAN_DLL Library_State /** * @return the global Algorithm_Factory */ - Algorithm_Factory& algorithm_factory(); + Algorithm_Factory& algorithm_factory() const; /** * @param name the name of the allocator @@ -90,21 +90,6 @@ class BOTAN_DLL Library_State bool overwrite = true); /** - * Get a parameters value out of the "conf" section ( - * referred to as option). - * @param key the desired keys name - */ - std::string option(const std::string& key); - - /** - * Set an option. - * @param key the key of the option to set - * @param value the value to set - */ - void set_option(const std::string& key, - const std::string& value); - - /** * Add a parameter value to the "alias" section. * @param key the name of the parameter which shall have a new alias * @param value the new alias @@ -125,6 +110,7 @@ class BOTAN_DLL Library_State std::map<std::string, std::string> config; std::mutex allocator_lock; + std::string default_allocator_name; std::map<std::string, Allocator*> alloc_factory; mutable Allocator* cached_default_allocator; std::vector<Allocator*> allocators; @@ -132,12 +118,24 @@ class BOTAN_DLL Library_State Algorithm_Factory* m_algorithm_factory; }; -/* -* Global State +/** +* Access the global library state +* @return reference to the global library state */ BOTAN_DLL Library_State& global_state(); -BOTAN_DLL void set_global_state(Library_State*); -BOTAN_DLL Library_State* swap_global_state(Library_State*); + +/** +* Set the global state object +* @param state the new global state to use +*/ +BOTAN_DLL void set_global_state(Library_State* state); + +/** +* Swap the current state for another +* @param new_state the new state object to use +* @return the previous state (or NULL if none) +*/ +BOTAN_DLL Library_State* swap_global_state(Library_State* new_state); } |