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 set_fully_detailed_datetime(
bool mode) { full_datetime = mode; };
93 bool get_fully_detailed_datetime()
const {
return full_datetime; };
96 void archive_show_contents(
const archive & ref,
const archive_options_listing_shell & options);
99 void database_show_contents(
const database & ref);
102 void database_show_files(
const database & ref, archive_num num,
const database_used_options & opt);
105 void database_show_version(
const database & ref,
const path & chem);
108 void database_show_statistics(
const database &ref);
113 virtual void inherited_message(
const std::string & message)
override;
114 virtual bool inherited_pause(
const std::string &message)
override;
115 virtual std::string inherited_get_string(
const std::string & message,
bool echo)
override;
116 virtual secu_string inherited_get_secu_string(
const std::string & message,
bool echo)
override;
121 enum mode { m_initial, m_inter, m_noecho };
126 std::ostream *output;
131 termios initial_noecho;
137 bool archive_listing_sizes_in_bytes;
138 bool archive_listing_display_ea;
143 void set_term_mod(mode m);
144 void my_message(
const std::string & mesg);
145 void xml_listing_attributes(
const list_entry & entry);
150 static const U_I bufsize;
151 static constexpr const char* REMOVE_TAG =
"[--- REMOVED ENTRY ----]";
153 static void archive_listing_callback_tree(
const std::string & the_path,
154 const list_entry & entry,
157 static void archive_listing_callback_tar(
const std::string & the_path,
158 const list_entry & entry,
161 static void archive_listing_callback_xml(
const std::string & the_path,
162 const list_entry & entry,
165 static void archive_listing_callback_slicing(
const std::string & the_path,
166 const list_entry & entry,
169 static void show_files_callback(
void *tag,
170 const std::string & filename,
175 static void get_version_callback(
void *tag,
184 static void statistics_callback(
void *tag,
186 const infinint & data_count,
187 const infinint & total_data,
188 const infinint & ea_count,
189 const infinint & total_ea);
191 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.