Disk ARchive 2.3.12
|
full implemented class for user_interaction based on callback functions. More...
#include <user_interaction.hpp>
Inherits libdar::user_interaction.
Public Member Functions | |
user_interaction_callback (void(*x_warning_callback)(const std::string &x, void *context), bool(*x_answer_callback)(const std::string &x, void *context), std::string(*x_string_callback)(const std::string &x, bool echo, void *context), void *context_value) | |
constructor which receive the callback functions. | |
void | pause (const std::string &message) |
overwritting method from parent class. | |
std::string | get_string (const std::string &message, bool echo) |
overwritting method from parent class. | |
void | listing (const std::string &flag, const std::string &perm, const std::string &uid, const std::string &gid, const std::string &size, const std::string &date, const std::string &filename, bool is_dir, bool has_children) |
overwritting method from parent class. | |
void | dar_manager_show_files (const std::string &filename, bool available_data, bool available_ea) |
overwritting method from parent class | |
void | dar_manager_contents (U_I number, const std::string &chemin, const std::string &archive_name) |
overwritting method from parent class | |
void | dar_manager_statistics (U_I number, const infinint &data_count, const infinint &total_data, const infinint &ea_count, const infinint &total_ea) |
overwritting method from parent class | |
void | dar_manager_show_version (U_I number, const std::string &data_date, const std::string &ea_date) |
overwritting method from parent class | |
void | set_listing_callback (void(*callback)(const std::string &flag, const std::string &perm, const std::string &uid, const std::string &gid, const std::string &size, const std::string &date, const std::string &filename, bool is_dir, bool has_children, void *context)) |
You can set a listing callback thanks to this method. | |
void | set_dar_manager_show_files_callback (void(*callback)(const std::string &filename, bool available_data, bool available_ea, void *context)) |
void | set_dar_manager_contents_callback (void(*callback)(U_I number, const std::string &chemin, const std::string &archive_name, void *context)) |
void | set_dar_manager_statistics_callback (void(*callback)(U_I number, const infinint &data_count, const infinint &total_data, const infinint &ea_count, const infinint &total_ea, void *context)) |
void | set_dar_manager_show_version_callback (void(*callback)(U_I number, const std::string &data_date, const std::string &ea_date, void *context)) |
virtual user_interaction * | clone () const |
overwritting method from parent class. | |
Protected Member Functions | |
void | inherited_warning (const std::string &message) |
overwritting method from parent class. |
full implemented class for user_interaction based on callback functions.
this class is an inherited class of user_interaction it is used by dar command line programs, but you can use it if you wish.
Definition at line 319 of file user_interaction.hpp.
libdar::user_interaction_callback::user_interaction_callback | ( | void(*)(const std::string &x, void *context) | x_warning_callback, |
bool(*)(const std::string &x, void *context) | x_answer_callback, | ||
std::string(*)(const std::string &x, bool echo, void *context) | x_string_callback, | ||
void * | context_value | ||
) |
constructor which receive the callback functions.
[in] | x_warning_callback | is used by warning() method |
[in] | x_answer_callback | is used by the pause() method |
[in] | x_string_callback | is used by get_string() method |
[in] | context_value | will be passed as last argument of callbacks when called from this object. |
void libdar::user_interaction_callback::set_listing_callback | ( | void(*)(const std::string &flag, const std::string &perm, const std::string &uid, const std::string &gid, const std::string &size, const std::string &date, const std::string &filename, bool is_dir, bool has_children, void *context) | callback | ) | [inline] |
You can set a listing callback thanks to this method.
If set, when file listing will this callback function will be used instead of the x_warning_callback given as argument of the constructor.
Definition at line 382 of file user_interaction.hpp.
References libdar::user_interaction::set_use_listing().