Imported Upstream version 3.3.2
[debian/amanda] / common-src / conffile.h
index 2c867cc3325bbd7667dca11914b76ae5adfaf73d..a9a65046cae7aa988d3b6efc2f2dabe049b786ef 100644 (file)
  * this works and it's here.
  */
 
+/* A "seen" struct.  Rather than allocate strings all over the place, this
+ * string is in the "parsed_filenames" GSList and will be freed when that
+ * GSList is freed.  This struct should be opaque to other modules. */
+typedef struct seen_s {
+    char *block;
+    char *filename;
+    int linenum;
+} seen_t;
+
 /* holdingdisk types */
 typedef enum {
     HOLD_NEVER,                 /* Always direct to tape  */
@@ -195,8 +204,8 @@ typedef enum {
 } data_path_t;
 
 typedef struct exinclude_s {
-    sl_t *sl_list;
-    sl_t *sl_file;
+    am_sl_t *sl_list;
+    am_sl_t *sl_file;
     int  optional;
 } exinclude_t;
 
@@ -204,6 +213,7 @@ typedef struct {
     int append;
     int priority;
     GSList* values;
+    seen_t seen;
 } property_t;
 
 typedef GHashTable* proplist_t;
@@ -258,13 +268,10 @@ typedef enum {
     CONFTYPE_NO_YES_ALL,
 } conftype_t;
 
-/* A "seen" struct.  Rather than allocate strings all over the place, this
- * string is in the "parsed_filenames" GSList and will be freed when that
- * GSList is freed.  This struct should be opaque to other modules. */
-typedef struct seen_s {
-    char *filename;
-    int linenum;
-} seen_t;
+typedef enum {
+    CONF_UNIT_NONE,
+    CONF_UNIT_K,
+} confunit_t;
 
 /* This should be considered an opaque type for any other modules.  The complete
  * struct is included here to allow quick access via macros. Access it *only* through
@@ -288,6 +295,7 @@ typedef struct val_s {
     } v;
     seen_t seen;
     conftype_t type;
+    confunit_t unit;
 } val_t;
 
 /* Functions to typecheck and extract a particular type of
@@ -488,6 +496,7 @@ typedef enum {
     CNF_TAPERSCAN,
     CNF_MAX_DLE_BY_VOLUME,
     CNF_EJECT_VOLUME,
+    CNF_TMPDIR,
     CNF_CNF /* sentinel */
 } confparm_key;
 
@@ -715,6 +724,7 @@ typedef enum {
     DUMPTYPE_ALLOW_SPLIT,
     DUMPTYPE_RECOVERY_LIMIT,
     DUMPTYPE_DUMP_LIMIT,
+    DUMPTYPE_MAX_WARNINGS,
     DUMPTYPE_DUMPTYPE /* sentinel */
 } dumptype_key;
 
@@ -806,6 +816,7 @@ char *dumptype_name(dumptype_t *dtyp);
 #define dumptype_get_allow_split(dtyp)         (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_ALLOW_SPLIT)))
 #define dumptype_get_recovery_limit(dtyp)      (val_t_to_host_limit(dumptype_getconf((dtyp), DUMPTYPE_RECOVERY_LIMIT)))
 #define dumptype_get_dump_limit(dtyp)          (val_t_to_host_limit(dumptype_getconf((dtyp), DUMPTYPE_DUMP_LIMIT)))
+#define dumptype_get_max_warnings(dtyp)        (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_MAX_WARNINGS)))
 
 /*
  * Interface parameter access
@@ -1481,7 +1492,10 @@ char *generic_get_security_conf(char *, void *);
  * This function only dumps the server configuration, and will fail on
  * clients.
  */
-void dump_configuration(void);
+void dump_configuration(gboolean print_default, gboolean print_source);
+
+void dump_dumptype(dumptype_t *dp, char *prefix, gboolean print_default,
+                  gboolean print_source);
 
 /* Return a sequence of strings giving the printable representation
  * of the given val_t.  If str_needs_quotes is true and each string is
@@ -1500,7 +1514,8 @@ void dump_configuration(void);
  * @param str_needs_quotes: add quotes to CONFTYPE_STR values?
  * @returns: NULL-terminated string vector
  */
-char **val_t_display_strs(val_t *val, int str_needs_quotes);
+char **val_t_display_strs(val_t *val, int str_needs_quotes, gboolean  print_source,
+                         gboolean print_unit);
 
 /* Read a dumptype; this is used by this module as well as by diskfile.c to
  * read the disklist.  The two are carefully balanced in their parsing process.