 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
26 #ifndef USER_INTERACTION5_HPP
27 #define USER_INTERACTION5_HPP
29 #include "../my_config.h"
106 void warning(
const std::string & msg) { message(msg); };
113 virtual void pause(
const std::string & message)
127 virtual bool pause2(
const std::string & message)
128 {
throw Elibcall(
"user_interaction::pause2",
"user_interaction::pause() or pause2() must be overwritten !"); };
135 virtual std::string
get_string(
const std::string & message,
bool echo) = 0;
163 virtual void listing(
const std::string & flag,
164 const std::string & perm,
165 const std::string & uid,
166 const std::string & gid,
167 const std::string & size,
168 const std::string & date,
169 const std::string & filename,
203 const std::string & chemin,
204 const std::string & archive_name);
239 const std::string & data_date,
240 const std::string & data_presence,
241 const std::string & ea_date,
242 const std::string & ea_presence);
259 virtual void printf(
const char *format, ...)
override;
314 bool use_dar_manager_show_files;
315 bool use_dar_manager_contents;
316 bool use_dar_manager_statistics;
317 bool use_dar_manager_show_version;
virtual void dar_manager_contents(U_I number, const std::string &chemin, const std::string &archive_name)
virtual 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)
void warning(const std::string &msg)
method added for backward compatibility with API v5
This is a pure virtual class that is used by libdar when interaction with the user is required.
virtual std::string get_string(const std::string &message, bool echo)=0
method used to ask a question that needs an arbitrary answer.
virtual secu_string inherited_get_secu_string(const std::string &message, bool echo) override
same a get_string() but uses libdar::secu_string instead of std::string
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
defines the interaction interface between libdar and users.
void set_use_dar_manager_show_files(bool val)
method to be called with true as argument if you have defined a dar_manager_show_files() method.
the arbitrary large positive integer class
void set_use_dar_manager_contents(bool val)
method to be called with true as argument if you have defined a dar_manager_contents() method.
bool get_use_dar_manager_contents() const
this is not a virtual method, it has not to be overwritten in inherited classes.
virtual void dar_manager_show_version(U_I number, const std::string &data_date, const std::string &data_presence, const std::string &ea_date, const std::string &ea_presence)
virtual void dar_manager_show_files(const std::string &filename, bool data_change, bool ea_change)
bool get_use_listing() const
this is not a virtual method, it has not to be overwritten in inherited classes.
virtual void printf(const char *format,...) override
libdar uses this call to format output before send to message() method.
bool get_use_dar_manager_statistics() const
this is not a virtual method, it has not to be overwritten in inherited classes.
virtual void inherited_warning(const std::string &message)=0
to be defined by inherited classes
virtual void dar_manager_statistics(U_I number, const infinint &data_count, const infinint &total_data, const infinint &ea_count, const infinint &total_ea)
exception used to signal that the user has aborted the operation
bool get_use_dar_manager_show_version() const
this is not a virtual method, it has not to be overwritten in inherited classes.
void set_use_dar_manager_statistics(bool val)
method to be called with true as argument if you have defined a dar_manager_statistics() method.
virtual void pause(const std::string &message)
method used to ask a boolean question to the user.
exception used when memory has been exhausted
This is a pure virtual class that is used by libdar when interaction with the user is required.
libdar5 namespace encapsulate all libdar symbols
this file contains the definition of secu_string class, a std::string like class but allocated in sec...
virtual bool pause2(const std::string &message)
alternative method to the pause() method
bool get_use_dar_manager_show_files() const
this is not a virtual method, it has not to be overwritten in inherited classes.
virtual bool inherited_pause(const std::string &message) override
method used to ask a boolean question to the user.
void set_use_dar_manager_show_version(bool val)
method to be called with true as argument if you have defined a dar_manager_show_version() method.
exception used to signal an error in the argument given to libdar call of the API
std::shared_ptr< user_interaction > user_interaction5_clone_to_shared_ptr(user_interaction &dialog)
convert a user_interaction to a shared_pointer on a clone of that user_interaction
virtual void inherited_message(const std::string &message) override
need to be overwritten in place of the warning() method since API 3.1.x
this is the parent class of all exception classes.
virtual user_interaction * clone() const =0
make a newly allocated object which has the same properties as "this".
void set_use_listing(bool val)
method to be called with true as argument if you have defined a listing() method.
user_interaction()
class constructor.
virtual secu_string get_secu_string(const std::string &message, bool echo)=0
same a get_string() but uses secu_string instead
virtual std::string inherited_get_string(const std::string &message, bool echo) override
method used to ask a question that needs an arbitrary answer.
void warning_with_more(U_I num)
make a pause each N line of output when calling the warning method