aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/modules.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-26 02:18:05 +0000
committerlloyd <[email protected]>2008-10-26 02:18:05 +0000
commit17231ebbb95cc45cca50eabc4799c3058fc78ee9 (patch)
tree72b419fcd6a398463ccd0f763dc8bc639ab88b5c /src/libstate/modules.h
parent6f2a68c40d85026da907c8ce5366998f14a99d9c (diff)
Move libstate and selftest out of core/ dir to toplevel
Diffstat (limited to 'src/libstate/modules.h')
-rw-r--r--src/libstate/modules.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/libstate/modules.h b/src/libstate/modules.h
new file mode 100644
index 000000000..abbfbb2c6
--- /dev/null
+++ b/src/libstate/modules.h
@@ -0,0 +1,54 @@
+/*************************************************
+* Module Factory Header File *
+* (C) 1999-2008 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_MODULE_FACTORIES_H__
+#define BOTAN_MODULE_FACTORIES_H__
+
+#include <botan/init.h>
+#include <botan/mutex.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(Mutex_Factory*) 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(Mutex_Factory*) const;
+ std::vector<class Engine*> engines() const;
+
+ Builtin_Modules(const InitializerOptions&);
+ private:
+ const bool should_lock, use_engines;
+ };
+
+}
+
+#endif