Imported Upstream version 2.5.2p1
[debian/amanda] / client-src / client_util.h
1 /*
2  * Amanda, The Advanced Maryland Automatic Network Disk Archiver
3  * Copyright (c) 1991-1998 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: client_util.h,v 1.14 2006/05/25 01:47:11 johnfranks Exp $
28  *
29  */
30
31 #ifndef CLIENT_UTIL_H
32 #define CLIENT_UTIL_H
33
34 #include "amanda.h"
35 #include "conffile.h"
36 #include "amfeatures.h"
37 #include "sl.h"
38 #include "util.h"               /* for bstrncmp() */
39 #include "amandad.h"            /* for g_option_t */
40
41 typedef struct option_s {
42     char *str;
43     int compress;
44     int encrypt;
45     char *srvcompprog;
46     char *clntcompprog;
47     char *srv_encrypt;
48     char *clnt_encrypt;
49     char *srv_decrypt_opt;
50     char *clnt_decrypt_opt;
51     int no_record;
52     int createindex;
53     char *auth;
54     sl_t *exclude_file;
55     sl_t *exclude_list;
56     sl_t *include_file;
57     sl_t *include_list;
58     int exclude_optional;
59     int include_optional;
60 } option_t;
61
62 typedef struct backup_support_option_s {
63     int config;
64     int host;
65     int disk;
66     int max_level;
67     int index_line;
68     int index_xml;
69     int message_line;
70     int message_xml;
71     int record;
72     int include_file;
73     int include_list;
74     int include_optional;
75     int exclude_file;
76     int exclude_list;
77     int exclude_optional;
78     int collection;
79 } backup_support_option_t;
80
81 char *build_exclude(char *disk, char *device, option_t *options, int verbose);
82 char *build_include(char *disk, char *device, option_t *options, int verbose);
83 void init_options(option_t *options);
84 option_t *parse_options(char *str,
85                            char *disk,
86                            char *device,
87                            am_feature_t *features,
88                            int verbose);
89 void output_tool_property(FILE *tool, option_t *options);
90 char *fixup_relative(char *name, char *device);
91 backup_support_option_t *backup_support_option(char *program,
92                                                g_option_t *g_options,
93                                                char *disk,
94                                                char *amdevice);
95
96 #endif