summaryrefslogtreecommitdiff
path: root/epan/prefs-int.h
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-08-28 19:27:19 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-08-28 19:27:19 +0000
commita96e6b2047cce1c671f476ae26c81ee8afb7ca12 (patch)
tree2056442e125bbf13f50e1d84c913ca2a8cd783c1 /epan/prefs-int.h
parentf17c5ac01f9198a033f6c1cb97ee54676121453e (diff)
downloadwireshark-a96e6b2047cce1c671f476ae26c81ee8afb7ca12.tar.gz
Doxygen changes.
svn path=/trunk/; revision=33981
Diffstat (limited to 'epan/prefs-int.h')
-rw-r--r--epan/prefs-int.h76
1 files changed, 46 insertions, 30 deletions
diff --git a/epan/prefs-int.h b/epan/prefs-int.h
index 10c491d10e..199c480c2e 100644
--- a/epan/prefs-int.h
+++ b/epan/prefs-int.h
@@ -28,26 +28,31 @@
#include <stdio.h>
+/**
+ *@file
+ */
+
struct pref_module {
- const char *name; /* name of module */
- 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 */
- 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
- exist but no longer does */
+ const char *name; /** name of module */
+ 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 */
+ 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
+ * exist but no longer does
+ */
};
-/*
+/**
* Module used for protocol preferences.
* With MSVC and a libwireshark.dll, we need a special declaration.
*/
WS_VAR_IMPORT module_t *protocols_module;
-/*
+/**
* PREF_OBSOLETE is used for preferences that a module used to support
* but no longer supports; we give different error messages for them.
*/
@@ -62,12 +67,13 @@ typedef enum {
PREF_OBSOLETE
} pref_type_t;
+/** Struct to hold preference data */
struct preference {
- const char *name; /* name of preference */
- const char *title; /* title to use in GUI */
- const char *description; /* human-readable description of preference */
- int ordinal; /* ordinal number of this preference */
- pref_type_t type; /* type of that preference */
+ const char *name; /** name of preference */
+ const char *title; /** title to use in GUI */
+ const char *description; /** human-readable description of preference */
+ int ordinal; /** ordinal number of this preference */
+ pref_type_t type; /** type of that preference */
union {
guint *uint;
gboolean *boolp;
@@ -75,39 +81,49 @@ struct preference {
const char **string;
range_t **range;
void* uat;
- } varp; /* pointer to variable storing the value */
+ } varp; /** pointer to variable storing the value */
union {
guint uint;
gboolean boolval;
gint enumval;
char *string;
range_t *range;
- } saved_val; /* original value, when editing from the GUI */
+ } saved_val; /** original value, when editing from the GUI */
union {
guint uint;
gboolean boolval;
gint enumval;
char *string;
range_t *range;
- } default_val; /* the default value of the preference */
+ } default_val; /** the default value of the preference */
union {
- guint base; /* input/output base, for PREF_UINT */
- guint32 max_value; /* maximum value of a range */
+ guint base; /** input/output base, for PREF_UINT */
+ guint32 max_value; /** maximum value of a range */
struct {
- const enum_val_t *enumvals; /* list of name & values */
- gboolean radio_buttons; /* TRUE if it should be shown as
- radio buttons rather than as an
- option menu or combo box in
- the preferences tab */
- } enum_info; /* for PREF_ENUM */
- } info; /* display/text file information */
- void *control; /* handle for GUI control for this preference */
+ const enum_val_t *enumvals; /** list of name & values */
+ gboolean radio_buttons; /** TRUE if it should be shown as
+ radio buttons rather than as an
+ option menu or combo box in
+ the preferences tab */
+ } enum_info; /** for PREF_ENUM */
+ } info; /** display/text file information */
+ void *control; /** handle for GUI control for this preference */
};
/* read_prefs_file: read in a generic config file and do a callback to */
/* pref_set_pair_fct() for every key/value pair found */
+/**
+ * Given a string of the form "<pref name>:<pref value>", as might appear
+ * as an argument to a "-o" option, parse it and set the preference in
+ * question.
+ * @return an indication of whether it succeeded or failed
+ * in some fashion.
+ */
typedef prefs_set_pref_e (*pref_set_pair_cb) (gchar *key, gchar *value, void *private_data);
+/** read the preferences file (or similiar) and call the callback
+ * function to set each key/value pair found
+ */
int
read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct, void *private_data);