summaryrefslogtreecommitdiffstats
path: root/botan/src/filters/secqueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'botan/src/filters/secqueue.h')
-rw-r--r--botan/src/filters/secqueue.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/botan/src/filters/secqueue.h b/botan/src/filters/secqueue.h
new file mode 100644
index 0000000..fc1fc21
--- /dev/null
+++ b/botan/src/filters/secqueue.h
@@ -0,0 +1,43 @@
+/*
+* SecureQueue
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#ifndef BOTAN_SECURE_QUEUE_H__
+#define BOTAN_SECURE_QUEUE_H__
+
+#include <botan/data_src.h>
+#include <botan/filter.h>
+
+namespace Botan {
+
+/*
+* SecureQueue
+*/
+class BOTAN_DLL SecureQueue : public Fanout_Filter, public DataSource
+ {
+ public:
+ void write(const byte[], u32bit);
+
+ u32bit read(byte[], u32bit);
+ u32bit peek(byte[], u32bit, u32bit = 0) const;
+
+ bool end_of_data() const;
+ u32bit size() const;
+ bool attachable() { return false; }
+
+ SecureQueue& operator=(const SecureQueue&);
+ SecureQueue();
+ SecureQueue(const SecureQueue&);
+ ~SecureQueue() { destroy(); }
+ private:
+ void destroy();
+ class SecureQueueNode* head;
+ class SecureQueueNode* tail;
+ };
+
+}
+
+#endif