12 #ifndef __PREFS_INT_H__
13 #define __PREFS_INT_H__
16 #include "ws_symbol_export.h"
63 typedef void (*pref_custom_free_cb) (
pref_t* pref);
64 typedef void (*pref_custom_reset_cb) (
pref_t* pref);
65 typedef prefs_set_pref_e (*pref_custom_set_cb) (
pref_t* pref,
const gchar* value,
unsigned int* changed_flags);
68 typedef const char * (*pref_custom_type_name_cb) (void);
69 typedef char * (*pref_custom_type_description_cb) (void);
70 typedef gboolean (*pref_custom_is_default_cb) (
pref_t* pref);
71 typedef char * (*pref_custom_to_str_cb) (
pref_t* pref, gboolean default_val);
75 pref_custom_free_cb free_cb;
76 pref_custom_reset_cb reset_cb;
77 pref_custom_set_cb set_cb;
79 pref_custom_type_name_cb type_name_cb;
80 pref_custom_type_description_cb type_description_cb;
81 pref_custom_is_default_cb is_default_cb;
82 pref_custom_to_str_cb to_str_cb;
89 #define PREF_UINT (1u << 0)
90 #define PREF_BOOL (1u << 1)
91 #define PREF_ENUM (1u << 2)
92 #define PREF_STRING (1u << 3)
93 #define PREF_RANGE (1u << 4)
94 #define PREF_STATIC_TEXT (1u << 5)
95 #define PREF_UAT (1u << 6)
96 #define PREF_SAVE_FILENAME (1u << 7)
97 #define PREF_COLOR (1u << 8)
98 #define PREF_CUSTOM (1u << 9)
99 #define PREF_OBSOLETE (1u << 10)
100 #define PREF_DIRNAME (1u << 11)
101 #define PREF_DECODE_AS_UINT (1u << 12)
102 #define PREF_DECODE_AS_RANGE (1u << 13)
103 #define PREF_OPEN_FILENAME (1u << 14)
104 #define PREF_PASSWORD (1u << 15)
109 #define PREF_PROTO_TCP_SNDAMB_ENUM (1u << 16)
123 const char* prefs_get_description(
pref_t *pref);
126 const char* prefs_get_title(
pref_t *pref);
129 const char* prefs_get_name(
pref_t *pref);
132 int prefs_get_type(
pref_t *pref);
134 WS_DLL_PUBLIC guint32 prefs_get_max_value(
pref_t *pref);
137 #define PREF_EFFECT_DISSECTION (1u << 0)
138 #define PREF_EFFECT_CAPTURE (1u << 1)
139 #define PREF_EFFECT_GUI_LAYOUT (1u << 2)
140 #define PREF_EFFECT_FIELDS (1u << 3)
200 gboolean prefs_set_range_value_work(
pref_t *pref,
const gchar *value,
201 gboolean return_range_errors,
unsigned int *changed_flags);
205 prefs_set_stashed_range_value(
pref_t *pref,
const gchar *value);
218 WS_DLL_PUBLIC
unsigned int prefs_set_bool_value(
pref_t *pref, gboolean value, pref_source_t source);
219 WS_DLL_PUBLIC gboolean prefs_get_bool_value(
pref_t *pref, pref_source_t source);
220 WS_DLL_PUBLIC
void prefs_invert_bool_value(
pref_t *pref, pref_source_t source);
222 WS_DLL_PUBLIC
unsigned int prefs_set_uint_value(
pref_t *pref, guint value, pref_source_t source);
223 WS_DLL_PUBLIC guint prefs_get_uint_base(
pref_t *pref);
224 WS_DLL_PUBLIC guint prefs_get_uint_value_real(
pref_t *pref, pref_source_t source);
227 WS_DLL_PUBLIC
unsigned int prefs_set_enum_value(
pref_t *pref, gint value, pref_source_t source);
228 WS_DLL_PUBLIC
unsigned int prefs_set_enum_string_value(
pref_t *pref,
const gchar *value, pref_source_t source);
229 WS_DLL_PUBLIC gint prefs_get_enum_value(
pref_t *pref, pref_source_t source);
231 WS_DLL_PUBLIC gboolean prefs_get_enum_radiobuttons(
pref_t *pref);
233 WS_DLL_PUBLIC gboolean prefs_set_color_value(
pref_t *pref,
color_t value, pref_source_t source);
234 WS_DLL_PUBLIC
color_t* prefs_get_color_value(
pref_t *pref, pref_source_t source);
236 WS_DLL_PUBLIC
unsigned int prefs_set_custom_value(
pref_t *pref,
const char *value, pref_source_t source);
238 WS_DLL_PUBLIC
unsigned int prefs_set_string_value(
pref_t *pref,
const char* value, pref_source_t source);
239 WS_DLL_PUBLIC
char* prefs_get_string_value(
pref_t *pref, pref_source_t source);
243 WS_DLL_PUBLIC gboolean prefs_set_range_value(
pref_t *pref,
range_t *value, pref_source_t source);
244 WS_DLL_PUBLIC
range_t* prefs_get_range_value_real(
pref_t *pref, pref_source_t source);
246 WS_DLL_PUBLIC gboolean prefs_add_decode_as_value(
pref_t *pref, guint value, gboolean replace);
247 WS_DLL_PUBLIC gboolean prefs_remove_decode_as_value(
pref_t *pref, guint value, gboolean set_default);
249 WS_DLL_PUBLIC
unsigned int prefs_set_password_value(
pref_t *pref,
const char* value, pref_source_t source);
250 WS_DLL_PUBLIC
char* prefs_get_password_value(
pref_t *pref, pref_source_t source);
252 WS_DLL_PUBLIC
void reset_pref(
pref_t *pref);
263 prefs_pref_is_default(
pref_t *pref);
282 gboolean handle_decode_as;
WS_DLL_PUBLIC void prefs_set_effect_flags(pref_t *pref, unsigned int flags)
Definition: prefs.c:6272
WS_DLL_PUBLIC void prefs_set_effect_flags_by_name(module_t *module, const char *pref, unsigned int flags)
Definition: prefs.c:6280
WS_DLL_PUBLIC void prefs_range_remove_value(pref_t *pref, guint32 val)
Definition: prefs.c:1718
WS_DLL_PUBLIC module_t * protocols_module
Definition: prefs-int.h:61
WS_DLL_PUBLIC void prefs_set_module_effect_flags(module_t *module, unsigned int flags)
Definition: prefs.c:6295
WS_DLL_PUBLIC unsigned int prefs_get_module_effect_flags(module_t *module)
Definition: prefs.c:6286
WS_DLL_PUBLIC void prefs_range_add_value(pref_t *pref, guint32 val)
Definition: prefs.c:1712
WS_DLL_PUBLIC int read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct, void *private_data)
Definition: prefs.c:4515
WS_DLL_PUBLIC void reset_stashed_pref(pref_t *pref)
Definition: prefs.c:2228
WS_DLL_PUBLIC guint pref_clean_stash(pref_t *pref, gpointer unused)
Definition: prefs.c:2279
WS_DLL_PUBLIC guint pref_unstash(pref_t *pref, gpointer unstash_data_p)
Definition: prefs.c:2077
WS_DLL_PUBLIC unsigned int prefs_get_effect_flags(pref_t *pref)
Definition: prefs.c:6263
prefs_set_pref_e(* pref_set_pair_cb)(gchar *key, const gchar *value, void *private_data, gboolean return_range_errors)
Definition: prefs-int.h:120
WS_DLL_PUBLIC char * join_string_list(GList *sl)
Definition: prefs.c:3891
WS_DLL_PUBLIC guint pref_stash(pref_t *pref, gpointer unused)
Definition: prefs.c:2024
prefs_set_pref_e
Definition: prefs.h:919
Definition: wmem_tree-int.h:48
Definition: prefs-int.h:74
Definition: prefs-int.h:27
unsigned int effect_flags
Definition: prefs-int.h:47
GList * prefs
Definition: prefs-int.h:32
wmem_tree_t * submodules
Definition: prefs-int.h:34
gboolean use_gui
Definition: prefs-int.h:40
gboolean obsolete
Definition: prefs-int.h:37
const char * description
Definition: prefs-int.h:30
const char * name
Definition: prefs-int.h:28
struct pref_module * parent
Definition: prefs-int.h:33
unsigned int prefs_changed_flags
Definition: prefs-int.h:36
void(* apply_cb)(void)
Definition: prefs-int.h:31
int numprefs
Definition: prefs-int.h:35
const char * title
Definition: prefs-int.h:29
Definition: prefs-int.h:275
Definition: prefs-int.h:52