26 #ifndef LINE_TOOLS_HPP 27 #define LINE_TOOLS_HPP 29 #include "../my_config.h" 46 argc_argv(S_I size = 0);
47 argc_argv(
const argc_argv & ref) {
throw Efeature(
"argc_argv"); };
48 const argc_argv & operator = (
const argc_argv & ref) {
throw Efeature(
"argc_argv"); };
49 ~argc_argv() throw(
Ebug);
51 void resize(S_I size);
52 void set_arg(const
std::
string & arg, S_I index);
55 S_I argc()
const {
return x_argc; };
56 char*
const * argv()
const {
return x_argv; };
63 extern void line_tools_slice_ownership(
const std::string & cmd, std::string & slice_permission, std::string & slice_user_ownership, std::string & slice_group_ownership);
64 extern void line_tools_repeat_param(
const std::string & cmd,
infinint & repeat_count,
infinint & repeat_byte);
65 extern void line_tools_tlv_list2argv(
user_interaction & dialog, tlv_list & list, argc_argv & arg);
71 std::string::const_iterator line_tools_find_first_char_out_of_parenth(
const std::string & argument,
unsigned char to_find);
72 std::string::const_iterator line_tools_find_last_char_out_of_parenth(
const std::string & argument,
unsigned char to_find);
74 std::string line_tools_expand_user_comment(
const std::string & user_comment, S_I argc,
char *
const argv[]);
101 const char *getopt_string,
103 const struct option *long_options,
106 std::vector<char> & presence);
121 const char *getopt_string,
123 const struct option *long_options,
126 bool & Q_is_present);
131 extern std::vector<std::string>
line_tools_split(
const std::string & val,
char sep);
133 extern void line_tools_4_4_build_compatible_overwriting_policy(
bool allow_over,
149 bool & no_cipher_given,
150 std::vector<std::string> & recipients);
contains classes that let the user define the policy for overwriting files
void line_tools_crypto_split_algo_pass(const secu_string &all, crypto_algo &algo, secu_string &pass, bool &no_cipher_given, std::vector< std::string > &recipients)
are defined here basic integer types that tend to be portable
void line_tools_split_at_first_space(const char *field, std::string &before_space, std::string &after_space)
return split at the first space met the string given as first argument, and provide the two splitted ...
std::string line_tools_get_full_path_from_PATH(const std::vector< std::string > &the_path, const char *filename)
return the full path of the given filename (eventually unchanged of pointing to the first file of tha...
void line_tools_look_for(const std::vector< char > &arguments, S_I argc, char *const argv[], const char *getopt_string, char stop_scan, std::vector< char > &presence)
This is a pure virtual class that is used by libdar when interaction with the user is required...
void line_tools_display_signatories(user_interaction &ui, const std::list< signator > &gnupg_signed)
display information about the signatories
S_I line_tools_reset_getopt()
returns the old position of parsing (next argument to parse)
std::vector< std::string > line_tools_split(const std::string &val, char sep)
split a line in words given the separator character (sep)
std::vector< std::string > line_tools_explode_PATH(const char *the_path)
split a PATH environement variable string into its components (/usr/lib:/lib => /usr/lib /lib) ...
exception used when a requested feature is not (yet) implemented
the global action for overwriting
void line_tools_look_for_Q(S_I argc, char *const argv[], const char *getopt_string, char stop_scan, bool &Q_is_present)
switch module to limitint (32 ou 64 bits integers) or infinint
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
this is the interface class from which all other data transfer classes inherit
List of Generic Type Length Value data structures.
the arbitrary large positive integer class
libdar namespace encapsulate all libdar symbols