eb937f80f648d17843aa6e13a53d442a399f627c
[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.8.4.2.4.1.2.3 2002/10/27 21:13:25 martinea 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[11];
38     int  level;
39     char tape[256];
40     char path[1024];
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 *their_features;
60 extern pid_t extract_restore_child_pid;
61
62 extern int converse P((char *cmd));
63 extern int exchange P((char *cmd));
64 extern int server_happy P((void));
65 extern int send_command P((char *cmd));
66 extern int get_reply_line P((void));
67 extern char *reply_line P((void));
68
69 extern void quit P((void));
70
71 extern void help_list P((void));                /* list commands */
72
73 extern void set_disk P((char *dsk, char *mtpt));
74 extern void list_disk P((char *amdevice));
75 extern void set_host P((char *host));
76 extern int set_date P((char *date));
77 extern void set_directory P((char *dir));
78 extern void cd_glob P((char *dir));
79 extern void cd_regex P((char *dir));
80 extern void cd_dir P((char *dir, char *default_dir));
81 extern void set_tape P((char *tape));
82 extern void show_directory P((void));
83 extern void set_mode P((int mode));
84 extern void show_mode P((void));
85
86 extern void list_disk_history P((void));
87 extern void list_directory P((void));
88 extern DIR_ITEM *get_dir_list P((void));
89 extern DIR_ITEM *get_next_dir_item P((DIR_ITEM *this));
90 extern void suck_dir_list_from_server P((void));
91 extern void clear_dir_list P((void));
92 extern void clean_pathname P((char *s));
93 extern void display_extract_list P((char *file));
94 extern void clear_extract_list P((void));
95 extern int is_extract_list_nonempty P((void));
96 extern void add_glob P((char *glob));
97 extern void add_regex P((char *regex));
98 extern void add_file P((char *path, char *regex));
99 extern void delete_glob P((char *glob));
100 extern void delete_regex P((char *regex));
101 extern void delete_file P((char *path, char *regex));
102
103 extern void extract_files P((void));
104
105 #ifdef SAMBA_CLIENT
106 #define SAMBA_SMBCLIENT 0
107 #define SAMBA_TAR       1
108 #endif