51 tuyau(
const std::shared_ptr<user_interaction> & dialog,
54 tuyau(
const std::shared_ptr<user_interaction> & dialog,
58 tuyau(
const std::shared_ptr<user_interaction> & dialog,
59 const std::string &filename,
63 tuyau(
const std::shared_ptr<user_interaction> & dialog);
66 tuyau & operator = (
const tuyau & ref) =
default;
67 tuyau & operator = (
tuyau && ref)
noexcept =
default;
88 virtual bool skip_relative(
signed int x)
override;
92 bool has_next_to_read();
this is the interface class from which all other data transfer classes inherit
the arbitrary large positive integer class
class mem_ui to keep a copy of a user_interaction object
class to be used as parent to provide checkpoints to inherited classes
pipe implementation under the generic_file interface.
bool read_to_eof()
skip to eof by reading data
std::string chemin
in pipe_path mode only, this holds the named pipe to be open
virtual void inherited_terminate() override
destructor-like call, except that it is allowed to throw exceptions
int other_end_fd
in pipe_both mode, this holds the reading side of the anonymous pipe
tuyau(const std::shared_ptr< user_interaction > &dialog, int fd)
bool read_and_drop(infinint byte)
skip forward by reading data
virtual bool skippable(skippability direction, const infinint &amount) override
whether the implementation is able to skip
virtual infinint get_position() const override
get the current read/write position
virtual void inherited_read_ahead(const infinint &amount) override
tells the object that several calls to read() will follow to probably obtain at least the given amoun...
virtual bool skip_to_eof() override
skip to the end of file
void do_not_close_read_fd()
ask to not close the read descriptor upon object destruction (the fd survives the object)
virtual U_I inherited_read(char *a, U_I size) override
implementation of read() operation
virtual bool skip(const infinint &pos) override
skip at the absolute position
virtual void inherited_write(const char *a, U_I size) override
implementation of the write() operation
void close_read_fd()
closes the read fd of the anonymous pipe (this is to be used by a writer)
tuyau(const std::shared_ptr< user_interaction > &dialog)
creates a anonymous pipe and bind itself to the writing end. The reading end can be obtained by get_r...
infinint position
recorded position in the stream
tuyau(const std::shared_ptr< user_interaction > &dialog, const std::string &filename, gf_mode mode)
virtual void inherited_flush_read() override
reset internal engine, flush caches in order to read the data at current position
virtual bool truncatable(const infinint &pos) const override
whether the implementation is able to truncate to the given position
int filedesc
file descriptors of the pipe
char next_to_read
when has_one_to_read is true, contains the next to read byte
bool has_one_to_read
if true, the next char to read is placed in "next_to_read"
tuyau(const std::shared_ptr< user_interaction > &dialog, int fd, gf_mode mode)
enum libdar::tuyau::@4 pipe_mode
defines how the object's status (which possible values defined by the anonymous enum above)
virtual void inherited_sync_write() override
write down any pending data
virtual void inherited_truncate(const infinint &pos) override
truncate file at the give offset
@ pipe_path
holds a filename to be openned (named pipe)
@ pipe_fd
holds a single file descriptor for the pipe
@ pipe_both
holds a pair of file descriptors
class generic_file is defined here as well as class fichier
gf_mode
generic_file openning modes
switch module to limitint (32 ou 64 bits integers) or infinint
class mem_ui definition. This class is to be used as parent class to handle user_interaction object m...
include macro defined by the configure script and some specific additional ones
libdar namespace encapsulate all libdar symbols
to be able to cancel libdar operation while running in a given thread.