Imported Upstream version 2.5.0
[debian/amanda] / restore-src / restore.h
diff --git a/restore-src/restore.h b/restore-src/restore.h
new file mode 100644 (file)
index 0000000..2dc32ca
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Amanda, The Advanced Maryland Automatic Network Disk Archiver
+ * Copyright (c) 1991-1998 University of Maryland at College Park
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of U.M. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  U.M. makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Authors: the Amanda Development Team.  Its members are listed in a
+ * file named AUTHORS, in the root directory of this distribution.
+ */
+/*
+ * $Id: restore.h,v 1.5 2006/03/14 13:12:01 martinea Exp $
+ *
+ * 
+ */
+
+#ifndef RESTORE_H
+#define RESTORE_H
+
+#include "fileheader.h"
+#include "tapelist.h"
+#include "amfeatures.h"
+
+#define CREAT_MODE  0640
+
+typedef struct match_list_s {
+    char *hostname;
+    char *diskname;
+    char *datestamp;
+    char *level;
+    struct match_list_s *next;
+} match_list_t;
+
+typedef struct rst_flags_s {
+    unsigned int inline_assemble:1;
+    unsigned int delay_assemble:1;
+    unsigned int compress:1;
+    unsigned int leave_comp:1;
+    unsigned int raw:1;
+    unsigned int headers:1;
+    unsigned int isafile:1;
+    unsigned int wait_tape_prompt:1; /* for interactive console use */
+    unsigned int amidxtaped:1; /* for client-daemon use */
+    unsigned int check_labels:1;
+    unsigned int mask_splits:1;
+    unsigned int fsf;
+    long blocksize;
+    int pipe_to_fd;
+    char *restore_dir;
+    char *comp_type;
+    char *alt_tapedev;
+    char *inventory_log;
+} rst_flags_t;
+
+char *make_filename P((dumpfile_t *file));
+int disk_match P((dumpfile_t *file, char *datestamp,
+                   char *hostname, char *diskname, char *level));
+void read_file_header P((dumpfile_t *file, int tapefd, int isafile,
+                        rst_flags_t *flags));
+ssize_t restore P((dumpfile_t *file, char *filename, int tapefd, int isafile,
+                       rst_flags_t *flags));
+void flush_open_outputs P((int reassemble, dumpfile_t *only_file));
+void search_tapes P((FILE *prompt_out, int use_changer, tapelist_t *tapelist,
+                        match_list_t *restorethese, rst_flags_t *flags, 
+                       am_feature_t *their_features));
+int have_all_parts P((dumpfile_t *file, int upto));
+rst_flags_t *new_rst_flags P((void));
+int check_rst_flags P((rst_flags_t *flags));
+void free_rst_flags P((rst_flags_t *flags));
+void free_match_list P((match_list_t *match_list));
+int lock_logfile P(());
+
+#endif /* RESTORE_H */
+