diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/exceptn.h | 8 | ||||
-rw-r--r-- | include/out_buf.h | 13 | ||||
-rw-r--r-- | include/pipe.h | 8 |
3 files changed, 14 insertions, 15 deletions
diff --git a/include/exceptn.h b/include/exceptn.h index 1381782cf..5b0106105 100644 --- a/include/exceptn.h +++ b/include/exceptn.h @@ -60,14 +60,6 @@ struct Invalid_IV_Length : public Invalid_Argument }; /************************************************* -* Invalid_Message_Number Exception * -*************************************************/ -struct Invalid_Message_Number : public Invalid_Argument - { - Invalid_Message_Number(const std::string&, u32bit); - }; - -/************************************************* * Invalid_State Exception * *************************************************/ struct Invalid_State : public Exception diff --git a/include/out_buf.h b/include/out_buf.h index 8965e3895..1e169b9bc 100644 --- a/include/out_buf.h +++ b/include/out_buf.h @@ -7,6 +7,7 @@ #define BOTAN_OUTPUT_BUFFER_H__ #include <botan/types.h> +#include <botan/pipe.h> #include <deque> namespace Botan { @@ -17,22 +18,22 @@ namespace Botan { class Output_Buffers { public: - u32bit read(byte[], u32bit, u32bit); - u32bit peek(byte[], u32bit, u32bit, u32bit) const; - u32bit remaining(u32bit) const; + u32bit read(byte[], u32bit, Pipe::message_id); + u32bit peek(byte[], u32bit, u32bit, Pipe::message_id) const; + u32bit remaining(Pipe::message_id) const; void add(class SecureQueue*); void retire(); - u32bit message_count() const; + Pipe::message_id message_count() const; Output_Buffers(); ~Output_Buffers(); private: - class SecureQueue* get(u32bit) const; + class SecureQueue* get(Pipe::message_id) const; std::deque<SecureQueue*> buffers; - u32bit offset; + Pipe::message_id offset; }; } diff --git a/include/pipe.h b/include/pipe.h index 20fdc6a41..89f1ac4db 100644 --- a/include/pipe.h +++ b/include/pipe.h @@ -20,6 +20,12 @@ class Pipe : public DataSource public: typedef u32bit message_id; + class Invalid_Message_Number : public Invalid_Argument + { + public: + Invalid_Message_Number(const std::string&, message_id); + }; + static const message_id LAST_MESSAGE, DEFAULT_MESSAGE; void write(const byte[], u32bit); @@ -48,7 +54,7 @@ class Pipe : public DataSource message_id default_msg() const { return default_read; } void set_default_msg(message_id); - u32bit message_count() const; + message_id message_count() const; bool end_of_data() const; void start_msg(); |