diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-17 19:18:33 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-18 03:19:03 +0000 |
commit | d222dd398904dda499cb6fe2d5f300643076c2b1 (patch) | |
tree | 2ed0f5f624edd872ec333a4858ceed8da3d67dee /epan/prefs-int.h | |
parent | 4bec4b0167961bf557f82fb20ba3e95e4dfd3f86 (diff) | |
download | wireshark-d222dd398904dda499cb6fe2d5f300643076c2b1.tar.gz |
Provide routines to set string-like and range preferences from a string.
That gets rid of some duplicate code.
Change-Id: I4b65c6c73929d18602f6b0425e4f3dbbabbf0127
Reviewed-on: https://code.wireshark.org/review/12713
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/prefs-int.h')
-rw-r--r-- | epan/prefs-int.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/epan/prefs-int.h b/epan/prefs-int.h index e10cf3d61d..2a6dee279e 100644 --- a/epan/prefs-int.h +++ b/epan/prefs-int.h @@ -174,6 +174,21 @@ struct preference { */ typedef prefs_set_pref_e (*pref_set_pair_cb) (gchar *key, const gchar *value, void *private_data, gboolean return_range_errors); +/** Set the value of a string-like preference. */ +WS_DLL_PUBLIC +void +prefs_set_string_like_value(pref_t *pref, const gchar *value, gboolean *changed); + +/** Set the value of a range preference. Return FALSE on error, TRUE otherwise. */ +WS_DLL_PUBLIC +gboolean +prefs_set_range_value(pref_t *pref, const gchar *value, gboolean *changed); + +/** Set the value of an enum preference. */ +WS_DLL_PUBLIC +void +prefs_set_enum_value(pref_t *pref, const gchar *value, gboolean *changed); + /** read the preferences file (or similar) and call the callback * function to set each key/value pair found */ |