aboutsummaryrefslogtreecommitdiffstats
path: root/include/modules.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-07-01 18:49:24 +0000
committerlloyd <[email protected]>2006-07-01 18:49:24 +0000
commit3d1d14cf405111e30643cf4c7674d441cc07a2e0 (patch)
treef3cdca0476a082634e97a4117c88e61c5a13036e /include/modules.h
parent8192e9fde8060c740a2e03c9d0def6e87d10b86b (diff)
Clean up initialization a little bit more
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/include/modules.h b/include/modules.h
index 48aeb11fb..81de52faf 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -6,6 +6,9 @@
#ifndef BOTAN_MODULE_FACTORIES_H__
#define BOTAN_MODULE_FACTORIES_H__
+#include <string>
+#include <vector>
+
namespace Botan {
/*************************************************
@@ -14,14 +17,14 @@ namespace Botan {
class Modules
{
public:
- void load(class Library_State&) const;
+ virtual class Mutex_Factory* mutex_factory() const = 0;
+ virtual class Timer* timer() const = 0;
- virtual class Mutex_Factory* mutex_factory() const { return 0; }
- virtual class Timer* timer() const { return 0; }
+ virtual std::string default_allocator() const = 0;
- virtual void set_allocators(class Library_State&, bool) const {}
- virtual void set_entropy_sources(class Library_State&) const {}
- virtual void set_engines(class Library_State&, bool) const {}
+ virtual std::vector<class Allocator*> allocators() const = 0;
+ virtual std::vector<class EntropySource*> entropy_sources() const = 0;
+ virtual std::vector<class Engine*> engines() const = 0;
virtual ~Modules() {}
};
@@ -35,9 +38,15 @@ class Builtin_Modules : public Modules
class Mutex_Factory* mutex_factory() const;
class Timer* timer() const;
- void set_allocators(class Library_State&, bool) const;
- void set_entropy_sources(class Library_State&) const;
- void set_engines(class Library_State&, bool) const;
+ std::string default_allocator() const;
+
+ std::vector<class Allocator*> allocators() const;
+ std::vector<class EntropySource*> entropy_sources() const;
+ std::vector<class Engine*> engines() const;
+
+ Builtin_Modules(bool sl) : should_lock(sl) {}
+ private:
+ const bool should_lock;
};
}