35#ifndef USER_INTERACTION_CALLBACK_HPP
36#define USER_INTERACTION_CALLBACK_HPP
61 using message_callback = void (*)(
const std::string &x,
void *context);
62 using pause_callback = bool (*)(
const std::string &x,
void *context);
63 using get_string_callback = std::string (*)(
const std::string &x,
bool echo,
void *context);
64 using get_secu_string_callback =
secu_string (*)(
const std::string &x,
bool echo,
void *context);
79 pause_callback x_answer_callback,
80 get_string_callback x_string_callback,
81 get_secu_string_callback x_secu_string_callback,
117 message_callback message_cb;
118 pause_callback pause_cb;
119 get_string_callback get_string_cb;
120 get_secu_string_callback get_secu_string_cb;
full implemented class for user_interaction based on callback functions.
virtual secu_string inherited_get_secu_string(const std::string &message, bool echo) override
overwritting method from parent class.
virtual bool inherited_pause(const std::string &message) override
overwritting method from parent class.
virtual std::string inherited_get_string(const std::string &message, bool echo) override
overwritting method from parent class.
user_interaction_callback(message_callback x_message_callback, pause_callback x_answer_callback, get_string_callback x_string_callback, get_secu_string_callback x_secu_string_callback, void *context_value)
constructor which receive the callback functions.
virtual void inherited_message(const std::string &message) override
listing callback can be now passed directly to archive::get_children_of()
void change_context_value(void *new_value)
change the context value of the object that will be given to callback functions
This is a pure virtual class that is used by libdar when interaction with the user is required.
include macro defined by the configure script and some specific additional ones
libdar namespace encapsulate all libdar symbols
this file contains the definition of secu_string class, a std::string like class but allocated in sec...
defines the interaction interface between libdar and users.