Add a inflateEnd() call to free up the stream in the re-init block.
[obnox/wireshark/wip.git] / epan / prefs-int.h
index 04cf25d5e68d57aea3f60127ae1cd021f4a7debd..cd7111196b7ca05eede4e2fe7d2f5d1ab140fce0 100644 (file)
 
 struct pref_module {
        const char *name;       /* name of module */
-       const char *title;      /* title of module (displayed in preferences notebook) */
-       gboolean is_subtree;    /* if TRUE, this has other modules, not preferences, under it */
+       const char *title;      /* title of module (displayed in preferences list) */
+       const char *description;/* Description of module (displayed in preferences notebook) */
        void (*apply_cb)(void); /* routine to call when preferences applied */
-       GList   *prefs;         /* list of its preferences or submodules */
+       GList   *prefs;         /* list of its preferences */
+       emem_tree_t *submodules;/* list of its submodules */
        int     numprefs;       /* number of non-obsolete preferences */
        gboolean prefs_changed; /* if TRUE, a preference has changed since we last checked */
        gboolean obsolete;      /* if TRUE, this is a module that used to
@@ -39,10 +40,10 @@ struct pref_module {
 };
 
 /*
- * Module used for protocol preferences. With MSVC and a 
- * libwireshark.dll, we need a special declaration.
+ * Module used for protocol preferences. 
+ * With MSVC and a libwireshark.dll, we need a special declaration.
  */
-ETH_VAR_IMPORT module_t *protocols_module;
+WS_VAR_IMPORT module_t *protocols_module;
 
 /*
  * PREF_OBSOLETE is used for preferences that a module used to support
@@ -54,6 +55,8 @@ typedef enum {
        PREF_ENUM,
        PREF_STRING,
        PREF_RANGE,
+       PREF_STATIC_TEXT,
+       PREF_UAT,
        PREF_OBSOLETE
 } pref_type_t;
 
@@ -69,6 +72,7 @@ struct preference {
                gint *enump;
                const char **string;
                range_t **range;
+               void* uat;
        } varp;                 /* pointer to variable storing the value */
        union {
                guint uint;
@@ -97,10 +101,10 @@ gint find_val_for_string(const char *needle, const enum_val_t *haystack,
 
 /* read_prefs_file: read in a generic config file and do a callback to */
 /* pref_set_pair_fct() for every key/value pair found */
-typedef int (*pref_set_pair_cb) (gchar *key, gchar *value);
+typedef prefs_set_pref_e (*pref_set_pair_cb) (gchar *key, gchar *value, void *private_data);
 
 int
-read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct);
+read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct, void *private_data);