Loading...
Searching...
No Matches
i_libdar_xform.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2024 Denis Corbin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// to contact the author, see the AUTHOR file
/*********************************************************************/
#ifndef I_LIBDAR_XFORM_HPP
#define I_LIBDAR_XFORM_HPP
#include "../my_config.h"
#include "entrepot_local.hpp"
#include "infinint.hpp"
#include "mem_ui.hpp"
#include "label.hpp"
#include "libdar_xform.hpp"
namespace libdar
{
class libdar_xform::i_libdar_xform : public mem_ui
{
public:
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);
i_libdar_xform(const std::shared_ptr<user_interaction> & dialog,
const std::string & pipename);
i_libdar_xform(const std::shared_ptr<user_interaction> & dialog,
int filedescriptor);
i_libdar_xform(const i_libdar_xform & ref) = delete;
i_libdar_xform(i_libdar_xform && ref) noexcept = default;
i_libdar_xform & operator = (const i_libdar_xform & ref) = delete;
i_libdar_xform & operator = (i_libdar_xform && ref) noexcept = default;
~i_libdar_xform() = default;
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);
void xform_to(int filedescriptor,
const std::string & execute);
private:
bool can_xform;
std::unique_ptr<generic_file> source;
std::unique_ptr<path> src_path;
std::shared_ptr<entrepot_local> entrep_src;
std::shared_ptr<entrepot_local> entrep_dst;
bool format_07_compatible;
label dataname;
void init_entrep();
void xform_to(generic_file *dst);
};
} // end of namespace
#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
class mem_ui to keep a copy of a user_interaction object
Definition mem_ui.hpp:55
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