b5ed362696bebe8ac1a5ce1cbd804e6b21a20f87
[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     int kencrypt;
61 } option_t;
62
63 typedef struct backup_support_option_s {
64     int config;
65     int host;
66     int disk;
67     int max_level;
68     int index_line;
69     int index_xml;
70     int message_line;
71     int message_xml;
72     int record;
73     int include_file;
74     int include_list;
75     int include_optional;
76     int exclude_file;
77     int exclude_list;
78     int exclude_optional;
79     int collection;
80 } backup_support_option_t;
81
82 char *build_exclude(char *disk, char *device, option_t *options, int verbose);
83 char *build_include(char *disk, char *device, option_t *options, int verbose);
84 void init_options(option_t *options);
85 option_t *parse_options(char *str,
86                            char *disk,
87                            char *device,
88                            am_feature_t *features,
89                            int verbose);
90 void output_tool_property(FILE *tool, option_t *options);
91 char *fixup_relative(char *name, char *device);
92 backup_support_option_t *backup_support_option(char *program,
93                                                g_option_t *g_options,
94                                                char *disk,
95                                                char *amdevice);
96
97 #endif