diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/botan.h | 1 | ||||
-rw-r--r-- | include/config.h | 47 | ||||
-rw-r--r-- | include/libstate.h | 17 |
3 files changed, 14 insertions, 51 deletions
diff --git a/include/botan.h b/include/botan.h index 74a6628a0..70261398a 100644 --- a/include/botan.h +++ b/include/botan.h @@ -5,7 +5,6 @@ #include <botan/base.h> #include <botan/rng.h> -#include <botan/config.h> #include <botan/init.h> #include <botan/lookup.h> #include <botan/version.h> diff --git a/include/config.h b/include/config.h deleted file mode 100644 index 65147e3e6..000000000 --- a/include/config.h +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************* -* Configuration Handling Header File * -* (C) 1999-2008 Jack Lloyd * -*************************************************/ - -#ifndef BOTAN_POLICY_CONF_H__ -#define BOTAN_POLICY_CONF_H__ - -#include <botan/mutex.h> -#include <string> -#include <map> - -namespace Botan { - -/************************************************* -* Library Configuration Settings * -*************************************************/ -class BOTAN_DLL Config - { - public: - Config(); - ~Config(); - - void load_defaults(); - - std::string get(const std::string&, const std::string&) const; - bool is_set(const std::string&, const std::string&) const; - void set(const std::string&, const std::string&, - const std::string&, bool = true); - - std::string option(const std::string&) const; - - void set_option(const std::string, const std::string&); - - void add_alias(const std::string&, const std::string&); - std::string deref_alias(const std::string&) const; - private: - Config(const Config&) {} - Config& operator=(const Config&) { return (*this); } - - std::map<std::string, std::string> settings; - Mutex* mutex; - }; - -} - -#endif diff --git a/include/libstate.h b/include/libstate.h index 63c01d270..f6a616bba 100644 --- a/include/libstate.h +++ b/include/libstate.h @@ -43,13 +43,23 @@ class BOTAN_DLL Library_State Allocator* get_allocator(const std::string& = "") const; void add_allocator(Allocator*); - void set_default_allocator(const std::string&) const; + void set_default_allocator(const std::string&); + + std::string get(const std::string&, const std::string&) const; + bool is_set(const std::string&, const std::string&) const; + void set(const std::string&, const std::string&, + const std::string&, bool = true); - class Config& config() const; std::string option(const std::string&) const; + void set_option(const std::string, const std::string&); + + void add_alias(const std::string&, const std::string&); + std::string deref_alias(const std::string&) const; class Mutex* get_mutex() const; private: + void load_default_config(); + Library_State(const Library_State&) {} Library_State& operator=(const Library_State&) { return (*this); } @@ -57,7 +67,8 @@ class BOTAN_DLL Library_State class Mutex_Factory* mutex_factory; - mutable class Config* config_obj; + std::map<std::string, std::string> config; + class Mutex* config_lock; class Mutex* allocator_lock; std::map<std::string, Allocator*> alloc_factory; |