# macro_tools.hpp

Go to the documentation of this file.

    00001 /*********************************************************************/
    00002 // dar - disk archive - a backup/restoration program
    00003 // Copyright (C) 2002-2052 Denis Corbin
    00004 //
    00005 // This program is free software; you can redistribute it and/or
    00006 // modify it under the terms of the GNU General Public License
    00007 // as published by the Free Software Foundation; either version 2
    00008 // of the License, or (at your option) any later version.
    00009 //
    00010 // This program is distributed in the hope that it will be useful,
    00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013 // GNU General Public License for more details.
    00014 //
    00015 // You should have received a copy of the GNU General Public License
    00016 // along with this program; if not, write to the Free Software
    00017 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    00018 //
    00019 // to contact the author : dar.linux@free.fr
    00020 /*********************************************************************/
    00021 // $Id: macro_tools.hpp,v 1.15 2005/09/19 21:17:37 edrusb Rel $
    00022 //
    00023 /*********************************************************************/
    00024
    00028
    00029 #ifndef MACRO_TOOLS_HPP
    00030 #define MACRO_TOOLS_HPP
    00031
    00032 #include "../my_config.h"
    00033 #include <string>
    00034 #include "catalogue.hpp"
    00035 #include "compressor.hpp"
    00036 #include "infinint.hpp"
    00037 #include "header_version.hpp"
    00038 #include "generic_file.hpp"
    00039 #include "scrambler.hpp"
    00040 #include "crypto.hpp"
    00041
    00042 namespace libdar
    00043 {
    00044
    00045     extern const dar_version macro_tools_supported_version;
    00046
    00047     extern void macro_tools_open_archive(user_interaction & dialog,
    00048                                          const path &sauv_path,  // path to slices
    00049                                          const std::string &basename,  // slice basename
    00050                                          const std::string &extension,  // slice extensions
    00051                                          crypto_algo crypto, // encryption algorithm
    00052                                          const std::string &pass, // pass key for crypto/scrambling
    00053                                          U_32 crypto_size,    // crypto block size
    00054                                          generic_file *&ret1, // level 1 file (raw data) sar or zapette
    00055                                          generic_file *&scram, // NULL if pass is given an empty string else a scrambler/other crypto class (over raw data)
    00056                                          compressor *&ret2, // compressor over scrambler or raw data (if no scrambler)
    00057                                          header_version &ver, // header read from raw data
    00058                                          const std::string &input_pipe, // named pipe for input when basename is "-" (dar_slave)
    00059                                          const std::string &output_pipe, // named pipe for output when basename is "-" (dar_slave)
    00060                                          const std::string & execute); // command to execute between slices
    00061         // all allocated objects (ret1, ret2, scram), must be deleted when no more needed
    00062
    00063     extern catalogue *macro_tools_get_catalogue_from(user_interaction & dialog,
    00064                                                      generic_file & f,  // raw data access object
    00065                                                      const header_version & ver, // version format as defined in the header of the archive to read
    00066                                                      compressor & zip,  // compressor object over raw data
    00067                                                      bool info_details, // verbose display (throught user_interaction)
    00068                                                      infinint &cat_size, // return size of archive in file (not in memory !)
    00069                                                      generic_file *zip_base);
    00070
    00071     extern catalogue *macro_tools_get_catalogue_from(user_interaction & dialog,
    00072                                                      const std::string &basename,
    00073                                                      const std::string & extension,
    00074                                                      crypto_algo crypto,
    00075                                                      const std::string & pass,
    00076                                                      U_32 crypto_size);
    00077
    00078
    00079 } // end of namespace
    00080
    00081 #endif