Botan  2.8.0
Crypto and TLS for C++11
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 * Botan is released under the Simplified BSD License (see license.txt)
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(uint8_t[], size_t, Pipe::message_id);
25  size_t peek(uint8_t[], 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 
35  private:
36  class SecureQueue* get(Pipe::message_id) const;
37 
38  std::deque<std::unique_ptr<SecureQueue>> m_buffers;
39  Pipe::message_id m_offset;
40  };
41 
42 }
43 
44 #endif
size_t get_bytes_read(Pipe::message_id) const
Definition: out_buf.cpp:53
size_t remaining(Pipe::message_id) const
Definition: out_buf.cpp:42
size_t message_id
Definition: pipe.h:35
int(* final)(unsigned char *, CTX *)
Pipe::message_id message_count() const
Definition: out_buf.cpp:108
Definition: alg_id.cpp:13
size_t peek(uint8_t[], size_t, size_t, Pipe::message_id) const
Definition: out_buf.cpp:29
void add(class SecureQueue *)
Definition: out_buf.cpp:64
size_t read(uint8_t[], size_t, Pipe::message_id)
Definition: out_buf.cpp:17