aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/libstate.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-13 16:05:37 +0000
committerlloyd <[email protected]>2009-10-13 16:05:37 +0000
commit6f68dc5485ebd41fdef837ab651a47a893d84408 (patch)
tree3cda82570052b7bed24df2754c2245479188488a /src/libstate/libstate.h
parent9268a0455a07d31a66364aa5b7594bd75250b466 (diff)
parent1b0448fae6652a2da7f0de1fdcd2bbcda9836ca9 (diff)
propagate from branch 'net.randombit.botan' (head 139d6957d20f0b1202e0eacc63cb011588faffde)
to branch 'net.randombit.botan.c++0x' (head c16676fa6c393bc3f46a044755ce525a013380a6)
Diffstat (limited to 'src/libstate/libstate.h')
-rw-r--r--src/libstate/libstate.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h
index a0421953e..91fd58dff 100644
--- a/src/libstate/libstate.h
+++ b/src/libstate/libstate.h
@@ -12,6 +12,7 @@
#include <botan/allocate.h>
#include <botan/algo_factory.h>
+#include <mutex>
#include <string>
#include <vector>
#include <map>
@@ -27,11 +28,11 @@ class BOTAN_DLL Library_State
Library_State();
~Library_State();
- void initialize(bool thread_safe);
+ void initialize();
Algorithm_Factory& algorithm_factory();
- Allocator* get_allocator(const std::string& = "") const;
+ Allocator* get_allocator(const std::string& = "");
void add_allocator(Allocator*);
void set_default_allocator(const std::string&);
@@ -42,7 +43,7 @@ class BOTAN_DLL Library_State
* @result the value of the parameter
*/
std::string get(const std::string& section,
- const std::string& key) const;
+ const std::string& key);
/**
* Check whether a certain parameter is set
@@ -52,7 +53,7 @@ class BOTAN_DLL Library_State
* @result true if the parameters value is set,
* false otherwise
*/
- bool is_set(const std::string& section, const std::string& key) const;
+ bool is_set(const std::string& section, const std::string& key);
/**
* Set a configuration parameter.
@@ -70,7 +71,7 @@ class BOTAN_DLL Library_State
* referred to as option).
* @param key the desired keys name
*/
- std::string option(const std::string& key) const;
+ std::string option(const std::string& key);
/**
* Set an option.
@@ -91,21 +92,17 @@ class BOTAN_DLL Library_State
* @param alias the alias to resolve.
* @return what the alias stands for
*/
- std::string deref_alias(const std::string&) const;
-
- class Mutex* get_mutex() const;
+ std::string deref_alias(const std::string&);
private:
void load_default_config();
Library_State(const Library_State&) {}
Library_State& operator=(const Library_State&) { return (*this); }
- class Mutex_Factory* mutex_factory;
-
+ std::mutex config_lock;
std::map<std::string, std::string> config;
- class Mutex* config_lock;
- class Mutex* allocator_lock;
+ std::mutex allocator_lock;
std::map<std::string, Allocator*> alloc_factory;
mutable Allocator* cached_default_allocator;
std::vector<Allocator*> allocators;