30 #ifndef HASH_FICHIER_HPP
31 #define HASH_FICHIER_HPP
33 #include "../my_config.h"
62 extern std::string hash_algo_to_string(
hash_algo algo);
64 class hash_fichier :
public fichier
70 hash_fichier(user_interaction & dialog, S_I fd);
71 hash_fichier(user_interaction & dialog,
const char *name,
gf_mode m, U_I perm,
bool furtive_mode =
false);
72 hash_fichier(user_interaction & dialog,
const std::string & chemin,
gf_mode m, U_I perm,
bool furtive_mode =
false);
73 hash_fichier(
const std::string & chemin,
bool furtive_mode =
false) : fichier(chemin, furtive_mode) {
throw SRC_BUG; };
74 hash_fichier(
const hash_fichier & ref) : fichier(ref) {
throw SRC_BUG; };
77 const hash_fichier & operator = (
const hash_fichier & ref) {
throw SRC_BUG; };
91 void set_hash_file_name(
const std::string & filename,
hash_algo algo,
const std::string & extension);
94 void change_permission(U_I perm) { x_perm = perm; fichier::change_permission(perm); };
95 void change_ownership(
const std::string & user,
const std::string & group) { user_ownership = user; group_ownership = group; fichier::change_ownership(user, group); };
99 bool skip(
const infinint & pos) {
if(pos != fichier::get_position())
throw SRC_BUG;
else return true; };
100 bool skip_to_eof() {
throw SRC_BUG; };
101 bool skip_relative(S_I x) {
if(x != 0)
throw SRC_BUG;
else return true; };
104 #ifdef LIBDAR_SPECIAL_ALLOC
105 USE_SPECIAL_ALLOC(hash_fichier);
109 U_I inherited_read(
char *a, U_I size) {
throw SRC_BUG; };
110 void inherited_write(
const char *a, U_I size);
112 void inherited_terminate();
116 std::string hash_filename;
117 std::string hash_extension;
119 std::string user_ownership;
120 std::string group_ownership;
122 gcry_md_hd_t hash_handle;
class fichier definition. This is a full implementation of a generic_file applied to a plain file ...
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
gf_mode
generic_file openning modes