aboutsummaryrefslogtreecommitdiffstats
path: root/include/modules.h
diff options
context:
space:
mode:
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;
};
}