| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
i_libdar_xform.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26#ifndef I_LIBDAR_XFORM_HPP
27#define I_LIBDAR_XFORM_HPP
28
29#include "../my_config.h"
30#include "entrepot_local.hpp"
31#include "infinint.hpp"
32#include "mem_ui.hpp"
33#include "label.hpp"
34#include "libdar_xform.hpp"
35
36 namespace libdar
37{
38
41
43
44 class libdar_xform::i_libdar_xform : public mem_ui
45 {
46 public:
48
57 i_libdar_xform(const std::shared_ptr<user_interaction> & ui,
58 const std::string & chem,
59 const std::string & basename,
60 const std::string & extension,
61 const infinint & min_digits,
62 const std::string & execute);
63
65
68 i_libdar_xform(const std::shared_ptr<user_interaction> & dialog,
69 const std::string & pipename);
70
72
75 i_libdar_xform(const std::shared_ptr<user_interaction> & dialog,
76 int filedescriptor);
77
79 i_libdar_xform(const i_libdar_xform & ref) = delete;
80
82 i_libdar_xform(i_libdar_xform && ref) noexcept = default;
83
85 i_libdar_xform & operator = (const i_libdar_xform & ref) = delete;
86
88 i_libdar_xform & operator = (i_libdar_xform && ref) noexcept = default;
89
91 ~i_libdar_xform() = default;
92
94
119 void xform_to(const std::string & path,
120 const std::string & basename,
121 const std::string & extension,
122 bool allow_over,
123 bool warn_over,
124 const infinint & pause,
125 const infinint & first_slice_size,
126 const infinint & slice_size,
127 const std::string & slice_perm,
128 const std::string & slice_user,
129 const std::string & slice_group,
130 hash_algo hash,
131 const infinint & min_digits,
132 const std::string & execute);
133
135
139 void xform_to(int filedescriptor,
140 const std::string & execute);
141
142 private:
143 bool can_xform;
144 std::unique_ptr<generic_file> source;
145 std::unique_ptr<path> src_path;
146 std::shared_ptr<entrepot_local> entrep_src;
147 std::shared_ptr<entrepot_local> entrep_dst;
148 bool format_07_compatible;
149 label dataname;
150
151 void init_entrep();
152 void xform_to(generic_file *dst);
153 };
154
156
157} // end of namespace
158
159#endif
libdar::generic_file
this is the interface class from which all other data transfer classes inherit
Definition generic_file.hpp:77
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
libdar::label
manage label data structure used in archive slice headers
Definition label.hpp:43
libdar::libdar_xform::i_libdar_xform
class implementing the dar_xform feature
Definition i_libdar_xform.hpp:45
libdar::libdar_xform::i_libdar_xform::src_path
std::unique_ptr< path > src_path
may be null when reading from a pipe
Definition i_libdar_xform.hpp:145
libdar::libdar_xform::i_libdar_xform::i_libdar_xform
i_libdar_xform(const std::shared_ptr< user_interaction > &dialog, int filedescriptor)
< if pipename is set to "-" reading from standard input
libdar::libdar_xform::i_libdar_xform::xform_to
void xform_to(int filedescriptor, const std::string &execute)
the resulting archive is a single sliced archive sent to a filedescriptor
libdar::libdar_xform::i_libdar_xform::i_libdar_xform
i_libdar_xform(i_libdar_xform &&ref) noexcept=default
move constructor
libdar::libdar_xform::i_libdar_xform::i_libdar_xform
i_libdar_xform(const std::shared_ptr< user_interaction > &dialog, const std::string &pipename)
the archive to transform is read from a named pipe
libdar::libdar_xform::i_libdar_xform::xform_to
void xform_to(const std::string &path, const std::string &basename, const std::string &extension, bool allow_over, bool warn_over, const infinint &pause, const infinint &first_slice_size, const infinint &slice_size, const std::string &slice_perm, const std::string &slice_user, const std::string &slice_group, hash_algo hash, const infinint &min_digits, const std::string &execute)
the resulting archive is a written to disk possibly multi-sliced
libdar::libdar_xform::i_libdar_xform::operator=
i_libdar_xform & operator=(const i_libdar_xform &ref)=delete
assignment operator is not allowed
libdar::libdar_xform::i_libdar_xform::i_libdar_xform
i_libdar_xform(const i_libdar_xform &ref)=delete
copy constructor is not allowed
libdar::libdar_xform::i_libdar_xform::~i_libdar_xform
~i_libdar_xform()=default
destructor
libdar::libdar_xform::i_libdar_xform::i_libdar_xform
i_libdar_xform(const std::shared_ptr< user_interaction > &ui, const std::string &chem, const std::string &basename, const std::string &extension, const infinint &min_digits, const std::string &execute)
the archive to transform is read from a set of slices
libdar::mem_ui::mem_ui
mem_ui(const std::shared_ptr< user_interaction > &dialog)
constructor
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
entrepot_local.hpp
defines the implementation for local filesystem entrepot The entrepot_local correspond to the local f...
libdar::hash_algo
hash_algo
hashing algorithm available
Definition archive_aux.hpp:63
infinint.hpp
switch module to limitint (32 ou 64 bits integers) or infinint
label.hpp
define the datastructure "label" used to identify slice membership to an archive
libdar_xform.hpp
API for dar_xform functionnality.
mem_ui.hpp
class mem_ui definition. This class is to be used as parent class to handle user_interaction object m...
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47