aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-10-13 20:40:49 +0000
committerlloyd <[email protected]>2007-10-13 20:40:49 +0000
commit83784f32b65b822636355eafa0ba744456cdc753 (patch)
tree4e0cd71c49ddc1454dae15284802bbe8ea52c083 /include
parente0fe7b1a473dd862e41a662d4bb9edab381370cf (diff)
The last checkin did not work; the Library_State constructor called code1.7.2
that called global_state(), which cased an infinite recursion. Make creating a Library_State a two-phase operation, first an empty constructor (just sets all pointers to NULL), then an initializer that sets up everything needed to start up the library.
Diffstat (limited to 'include')
-rw-r--r--include/libstate.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/libstate.h b/include/libstate.h
index 564605a2a..666677ff3 100644
--- a/include/libstate.h
+++ b/include/libstate.h
@@ -22,6 +22,15 @@ namespace Botan {
class Library_State
{
public:
+ Library_State();
+ ~Library_State();
+
+ void initialize(const InitializerOptions&, Modules&);
+
+ void load(Modules&);
+
+ void add_engine(class Engine*);
+
class Engine_Iterator
{
public:
@@ -58,8 +67,6 @@ class Library_State
class Config& config() const;
- void add_engine(class Engine*);
-
class Mutex* get_mutex() const;
class Mutex* get_named_mutex(const std::string&);
@@ -72,9 +79,6 @@ class Library_State
void set_transcoder(class Charset_Transcoder*);
std::string transcode(const std::string,
Character_Set, Character_Set) const;
-
- Library_State(const InitializerOptions&, Modules&);
- ~Library_State();
private:
Library_State(const Library_State&) {}
Library_State& operator=(const Library_State&) { return (*this); }