Disk ARchive  2.5.2
Full featured and portable backup and archiving tool
dar_suite.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 : http://dar.linux.free.fr/email.html
00020 /*********************************************************************/
00021 
00025 
00026 #ifndef DAR_SUITE_HPP
00027 #define DAR_SUITE_HPP
00028 
00029 #include "../my_config.h"
00030 #include "shell_interaction.hpp"
00031 
00032 #define EXIT_OK 0           // all that was asked is done
00033 #define EXIT_SYNTAX 1       // syntax error on command line
00034 #define EXIT_ERROR 2        // error not related to the data treated
00035     // (lack of memory, hardware problem, etc.)
00036 #define EXIT_BUG 3          // detected a condition that should never happen
00037 #define EXIT_USER_ABORT 4   // user asked to abort (or question in non
00038     // interactive mode)
00039 #define EXIT_DATA_ERROR 5   // error in data treated (could not save/restore/
00040     // compare all data due for example to bad access permission.  Comparison
00041     // mismatch of some files, archive testing failed etc...)
00042 #define EXIT_SCRIPT_ERROR 6 // error around the execution of a user command
00043     // using -E or -F options
00044 #define EXIT_LIBDAR  7     // error calling libdar. Arguments given to libdar
00045     // do not match those expected (sanity checks warning).
00046 #define EXIT_LIMITINT 8    // limitinit overflow
00047     // fixed using full infinint version of the program
00048 #define EXIT_UNKNOWN_ERROR 9
00049     // error not possible to report by other mean no access to stdout/stderr)
00050 #define EXIT_COMPILATION 10 // feature not activated at compilation time
00051 #define EXIT_SAVED_MODIFIED 11 // some files have been modified at the time they were saved
00052 
00053 #define EXTENSION "dar"
00054 
00056 #ifndef __VERSION__
00057 #define __VERSION__ "unknown"
00058 #endif
00059 
00061 #ifdef __GNUC__
00062 #define CC_NAT "GNUC"
00063 #else
00064 #define CC_NAT "unknown"
00065 #endif
00066 
00067 using namespace libdar;
00068 
00071 
00072 extern void dar_suite_reset_signal_handler();
00073 
00079 #if HAVE_GETOPT_LONG
00080 
00081 #endif
00082 
00083 
00084 
00085 extern int dar_suite_global(int argc,
00086                 char * const argv[],
00087                 const char **env,
00088                 const char *getopt_string,
00089 #if HAVE_GETOPT_LONG
00090                 const struct option *long_options,
00091 #endif
00092                 char stop_scan,
00093                 int (*call)(shell_interaction & dialog, int, char *const [], const char **env));
00094 
00095 extern std::string dar_suite_command_line_features();
00096 
00098 
00099 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines