diff options
Diffstat (limited to 'include/pipe.h')
-rw-r--r-- | include/pipe.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/pipe.h b/include/pipe.h index 9bc98a72b..9bf05b76a 100644 --- a/include/pipe.h +++ b/include/pipe.h @@ -18,7 +18,9 @@ namespace Botan { class Pipe : public DataSource { public: - static const u32bit LAST_MESSAGE, DEFAULT_MESSAGE; + typedef u32bit message_id; + + static const message_id LAST_MESSAGE, DEFAULT_MESSAGE; void write(const byte[], u32bit); void write(const MemoryRegion<byte>&); @@ -31,21 +33,21 @@ class Pipe : public DataSource void process_msg(const std::string&); void process_msg(DataSource&); - u32bit remaining(u32bit = DEFAULT_MESSAGE) const; + u32bit remaining(message_id = DEFAULT_MESSAGE) const; u32bit read(byte[], u32bit); - u32bit read(byte[], u32bit, u32bit); - u32bit read(byte&, u32bit = DEFAULT_MESSAGE); + u32bit read(byte[], u32bit, message_id); + u32bit read(byte&, message_id = DEFAULT_MESSAGE); - SecureVector<byte> read_all(u32bit = DEFAULT_MESSAGE); - std::string read_all_as_string(u32bit = DEFAULT_MESSAGE); + SecureVector<byte> read_all(message_id = DEFAULT_MESSAGE); + std::string read_all_as_string(message_id = DEFAULT_MESSAGE); u32bit peek(byte[], u32bit, u32bit) const; - u32bit peek(byte[], u32bit, u32bit, u32bit) const; - u32bit peek(byte&, u32bit, u32bit = DEFAULT_MESSAGE) const; + u32bit peek(byte[], u32bit, u32bit, message_id) const; + u32bit peek(byte&, u32bit, message_id = DEFAULT_MESSAGE) const; - u32bit default_msg() const { return default_read; } - void set_default_msg(u32bit); + message_id default_msg() const { return default_read; } + void set_default_msg(message_id); u32bit message_count() const; bool end_of_data() const; @@ -68,11 +70,11 @@ class Pipe : public DataSource void find_endpoints(Filter*); void clear_endpoints(Filter*); - u32bit get_message_no(const std::string&, u32bit) const; + message_id get_message_no(const std::string&, message_id) const; Filter* pipe; class Output_Buffers* outputs; - u32bit default_read; + message_id default_read; bool inside_msg; }; |