52c964e5e53426e2a0aa68e7f65ba514db0cc0bf
[debian/amanda] / recover-src / amrecover.h
1 /*
2  * Amanda, The Advanced Maryland Automatic Network Disk Archiver
3  * Copyright (c) 1991-1998, 2000 University of Maryland at College Park
4  * All Rights Reserved.
5  *
6  * Permission to use, copy, modify, distribute, and sell this software and its
7  * documentation for any purpose is hereby granted without fee, provided that
8  * the above copyright notice appear in all copies and that both that
9  * copyright notice and this permission notice appear in supporting
10  * documentation, and that the name of U.M. not be used in advertising or
11  * publicity pertaining to distribution of the software without specific,
12  * written prior permission.  U.M. makes no representations about the
13  * suitability of this software for any purpose.  It is provided "as is"
14  * without express or implied warranty.
15  *
16  * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
18  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22  *
23  * Authors: the Amanda Development Team.  Its members are listed in a
24  * file named AUTHORS, in the root directory of this distribution.
25  */
26 /*
27  * $Id: amrecover.h,v 1.17 2005/12/31 00:02:10 paddy_s Exp $
28  *
29  * data structures and declarations for amrecover
30  */
31
32 #include "amanda.h"
33 #include "amfeatures.h"
34
35 typedef struct DIR_ITEM
36 {
37     char *date;
38     int  level;
39     char *tape;
40     char *path;
41     int  fileno;
42
43     struct DIR_ITEM *next;
44 }
45 DIR_ITEM;
46
47 extern char *server_name;
48 extern char *config;
49 extern char *dump_datestamp;            /* date we are restoring */
50 extern char *dump_hostname;             /* which machine we are restoring */
51 extern char *disk_name;                 /* disk we are restoring */
52 extern char *mount_point;               /* where disk was mounted */
53 extern char *disk_path;                 /* path relative to mount point */
54 extern char dump_date[STR_SIZE];        /* date on which we are restoring */
55 extern int quit_prog;                   /* set when time to exit parser */
56 extern char *tape_server_name;
57 extern char *tape_device_name;
58 extern am_feature_t *our_features;
59 extern am_feature_t *indexsrv_features;
60 extern am_feature_t *tapesrv_features;
61 extern pid_t extract_restore_child_pid;
62
63 extern void free_dir_item P((DIR_ITEM *item));
64
65 extern int converse P((char *cmd));
66 extern int exchange P((char *cmd));
67 extern int server_happy P((void));
68 extern int send_command P((char *cmd));
69 extern int get_reply_line P((void));
70 extern char *reply_line P((void));
71
72 extern void quit P((void));
73
74 extern void help_list P((void));                /* list commands */
75
76 extern void set_disk P((char *dsk, char *mtpt));
77 extern void list_disk P((char *amdevice));
78 extern void set_host P((char *host));
79 extern int set_date P((char *date));
80 extern void set_directory P((char *dir));
81 extern void cd_glob P((char *dir));
82 extern void cd_regex P((char *dir));
83 extern void cd_dir P((char *dir, char *default_dir));
84 extern void set_tape P((char *tape));
85 extern void show_directory P((void));
86 extern void set_mode P((int mode));
87 extern void show_mode P((void));
88
89 extern void list_disk_history P((void));
90 extern void list_directory P((void));
91 extern DIR_ITEM *get_dir_list P((void));
92 extern DIR_ITEM *get_next_dir_item P((DIR_ITEM *this));
93 extern void suck_dir_list_from_server P((void));
94 extern void clear_dir_list P((void));
95 extern void clean_pathname P((char *s));
96 extern void display_extract_list P((char *file));
97 extern void clear_extract_list P((void));
98 extern int is_extract_list_nonempty P((void));
99 extern void add_glob P((char *glob));
100 extern void add_regex P((char *regex));
101 extern void add_file P((char *path, char *regex));
102 extern void delete_glob P((char *glob));
103 extern void delete_regex P((char *regex));
104 extern void delete_file P((char *path, char *regex));
105
106 extern void extract_files P((void));
107
108 #ifdef SAMBA_CLIENT
109 #define SAMBA_SMBCLIENT 0
110 #define SAMBA_TAR       1
111 #endif
112
113 extern char *get_security P((void));