aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/modules.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/modules.h')
-rw-r--r--src/core/modules.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/core/modules.h b/src/core/modules.h
new file mode 100644
index 000000000..69a6e1ffb
--- /dev/null
+++ b/src/core/modules.h
@@ -0,0 +1,51 @@
+/*************************************************
+* Module Factory Header File *
+* (C) 1999-2008 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_MODULE_FACTORIES_H__
+#define BOTAN_MODULE_FACTORIES_H__
+
+#include <botan/init.h>
+#include <string>
+#include <vector>
+
+namespace Botan {
+
+/*************************************************
+* Module Builder Interface *
+*************************************************/
+class BOTAN_DLL Modules
+ {
+ public:
+ virtual class Mutex_Factory* mutex_factory(bool) const = 0;
+
+ virtual std::string default_allocator() const = 0;
+
+ virtual std::vector<class Allocator*> allocators() const = 0;
+ virtual std::vector<class Engine*> engines() const = 0;
+
+ virtual ~Modules() {}
+ };
+
+/*************************************************
+* Built In Modules *
+*************************************************/
+class BOTAN_DLL Builtin_Modules : public Modules
+ {
+ public:
+ class Mutex_Factory* mutex_factory(bool) const;
+
+ std::string default_allocator() const;
+
+ std::vector<class Allocator*> allocators() const;
+ std::vector<class Engine*> engines() const;
+
+ Builtin_Modules(const InitializerOptions&);
+ private:
+ const bool should_lock, use_engines;
+ };
+
+}
+
+#endif