Botan  1.11.10
out_buf.h
Go to the documentation of this file.
1 /*
2 * Output Buffer
3 * (C) 1999-2007 Jack Lloyd
4 * 2012 Markus Wanner
5 *
6 * Distributed under the terms of the Botan license
7 */
8 
9 #ifndef BOTAN_OUTPUT_BUFFER_H__
10 #define BOTAN_OUTPUT_BUFFER_H__
11 
12 #include <botan/types.h>
13 #include <botan/pipe.h>
14 #include <deque>
15 
16 namespace Botan {
17 
18 /**
19 * Container of output buffers for Pipe
20 */
22  {
23  public:
24  size_t read(byte[], size_t, Pipe::message_id);
25  size_t peek(byte[], size_t, size_t, Pipe::message_id) const;
26  size_t get_bytes_read(Pipe::message_id) const;
27  size_t remaining(Pipe::message_id) const;
28 
29  void add(class SecureQueue*);
30  void retire();
31 
33 
36  private:
37  class SecureQueue* get(Pipe::message_id) const;
38 
39  std::deque<SecureQueue*> buffers;
40  Pipe::message_id offset;
41  };
42 
43 }
44 
45 #endif
size_t read(byte[], size_t, Pipe::message_id)
Definition: out_buf.cpp:17
size_t peek(byte[], size_t, size_t, Pipe::message_id) const
Definition: out_buf.cpp:29
size_t message_id
Definition: pipe.h:33
uint8_t byte
Definition: types.h:30
Definition: buf_comp.h:15
size_t remaining(Pipe::message_id) const
Definition: out_buf.cpp:42
size_t get_bytes_read(Pipe::message_id) const
Definition: out_buf.cpp:53
void add(class SecureQueue *)
Definition: out_buf.cpp:64
Pipe::message_id message_count() const
Definition: out_buf.cpp:109