X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=client-src%2Fsendbackup.h;h=ceff2d96fae9eba51f99d8a733c4fa9ea5de39be;hb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;hp=e20ca0d41f58cedaff60538c33e3fcf52312cb1e;hpb=3ab887b9bc819a846c75dd7f2ee5d41fac22b19f;p=debian%2Famanda diff --git a/client-src/sendbackup.h b/client-src/sendbackup.h index e20ca0d..ceff2d9 100644 --- a/client-src/sendbackup.h +++ b/client-src/sendbackup.h @@ -24,18 +24,21 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: sendbackup.h,v 1.11.4.1.6.3 2002/03/31 21:01:32 jrjackson Exp $ + * $Id: sendbackup.h,v 1.20 2006/07/25 18:10:07 martinea Exp $ * * a few common decls for the sendbackup-* sources */ +#ifndef SENDBACKUP_H +#define SENDBACKUP_H + #include "amanda.h" #include "pipespawn.h" #include "client_util.h" +#include "amandad.h" -void write_tapeheader P((void)); - -void start_index P((int createindex, int input, int mesg, - int index, char *cmd)); +void info_tapeheader(dle_t *dle); +void start_index(int createindex, int input, int mesg, + int index, char *cmd); /* * Dump output lines are scanned for two types of regex matches. @@ -54,32 +57,34 @@ void start_index P((int createindex, int input, int mesg, */ typedef enum { - DMP_NORMAL, DMP_STRANGE, DMP_SIZE, DMP_ERROR + DMP_NORMAL, DMP_IGNORE, DMP_STRANGE, DMP_SIZE, DMP_ERROR } dmpline_t; typedef struct regex_s { char *regex; int srcline; int scale; /* only used for size lines */ + int field; dmpline_t typ; -} regex_t; +} amregex_t; -#define AM_NORMAL_RE(re) {(re), __LINE__, 0, DMP_NORMAL} -#define AM_STRANGE_RE(re) {(re), __LINE__, 0, DMP_STRANGE} -#define AM_SIZE_RE(re,s) {(re), __LINE__, (s), DMP_SIZE} -#define AM_ERROR_RE(re) {(re), __LINE__, 0, DMP_ERROR} +#define AM_NORMAL_RE(re) {(re), __LINE__, 0, 0, DMP_NORMAL} +#define AM_IGNORE_RE(re) {(re), __LINE__, 0, 0, DMP_IGNORE} +#define AM_STRANGE_RE(re) {(re), __LINE__, 0, 0, DMP_STRANGE} +#define AM_SIZE_RE(re,s,f) {(re), __LINE__, (s), (f), DMP_SIZE} +#define AM_ERROR_RE(re) {(re), __LINE__, 0, 0, DMP_ERROR} -extern int comppid, dumppid, tarpid; -extern int indexpid; -extern option_t *options; +extern pid_t comppid, dumppid, encpid, tarpid; +extern pid_t indexpid; +extern g_option_t *g_options; typedef struct backup_program_s { char *name, *backup_name, *restore_name; - regex_t *re_table; - void (*start_backup) P((char *host, char *disk, char *amdevice, int level, char *dumpdate, - int dataf, int mesgf, int indexf)); - void (*end_backup) P((int goterror)); + amregex_t *re_table; + void (*start_backup)(dle_t *dle, char *host, int dataf, int mesgf, int indexf); + void (*end_backup)(dle_t *dle, int goterror); } backup_program_t; extern backup_program_t *programs[], *program; +#endif /* !SENDBACKUP_H */