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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

dar_suite.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2052 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21
25
26 #ifndef DAR_SUITE_HPP
27 #define DAR_SUITE_HPP
28
29 #include "../my_config.h"
30 #include "shell_interaction.hpp"
31
32 #define EXIT_OK 0 // all that was asked is done
33 #define EXIT_SYNTAX 1 // syntax error on command line
34 #define EXIT_ERROR 2 // error not related to the data treated
35 // (lack of memory, hardware problem, etc.)
36 #define EXIT_BUG 3 // detected a condition that should never happen
37 #define EXIT_USER_ABORT 4 // user asked to abort (or question in non
38 // interactive mode)
39 #define EXIT_DATA_ERROR 5 // error in data treated (could not save/restore/
40 // compare all data due for example to bad access permission. Comparison
41 // mismatch of some files, archive testing failed etc...)
42 #define EXIT_SCRIPT_ERROR 6 // error around the execution of a user command
43 // using -E or -F options
44 #define EXIT_LIBDAR 7 // error calling libdar. Arguments given to libdar
45 // do not match those expected (sanity checks warning).
46 #define EXIT_LIMITINT 8 // limitinit overflow
47 // fixed using full infinint version of the program
48 #define EXIT_UNKNOWN_ERROR 9
49 // error not possible to report by other mean no access to stdout/stderr)
50 #define EXIT_COMPILATION 10 // feature not activated at compilation time
51 #define EXIT_SAVED_MODIFIED 11 // some files have been modified at the time they were saved
52
53 #define EXTENSION "dar"
54
56 #ifndef __VERSION__
57 #define __VERSION__ "unknown"
58 #endif
59
61 #ifdef __GNUC__
62 #define CC_NAT "GNUC"
63 #else
64 #define CC_NAT "unknown"
65 #endif
66
67 using namespace libdar;
68
71
72 extern void dar_suite_reset_signal_handler();
73
79 #if HAVE_GETOPT_LONG
80 #endif
82 extern int dar_suite_global(int argc,
86 char * const argv[],
87 const char **env,
88 const char *getopt_string,
89 #if HAVE_GETOPT_LONG
90 const struct option *long_options,
91 #endif
92 char stop_scan,
93 int (*call)(shell_interaction & dialog, int, char *const [], const char **env));
94
95 extern std::string dar_suite_command_line_features();
96
98
99 #endif
shell_interaction.hpp
user_interaction class for command_line tools
dar_suite_global
int dar_suite_global(int argc, char *const argv[], const char **env, const char *getopt_string, char stop_scan, int(*call)(shell_interaction &dialog, int, char *const [], const char **env))
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47