Imported Upstream version 3.2.0
[debian/amanda] / common-src / amxml.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 /*
28  * $Id: amxml.h 5151 2007-02-06 15:41:53Z martineau $
29  *
30  * xml parsing of amanda protocol packet
31  */
32
33 #ifndef AMXML_H
34 #define AMXML_H
35
36 #include "conffile.h"
37
38 typedef struct script_s {
39     char                          *plugin;
40     execute_on_t                   execute_on;
41     int                            execute_where;
42     proplist_t                     property;
43     struct client_script_result_s *result;
44 } script_t;
45
46 typedef GSList *scriptlist_t;
47
48 typedef struct level_s {
49     int level;
50     int server;                 /* if server can do the estimate */
51 } level_t;
52 typedef GSList *levellist_t;    /* A list where each element is a (level_t *) */
53
54 typedef struct a_dle_s {
55     char   *disk;
56     char   *device;
57     int     program_is_application_api;
58     char   *program;
59     estimatelist_t estimatelist;
60     int     spindle;
61     int     compress;
62     int     encrypt;
63     int     kencrypt;
64     levellist_t levellist;
65     int     nb_level;
66     char   *dumpdate;
67     char   *compprog;
68     char   *srv_encrypt;
69     char   *clnt_encrypt;
70     char   *srv_decrypt_opt;
71     char   *clnt_decrypt_opt;
72     int     record;
73     int     create_index;
74     char   *auth;
75     sl_t   *exclude_file;
76     sl_t   *exclude_list;
77     sl_t   *include_file;
78     sl_t   *include_list;
79     int     exclude_optional;
80     int     include_optional;
81     proplist_t application_property;
82     scriptlist_t scriptlist;
83     data_path_t  data_path;
84     GSList      *directtcp_list;
85     struct a_dle_s *next;
86 } dle_t;
87
88 dle_t *alloc_dle(void);
89 void   init_dle(dle_t *dle);
90 void   free_dle(dle_t *dle);
91 void   free_script_data(script_t *script);
92 dle_t *amxml_parse_node_CHAR(char *txt, char **errmsg);
93 dle_t *amxml_parse_node_FILE(FILE *file, char **errmsg);
94 char  *amxml_format_tag(char *tag, char *value);
95 #endif