11 #include <botan/data_src.h>
12 #include <botan/filter.h>
13 #include <botan/exceptn.h>
64 void write(
const byte in[],
size_t length);
76 void write(
const std::string& in);
95 void process_msg(
const byte in[],
size_t length);
107 void process_msg(
const std::string& in);
121 size_t remaining(message_id msg = DEFAULT_MESSAGE)
const;
132 size_t read(
byte output[],
size_t length);
143 size_t read(
byte output[],
size_t length, message_id msg);
154 size_t read(
byte& output, message_id msg = DEFAULT_MESSAGE);
168 std::string read_all_as_string(message_id = DEFAULT_MESSAGE);
178 size_t peek(
byte output[],
size_t length,
size_t offset)
const;
189 size_t peek(
byte output[],
size_t length,
190 size_t offset, message_id msg)
const;
200 size_t peek(
byte& output,
size_t offset,
201 message_id msg = DEFAULT_MESSAGE)
const;
213 void set_default_msg(message_id msg);
219 message_id message_count()
const;
225 bool end_of_data()
const;
242 void prepend(
Filter* filt);
248 void append(
Filter* filt);
275 Pipe& operator=(
const Pipe&) {
return (*
this); }
277 void destruct(Filter*);
278 void find_endpoints(Filter*);
279 void clear_endpoints(Filter*);
281 message_id get_message_no(
const std::string&, message_id)
const;
284 class Output_Buffers* outputs;
285 message_id default_read;
295 BOTAN_DLL std::ostream&
operator<<(std::ostream& out, Pipe& pipe);
303 BOTAN_DLL std::istream&
operator>>(std::istream& in, Pipe& pipe);
307 #if defined(BOTAN_HAS_PIPE_UNIXFD_IO)
308 #include <botan/fd_unix.h>
Invalid_Message_Number(const std::string &where, message_id msg)
std::invalid_argument Invalid_Argument
int operator>>(int fd, Pipe &pipe)
static const message_id DEFAULT_MESSAGE
int operator<<(int fd, Pipe &pipe)
static const message_id LAST_MESSAGE
size_t default_msg() const
std::string to_string(u64bit n, size_t min_len)