46 #ifndef USER_INTERACTION_HPP
47 #define USER_INTERACTION_HPP
49 #include "../my_config.h"
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 !"); };
136 void warning(
const std::string & message);
143 virtual std::string
get_string(
const std::string & message,
bool echo) = 0;
171 virtual void listing(
const std::string & flag,
172 const std::string & perm,
173 const std::string & uid,
174 const std::string & gid,
175 const std::string & size,
176 const std::string & date,
177 const std::string & filename,
211 const std::string & chemin,
212 const std::string & archive_name);
247 const std::string & data_date,
248 const std::string & data_presence,
249 const std::string & ea_date,
250 const std::string & ea_presence);
261 void printf(
const char *format, ...);
326 bool use_dar_manager_show_files;
327 bool use_dar_manager_contents;
328 bool use_dar_manager_statistics;
329 bool use_dar_manager_show_version;
357 bool (*x_answer_callback)(
const std::string &x,
void *context),
358 std::string (*x_string_callback)(
const std::string &x,
bool echo,
void *context),
359 secu_string (*x_secu_string_callback)(
const std::string &x,
bool echo,
void *context),
360 void *context_value);
363 void pause(
const std::string & message);
365 std::string
get_string(
const std::string & message,
bool echo);
369 void listing(
const std::string & flag,
370 const std::string & perm,
371 const std::string & uid,
372 const std::string & gid,
373 const std::string & size,
374 const std::string & date,
375 const std::string & filename,
386 const std::string & chemin,
387 const std::string & archive_name);
398 const std::string & data_date,
399 const std::string & data_presence,
400 const std::string & ea_date,
401 const std::string & ea_presence);
409 const std::string & perm,
410 const std::string & uid,
411 const std::string & gid,
412 const std::string & size,
413 const std::string & date,
414 const std::string & filename,
419 tar_listing_callback = callback;
425 void set_dar_manager_show_files_callback(
void (*callback)(
const std::string & filename,
430 dar_manager_show_files_callback = callback;
434 void set_dar_manager_contents_callback(
void (*callback)(U_I number,
435 const std::string & chemin,
436 const std::string & archive_name,
439 dar_manager_contents_callback = callback;
443 void set_dar_manager_statistics_callback(
void (*callback)(U_I number,
444 const infinint & data_count,
445 const infinint & total_data,
446 const infinint & ea_count,
447 const infinint & total_ea,
450 dar_manager_statistics_callback = callback;
454 void set_dar_manager_show_version_callback(
void (*callback)(U_I number,
455 const std::string & data_date,
456 const std::string & data_presence,
457 const std::string & ea_date,
458 const std::string & ea_presence,
461 dar_manager_show_version_callback = callback;
474 void (*warning_callback)(
const std::string & x,
void *context);
475 bool (*answer_callback)(
const std::string & x,
void *context);
476 std::string (*string_callback)(
const std::string & x,
bool echo,
void *context);
477 secu_string (*secu_string_callback)(
const std::string & x,
bool echo,
void *context);
478 void (*tar_listing_callback)(
const std::string & flags,
479 const std::string & perm,
480 const std::string & uid,
481 const std::string & gid,
482 const std::string & size,
483 const std::string & date,
484 const std::string & filename,
488 void (*dar_manager_show_files_callback)(
const std::string & filename,
492 void (*dar_manager_contents_callback)(U_I number,
493 const std::string & chemin,
494 const std::string & archive_name,
496 void (*dar_manager_statistics_callback)(U_I number,
497 const infinint & data_count,
498 const infinint & total_data,
499 const infinint & ea_count,
500 const infinint & total_ea,
502 void (*dar_manager_show_version_callback)(U_I number,
503 const std::string & data_date,
504 const std::string & data_presence,
505 const std::string & ea_date,
506 const std::string & ea_presence,
518 bool pause2(
const std::string & message) {
return false; };
520 std::string
get_string(
const std::string & message,
bool echo) {
return "user_interaction_blind, is blindly answering no"; };