The unified diff between revisions [93e5c315..] and [51b865be..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'include/libstate.h'

#
#
# patch "include/libstate.h"
#  from [a656e25041fa95672be46a6b1d23d90ee9b9b3b9]
#    to [723c0621d44f4e256cb7f45a809707bea2089af9]
#
============================================================
--- include/libstate.h	a656e25041fa95672be46a6b1d23d90ee9b9b3b9
+++ include/libstate.h	723c0621d44f4e256cb7f45a809707bea2089af9
@@ -1,15 +1,13 @@
 /*************************************************
 * Library Internal/Global State Header File      *
-* (C) 1999-2007 The Botan Project                *
+* (C) 1999-2008 Jack Lloyd                       *
 *************************************************/

 #ifndef BOTAN_LIB_STATE_H__
 #define BOTAN_LIB_STATE_H__

 #include <botan/base.h>
-#include <botan/enums.h>
 #include <botan/init.h>
-#include <botan/ui.h>
 #include <string>
 #include <vector>
 #include <map>
@@ -19,7 +17,7 @@ namespace Botan {
 /*************************************************
 * Global State Container Base                    *
 *************************************************/
-class Library_State
+class BOTAN_DLL Library_State
    {
    public:
       Library_State();
@@ -31,7 +29,7 @@ class Library_State

       void add_engine(class Engine*);

-      class Engine_Iterator
+      class BOTAN_DLL Engine_Iterator
          {
          public:
             class Engine* next();
@@ -48,6 +46,7 @@ class Library_State

       bool rng_is_seeded() const { return rng->is_seeded(); }
       void randomize(byte[], u32bit);
+      byte random();

       void set_prng(RandomNumberGenerator*);
       void add_entropy_source(EntropySource*, bool = true);
@@ -58,10 +57,6 @@ class Library_State
       class Config& config() const;

       class Mutex* get_mutex() const;
-
-      void set_x509_state(class X509_GlobalState*);
-      class X509_GlobalState& x509_state();
-
    private:
       Library_State(const Library_State&) {}
       Library_State& operator=(const Library_State&) { return (*this); }
@@ -69,28 +64,28 @@ class Library_State
       class Engine* get_engine_n(u32bit) const;

       class Mutex_Factory* mutex_factory;
-      class Mutex* allocator_lock;
-      class Mutex* engine_lock;
-      class Mutex* rng_lock;

       mutable class Config* config_obj;
-      class X509_GlobalState* x509_state_obj;

+      class Mutex* allocator_lock;
       std::map<std::string, Allocator*> alloc_factory;
       mutable Allocator* cached_default_allocator;

+      class Mutex* rng_lock;
       RandomNumberGenerator* rng;
       std::vector<Allocator*> allocators;
       std::vector<EntropySource*> entropy_sources;
+
+      class Mutex* engine_lock;
       std::vector<class Engine*> engines;
    };

 /*************************************************
 * Global State                                   *
 *************************************************/
-Library_State& global_state();
-void set_global_state(Library_State*);
-Library_State* swap_global_state(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*);

 }