27 #ifndef SHELL_INTERACTION_HPP
28 #define SHELL_INTERACTION_HPP
37 #include "../my_config.h"
50 class shell_interaction :
public user_interaction
58 shell_interaction(std::ostream & out,
59 std::ostream & interact,
63 shell_interaction(
const shell_interaction & ref);
66 shell_interaction(shell_interaction && ref) noexcept =
delete;
69 shell_interaction & operator = (
const shell_interaction & ref) =
delete;
72 shell_interaction & operator = (shell_interaction && ref) noexcept =
delete;
77 void change_non_interactive_output(std::ostream & out);
78 void read_char(
char & a);
79 void set_beep(
bool mode) { beep = mode; };
87 void warning_with_more(U_I num) { at_once = num; count = 0; };
90 void archive_show_contents(
const archive & ref,
const archive_options_listing_shell & options);
93 void database_show_contents(
const database & ref);
96 void database_show_files(
const database & ref, archive_num num,
const database_used_options & opt);
99 void database_show_version(
const database & ref,
const path & chem);
102 void database_show_statistics(
const database &ref);
107 virtual void inherited_message(
const std::string & message)
override;
108 virtual bool inherited_pause(
const std::string &message)
override;
109 virtual std::string inherited_get_string(
const std::string & message,
bool echo)
override;
110 virtual secu_string inherited_get_secu_string(
const std::string & message,
bool echo)
override;
115 enum mode { m_initial, m_inter, m_noecho };
120 std::ostream *output;
125 termios initial_noecho;
131 bool archive_listing_sizes_in_bytes;
132 bool archive_listing_display_ea;
136 void set_term_mod(mode m);
137 void my_message(
const std::string & mesg);
138 void xml_listing_attributes(
const list_entry & entry);
143 static const U_I bufsize;
144 static constexpr
const char* REMOVE_TAG =
"[--- REMOVED ENTRY ----]";
146 static void archive_listing_callback_tree(
const std::string & the_path,
147 const list_entry & entry,
150 static void archive_listing_callback_tar(
const std::string & the_path,
151 const list_entry & entry,
154 static void archive_listing_callback_xml(
const std::string & the_path,
155 const list_entry & entry,
158 static void archive_listing_callback_slicing(
const std::string & the_path,
159 const list_entry & entry,
162 static void show_files_callback(
void *tag,
163 const std::string & filename,
168 static void get_version_callback(
void *tag,
177 static void statistics_callback(
void *tag,
179 const infinint & data_count,
180 const infinint & total_data,
181 const infinint & ea_count,
182 const infinint & total_ea);
184 static std::string yes_no(
bool val) {
return (val ?
"yes" :
"no"); }
this file contains shell_interaction options class for listing
this file holds the database class definition
db_etat
the status for a founded entry
bool ea() noexcept
returns whether EA support has been activated at compilation time
libdar namespace encapsulate all libdar symbols
defines the interaction interface between libdar and users.