Loading...
Searching...
No Matches
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 LIBDAR_XFORM_HPP
#define LIBDAR_XFORM_HPP
#include "../my_config.h"
#include "infinint.hpp"
#include "user_interaction.hpp"
#include "archive_aux.hpp"
#include <memory>
namespace libdar
{
class libdar_xform
{
public:
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);
libdar_xform(const std::shared_ptr<user_interaction> & dialog,
const std::string & pipename);
libdar_xform(const std::shared_ptr<user_interaction> & dialog,
int filedescriptor);
libdar_xform(const libdar_xform & ref) = delete;
libdar_xform(libdar_xform && ref) noexcept;
libdar_xform & operator = (const libdar_xform & ref) = delete;
libdar_xform & operator = (libdar_xform && ref) noexcept;
~libdar_xform();
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:
class i_libdar_xform;
std::unique_ptr<i_libdar_xform> pimpl;
};
} // end of namespace
#endif
archive_aux.hpp
set of datastructures used to interact with a catalogue object
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
libdar::libdar_xform::i_libdar_xform
class implementing the dar_xform feature
Definition i_libdar_xform.hpp:45
libdar::libdar_xform
class implementing the dar_xform feature
Definition libdar_xform.hpp:45
libdar::libdar_xform::libdar_xform
libdar_xform(const std::shared_ptr< user_interaction > &dialog, int filedescriptor)
< if pipename is set to "-" reading from standard input
libdar::libdar_xform::libdar_xform
libdar_xform(const libdar_xform &ref)=delete
copy constructor is not allowed
libdar::libdar_xform::libdar_xform
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::libdar_xform::operator=
libdar_xform & operator=(const libdar_xform &ref)=delete
assignment operator is not allowed
libdar::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::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::~libdar_xform
~libdar_xform()
destructor
libdar::libdar_xform::libdar_xform
libdar_xform(libdar_xform &&ref) noexcept
move constructor
libdar::libdar_xform::libdar_xform
libdar_xform(const std::shared_ptr< user_interaction > &dialog, const std::string &pipename)
the archive to transform is read from a named pipe
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
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
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47
user_interaction.hpp
defines the interaction interface between libdar and users.