| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
prefs-int.h
Go to the documentation of this file.
1/* prefs-int.h
2 * Definitions for implementation of preference handling routines;
3 * used by "friends" of the preferences type.
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11#pragma once
12#include <stdio.h>
13#include "ws_symbol_export.h"
14#include <epan/wmem_scopes.h>
15
16#ifdef __cplusplus
17 extern "C" {
18#endif /* __cplusplus */
19
23
27 struct pref_module {
28 const char *name;
29 const char *title;
30 const char *description;
31 const char *help;
32 void (*apply_cb)(void);
33 wmem_allocator_t* scope;
34 GList *prefs;
35 struct pref_module *parent;
36 wmem_tree_t *submodules;
37 int numprefs;
38 unsigned int prefs_changed_flags;
39 bool obsolete;
42 bool use_gui;
49 unsigned int effect_flags;
52};
53
57 typedef struct {
58 module_t* module;
59 FILE* pf;
60} write_pref_arg_t;
61
62
67 typedef void (*pref_custom_free_cb)(pref_t* pref);
68
73 typedef void (*pref_custom_reset_cb)(pref_t* pref);
74
82 typedef prefs_set_pref_e (*pref_custom_set_cb)(pref_t* pref, const char* value, unsigned int* changed_flags);
83
84/* typedef void (*pref_custom_write_cb) (pref_t* pref, write_pref_arg_t* arg); Deprecated. */
85
90 typedef const char* (*pref_custom_type_name_cb)(void);
91
96 typedef char* (*pref_custom_type_description_cb)(void);
97
103 typedef bool (*pref_custom_is_default_cb)(pref_t* pref);
104
111 typedef char* (*pref_custom_to_str_cb)(pref_t* pref, bool default_val);
112
116 struct pref_custom_cbs {
117 pref_custom_free_cb free_cb;
118 pref_custom_reset_cb reset_cb;
119 pref_custom_set_cb set_cb;
120 /* pref_custom_write_cb write_cb; Deprecated. */
121 pref_custom_type_name_cb type_name_cb;
122 pref_custom_type_description_cb type_description_cb;
123 pref_custom_is_default_cb is_default_cb;
124 pref_custom_to_str_cb to_str_cb;
125};
126
127
138 typedef enum {
139 PREF_UINT,
140 PREF_BOOL,
141 PREF_ENUM,
142 PREF_STRING,
143 PREF_RANGE,
144 PREF_STATIC_TEXT,
145 PREF_UAT,
146 PREF_SAVE_FILENAME,
147 PREF_COLOR,
148 PREF_CUSTOM,
149 PREF_DIRNAME,
150 PREF_DECODE_AS_RANGE,
151 PREF_OPEN_FILENAME,
152 PREF_PASSWORD,
153 PREF_PROTO_TCP_SNDAMB_ENUM,
154 PREF_DISSECTOR,
155 PREF_INT,
156 PREF_FLOAT
157} pref_type_e;
158
159/*
160 * (1) These are only supported for "internal" (non-protocol) use
161 * and not as a generic protocol preference.
162 * (2) Internal use only, not a generic protocol preference.
163 * (3) Like string, but never saved to prefs file.
164 * (4) Dedicated to TCP PROTOCOL for handling manual SEQ interpretation,
165 * and allow users manage the sender traffic ambiguities
166 * (5) Like string, but with dissector name syntax check.
167 */
168
169/* read_prefs_file: read in a generic config file and do a callback to */
170/* pref_set_pair_fct() for every key/value pair found */
184 typedef prefs_set_pref_e (*pref_set_pair_cb) (char *key, const char *value, void *private_data, bool return_range_errors);
185
192WS_DLL_PUBLIC
193 const char* prefs_get_description(pref_t *pref);
194
201WS_DLL_PUBLIC
202 const char* prefs_get_title(pref_t *pref);
203
209WS_DLL_PUBLIC
210 const char* prefs_get_name(pref_t *pref);
211
218WS_DLL_PUBLIC
219 int prefs_get_type(pref_t *pref);
220
227WS_DLL_PUBLIC uint32_t prefs_get_max_value(pref_t *pref);
228
237WS_DLL_PUBLIC
238 unsigned int prefs_get_effect_flags(pref_t *pref);
239
252WS_DLL_PUBLIC
253 void prefs_set_effect_flags(pref_t *pref, unsigned int flags);
254
262WS_DLL_PUBLIC
263 void prefs_set_effect_flags_by_name(module_t * module, const char *pref, unsigned int flags);
264
276WS_DLL_PUBLIC
277 unsigned int prefs_get_module_effect_flags(module_t * module);
278
290WS_DLL_PUBLIC
291 unsigned prefs_module_list_foreach(const wmem_tree_t* module_list, module_cb callback,
292 void* user_data, bool skip_obsolete);
293
308WS_DLL_PUBLIC
309 void prefs_set_module_effect_flags(module_t * module, unsigned int flags);
310
311
321WS_DLL_PUBLIC
322 bool prefs_set_range_value_work(pref_t *pref, const char *value,
323 bool return_range_errors, unsigned int *changed_flags);
324
332WS_DLL_PUBLIC
333 unsigned int
334 prefs_set_stashed_range_value(pref_t *pref, const char *value);
335
341WS_DLL_PUBLIC
342 void
343 prefs_range_add_value(pref_t *pref, uint32_t val);
344
350WS_DLL_PUBLIC
351 void
352 prefs_range_remove_value(pref_t *pref, uint32_t val);
353
362
363WS_DLL_PUBLIC unsigned int prefs_set_bool_value(pref_t *pref, bool value, pref_source_t source);
364
372WS_DLL_PUBLIC bool prefs_get_bool_value(pref_t *pref, pref_source_t source);
373
380WS_DLL_PUBLIC void prefs_invert_bool_value(pref_t *pref, pref_source_t source);
381
390WS_DLL_PUBLIC unsigned int prefs_set_uint_value(pref_t *pref, unsigned value, pref_source_t source);
391
398WS_DLL_PUBLIC unsigned prefs_get_uint_base(pref_t *pref);
399
407WS_DLL_PUBLIC unsigned prefs_get_uint_value(pref_t *pref, pref_source_t source);
408
417WS_DLL_PUBLIC unsigned int prefs_set_int_value(pref_t* pref, int value, pref_source_t source);
418
426WS_DLL_PUBLIC int prefs_get_int_value(pref_t* pref, pref_source_t source);
427
436WS_DLL_PUBLIC unsigned int prefs_set_float_value(pref_t* pref, double value, pref_source_t source);
437
445WS_DLL_PUBLIC double prefs_get_float_value(pref_t* pref, pref_source_t source);
446
455
456WS_DLL_PUBLIC unsigned int prefs_set_enum_value(pref_t *pref, int value, pref_source_t source);
457
466WS_DLL_PUBLIC unsigned int prefs_set_enum_string_value(pref_t *pref, const char *value, pref_source_t source);
467
475WS_DLL_PUBLIC int prefs_get_enum_value(pref_t *pref, pref_source_t source);
476
483WS_DLL_PUBLIC const enum_val_t* prefs_get_enumvals(pref_t *pref);
484
491WS_DLL_PUBLIC bool prefs_get_enum_radiobuttons(pref_t *pref);
492
501WS_DLL_PUBLIC bool prefs_set_color_value(pref_t *pref, color_t value, pref_source_t source);
502
510WS_DLL_PUBLIC color_t* prefs_get_color_value(pref_t *pref, pref_source_t source);
511
520WS_DLL_PUBLIC unsigned int prefs_set_custom_value(pref_t *pref, const char *value, pref_source_t source);
521
530WS_DLL_PUBLIC unsigned int prefs_set_string_value(pref_t *pref, const char* value, pref_source_t source);
531
539WS_DLL_PUBLIC const char *prefs_get_string_value(pref_t *pref, pref_source_t source);
540
547WS_DLL_PUBLIC struct epan_uat* prefs_get_uat_value(pref_t *pref);
548
557WS_DLL_PUBLIC bool prefs_set_range_value(pref_t *pref, range_t *value, pref_source_t source);
558
566WS_DLL_PUBLIC range_t* prefs_get_range_value_real(pref_t *pref, pref_source_t source);
567
576WS_DLL_PUBLIC bool prefs_add_decode_as_value(pref_t *pref, unsigned value, bool replace);
577
586WS_DLL_PUBLIC bool prefs_remove_decode_as_value(pref_t *pref, unsigned value, bool set_default);
587
596WS_DLL_PUBLIC unsigned int prefs_set_password_value(pref_t *pref, const char* value, pref_source_t source);
597
605WS_DLL_PUBLIC const char *prefs_get_password_value(pref_t *pref, pref_source_t source);
606
615WS_DLL_PUBLIC bool prefs_add_list_value(pref_t *pref, void *value, pref_source_t source);
616
624WS_DLL_PUBLIC GList* prefs_get_list_value(pref_t *pref, pref_source_t source);
625
631WS_DLL_PUBLIC void reset_pref(pref_t *pref);
632
637WS_DLL_PUBLIC const wmem_tree_t* prefs_get_module_tree(void);
638
649WS_DLL_PUBLIC
650 int
651 read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct, void *private_data);
652
663WS_DLL_PUBLIC
664 void
665 prefs_read_module(const char *name, const char* app_env_var_prefix);
666
673WS_DLL_PUBLIC
674 bool
675 prefs_pref_is_default(pref_t *pref);
676
684WS_DLL_PUBLIC
685 unsigned pref_stash(pref_t *pref, void *unused);
686
690 typedef struct pref_unstash_data
691{
692 module_t* module;
694 bool handle_decode_as;
696} pref_unstash_data_t;
697
707WS_DLL_PUBLIC
708 unsigned pref_get_changed_flags(pref_t *pref, void *unstash_data_p);
709
719WS_DLL_PUBLIC
720 unsigned pref_unstash(pref_t *pref, void *unstash_data_p);
721
731WS_DLL_PUBLIC
732 unsigned pref_clean_stash(pref_t *pref, void *unused);
733
739WS_DLL_PUBLIC
740 void reset_stashed_pref(pref_t *pref);
741
752WS_DLL_PUBLIC
753 char *
754 join_string_list(GList *sl);
755
764WS_DLL_PUBLIC
765 char *
766 prefs_sanitize_string(const char* str);
767
768#ifdef __cplusplus
769}
770#endif /* __cplusplus */
wmem_tree_t
struct _wmem_tree_t wmem_tree_t
Opaque type representing a red-black tree in the wmem system.
Definition wmem_tree.h:49
wmem_allocator_t
struct _wmem_allocator_t wmem_allocator_t
Definition wmem_core.h:44
prefs_get_name
WS_DLL_PUBLIC const char * prefs_get_name(pref_t *pref)
Fetch the name of a preference.
Definition prefs.c:262
prefs_module_list_foreach
WS_DLL_PUBLIC unsigned prefs_module_list_foreach(const wmem_tree_t *module_list, module_cb callback, void *user_data, bool skip_obsolete)
Iterate through all modules with preferences.
Definition prefs.c:842
prefs_set_int_value
WS_DLL_PUBLIC unsigned int prefs_set_int_value(pref_t *pref, int value, pref_source_t source)
Set an integer preference value.
Definition prefs.c:4947
prefs_get_uint_base
WS_DLL_PUBLIC unsigned prefs_get_uint_base(pref_t *pref)
Get the base value of an unsigned integer preference.
Definition prefs.c:5093
prefs_set_effect_flags
WS_DLL_PUBLIC void prefs_set_effect_flags(pref_t *pref, unsigned int flags)
Set flags for the effect of the preference.
Definition prefs.c:6176
prefs_set_range_value
WS_DLL_PUBLIC bool prefs_set_range_value(pref_t *pref, range_t *value, pref_source_t source)
Set a range value for a preference.
Definition prefs.c:1730
prefs_set_effect_flags_by_name
WS_DLL_PUBLIC void prefs_set_effect_flags_by_name(module_t *module, const char *pref, unsigned int flags)
Same as prefs_set_effect_flags, just different way to get preference.
Definition prefs.c:6187
prefs_set_enum_value
WS_DLL_PUBLIC unsigned int prefs_set_enum_value(pref_t *pref, int value, pref_source_t source)
Set an enum preference value.
Definition prefs.c:1359
prefs_get_string_value
WS_DLL_PUBLIC const char * prefs_get_string_value(pref_t *pref, pref_source_t source)
Get the string value of a preference.
Definition prefs.c:1537
pref_unstash
WS_DLL_PUBLIC unsigned pref_unstash(pref_t *pref, void *unstash_data_p)
"Unstash" a preference. Set a preference to its stashed value. Can be called from prefs_pref_foreach(...
Definition prefs.c:2242
join_string_list
WS_DLL_PUBLIC char * join_string_list(GList *sl)
Convert a string list preference to a preference string.
Definition prefs.c:4075
prefs_pref_is_default
WS_DLL_PUBLIC bool prefs_pref_is_default(pref_t *pref)
Check if a preference is at its default value.
Definition prefs.c:6342
prefs_set_color_value
WS_DLL_PUBLIC bool prefs_set_color_value(pref_t *pref, color_t value, pref_source_t source)
Set a color value for a preference.
Definition prefs.c:1850
pref_unstash_data_t
struct pref_unstash_data pref_unstash_data_t
Carries context data used when unstashing preferences back to their live values.
pref_set_pair_cb
prefs_set_pref_e(* pref_set_pair_cb)(char *key, const char *value, void *private_data, bool return_range_errors)
Set a preference based on a key-value pair.
Definition prefs-int.h:184
pref_custom_type_description_cb
char *(* pref_custom_type_description_cb)(void)
Callback that returns a newly allocated human-readable description of a custom preference type.
Definition prefs-int.h:96
prefs_get_uat_value
WS_DLL_PUBLIC struct epan_uat * prefs_get_uat_value(pref_t *pref)
Get the UAT value for a preference.
Definition prefs.c:1831
prefs_get_list_value
WS_DLL_PUBLIC GList * prefs_get_list_value(pref_t *pref, pref_source_t source)
Get the list value for a preference based on the source.
Definition prefs.c:1712
prefs_set_module_effect_flags
WS_DLL_PUBLIC void prefs_set_module_effect_flags(module_t *module, unsigned int flags)
Set flags for module's preferences effect.
Definition prefs.c:6202
prefs_get_password_value
WS_DLL_PUBLIC const char * prefs_get_password_value(pref_t *pref, pref_source_t source)
Get the password value for a preference.
Definition prefs.c:5046
reset_pref
WS_DLL_PUBLIC void reset_pref(pref_t *pref)
Reset a preference to its default value.
Definition prefs.c:4316
prefs_get_bool_value
WS_DLL_PUBLIC bool prefs_get_bool_value(pref_t *pref, pref_source_t source)
Get the boolean value of a preference.
Definition prefs.c:1306
prefs_get_module_effect_flags
WS_DLL_PUBLIC unsigned int prefs_get_module_effect_flags(module_t *module)
Fetch flags that show module's preferences effect.
Definition prefs.c:6193
prefs_get_enumvals
WS_DLL_PUBLIC const enum_val_t * prefs_get_enumvals(pref_t *pref)
Get the enumeration values for a preference.
Definition prefs.c:1416
prefs_get_max_value
WS_DLL_PUBLIC uint32_t prefs_get_max_value(pref_t *pref)
Fetches the maximum value for a preference.
Definition prefs.c:267
prefs_get_type
WS_DLL_PUBLIC int prefs_get_type(pref_t *pref)
Retrieves the type of a preference.
Definition prefs.c:257
prefs_get_float_value
WS_DLL_PUBLIC double prefs_get_float_value(pref_t *pref, pref_source_t source)
Get the float value of a preference.
Definition prefs.c:5027
prefs_get_module_tree
WS_DLL_PUBLIC const wmem_tree_t * prefs_get_module_tree(void)
Get the list of all modules with preferences (used for iterating through all preferences).
Definition prefs.c:320
prefs_get_enum_radiobuttons
WS_DLL_PUBLIC bool prefs_get_enum_radiobuttons(pref_t *pref)
Get the radio button values for an enumeration preference.
Definition prefs.c:1421
prefs_get_title
WS_DLL_PUBLIC const char * prefs_get_title(pref_t *pref)
Get the title of a preference.
Definition prefs.c:252
prefs_range_remove_value
WS_DLL_PUBLIC void prefs_range_remove_value(pref_t *pref, uint32_t val)
Remove a range value of a range preference.
Definition prefs.c:1799
prefs_get_uint_value
WS_DLL_PUBLIC unsigned prefs_get_uint_value(pref_t *pref, pref_source_t source)
Get the unsigned integer value of a preference.
Definition prefs.c:4929
prefs_sanitize_string
WS_DLL_PUBLIC char * prefs_sanitize_string(const char *str)
Sanitize a string so that it can be written to a preference file.
Definition prefs.c:4866
prefs_get_color_value
WS_DLL_PUBLIC color_t * prefs_get_color_value(pref_t *pref, pref_source_t source)
Get the color value for a preference based on the specified source.
Definition prefs.c:1888
prefs_invert_bool_value
WS_DLL_PUBLIC void prefs_invert_bool_value(pref_t *pref, pref_source_t source)
Inverts the boolean value of a preference based on the specified source.
Definition prefs.c:1287
prefs_add_list_value
WS_DLL_PUBLIC bool prefs_add_list_value(pref_t *pref, void *value, pref_source_t source)
Add a list value to a preference.
Definition prefs.c:1691
pref_custom_is_default_cb
bool(* pref_custom_is_default_cb)(pref_t *pref)
Callback that reports whether a custom preference currently holds its default value.
Definition prefs-int.h:103
pref_type_e
pref_type_e
Discriminator tag identifying the type and UI representation of a preference entry.
Definition prefs-int.h:138
PREF_CUSTOM
@ PREF_CUSTOM
Definition prefs-int.h:148
PREF_COLOR
@ PREF_COLOR
Definition prefs-int.h:147
PREF_BOOL
@ PREF_BOOL
Definition prefs-int.h:140
PREF_OPEN_FILENAME
@ PREF_OPEN_FILENAME
Definition prefs-int.h:151
PREF_STATIC_TEXT
@ PREF_STATIC_TEXT
Definition prefs-int.h:144
PREF_UAT
@ PREF_UAT
Definition prefs-int.h:145
PREF_PROTO_TCP_SNDAMB_ENUM
@ PREF_PROTO_TCP_SNDAMB_ENUM
Definition prefs-int.h:153
PREF_DECODE_AS_RANGE
@ PREF_DECODE_AS_RANGE
Definition prefs-int.h:150
PREF_RANGE
@ PREF_RANGE
Definition prefs-int.h:143
PREF_ENUM
@ PREF_ENUM
Definition prefs-int.h:141
PREF_FLOAT
@ PREF_FLOAT
Definition prefs-int.h:156
PREF_PASSWORD
@ PREF_PASSWORD
Definition prefs-int.h:152
PREF_DISSECTOR
@ PREF_DISSECTOR
Definition prefs-int.h:154
PREF_STRING
@ PREF_STRING
Definition prefs-int.h:142
PREF_SAVE_FILENAME
@ PREF_SAVE_FILENAME
Definition prefs-int.h:146
PREF_UINT
@ PREF_UINT
Definition prefs-int.h:139
PREF_INT
@ PREF_INT
Definition prefs-int.h:155
PREF_DIRNAME
@ PREF_DIRNAME
Definition prefs-int.h:149
pref_stash
WS_DLL_PUBLIC unsigned pref_stash(pref_t *pref, void *unused)
"Stash" a preference. Copy a preference to its stashed value. Can be called from prefs_pref_foreach()...
pref_custom_reset_cb
void(* pref_custom_reset_cb)(pref_t *pref)
Callback invoked to reset a custom preference to its default value.
Definition prefs-int.h:73
read_prefs_file
WS_DLL_PUBLIC int read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct, void *private_data)
Read the preferences file (or similar) and call the callback function to set each key/value pair foun...
Definition prefs.c:4631
reset_stashed_pref
WS_DLL_PUBLIC void reset_stashed_pref(pref_t *pref)
Set a stashed preference to its default value.
Definition prefs.c:2398
prefs_get_int_value
WS_DLL_PUBLIC int prefs_get_int_value(pref_t *pref, pref_source_t source)
Get the integer value of a preference based on the specified source.
Definition prefs.c:4978
prefs_set_string_value
WS_DLL_PUBLIC unsigned int prefs_set_string_value(pref_t *pref, const char *value, pref_source_t source)
Set a string value for a preference.
Definition prefs.c:1491
prefs_set_custom_value
WS_DLL_PUBLIC unsigned int prefs_set_custom_value(pref_t *pref, const char *value, pref_source_t source)
Set a custom value for a preference.
Definition prefs.c:1430
prefs_get_range_value_real
WS_DLL_PUBLIC range_t * prefs_get_range_value_real(pref_t *pref, pref_source_t source)
Get the range value for a preference based on the specified source.
Definition prefs.c:1765
pref_get_changed_flags
WS_DLL_PUBLIC unsigned pref_get_changed_flags(pref_t *pref, void *unstash_data_p)
Get the effect_flags from a stashed preference. Can be called from prefs_pref_foreach().
Definition prefs.c:2144
prefs_set_enum_string_value
WS_DLL_PUBLIC unsigned int prefs_set_enum_string_value(pref_t *pref, const char *value, pref_source_t source)
Set an enum value for a preference.
Definition prefs.c:1391
prefs_range_add_value
WS_DLL_PUBLIC void prefs_range_add_value(pref_t *pref, uint32_t val)
Add a range value of a range preference.
Definition prefs.c:1793
prefs_set_range_value_work
WS_DLL_PUBLIC bool prefs_set_range_value_work(pref_t *pref, const char *value, bool return_range_errors, unsigned int *changed_flags)
Set a range value for a range preference.
Definition prefs.c:1648
prefs_get_effect_flags
WS_DLL_PUBLIC unsigned int prefs_get_effect_flags(pref_t *pref)
Fetch flags that show the effect of the preference.
Definition prefs.c:6167
pref_clean_stash
WS_DLL_PUBLIC unsigned pref_clean_stash(pref_t *pref, void *unused)
Clean up a stashed preference. Can be called from prefs_pref_foreach().
pref_custom_to_str_cb
char *(* pref_custom_to_str_cb)(pref_t *pref, bool default_val)
Callback that serializes a custom preference to a newly allocated string.
Definition prefs-int.h:111
prefs_add_decode_as_value
WS_DLL_PUBLIC bool prefs_add_decode_as_value(pref_t *pref, unsigned value, bool replace)
Adds or replaces a decode-as value for a preference.
Definition prefs.c:2014
pref_custom_set_cb
prefs_set_pref_e(* pref_custom_set_cb)(pref_t *pref, const char *value, unsigned int *changed_flags)
Callback invoked to set a custom preference from a string value, reporting which flags changed.
Definition prefs-int.h:82
prefs_set_stashed_range_value
WS_DLL_PUBLIC unsigned int prefs_set_stashed_range_value(pref_t *pref, const char *value)
Set a stashed range value for a preference.
Definition prefs.c:1672
pref_custom_type_name_cb
const char *(* pref_custom_type_name_cb)(void)
Callback that returns the type name string for a custom preference; returns NULL for internal or hidd...
Definition prefs-int.h:90
pref_custom_free_cb
void(* pref_custom_free_cb)(pref_t *pref)
Callback invoked to free any resources allocated by a custom preference.
Definition prefs-int.h:67
prefs_read_module
WS_DLL_PUBLIC void prefs_read_module(const char *name, const char *app_env_var_prefix)
Read the preferences for a specific module.
Definition prefs.c:4479
prefs_set_password_value
WS_DLL_PUBLIC unsigned int prefs_set_password_value(pref_t *pref, const char *value, pref_source_t source)
Set a password value for a preference.
Definition prefs.c:5087
prefs_remove_decode_as_value
WS_DLL_PUBLIC bool prefs_remove_decode_as_value(pref_t *pref, unsigned value, bool set_default)
Removes a decode-as value from a preference.
Definition prefs.c:2039
prefs_get_enum_value
WS_DLL_PUBLIC int prefs_get_enum_value(pref_t *pref, pref_source_t source)
Get the current value of an enumeration preference.
Definition prefs.c:1398
prefs_set_float_value
WS_DLL_PUBLIC unsigned int prefs_set_float_value(pref_t *pref, double value, pref_source_t source)
Set a float value for a preference.
Definition prefs.c:4996
prefs_get_description
WS_DLL_PUBLIC const char * prefs_get_description(pref_t *pref)
Get the description of a preference.
Definition prefs.c:247
prefs_set_uint_value
WS_DLL_PUBLIC unsigned int prefs_set_uint_value(pref_t *pref, unsigned value, pref_source_t source)
Set an unsigned integer preference value.
Definition prefs.c:5052
prefs_set_bool_value
WS_DLL_PUBLIC unsigned int prefs_set_bool_value(pref_t *pref, bool value, pref_source_t source)
Set a boolean preference value.
Definition prefs.c:1255
pref_source_t
pref_source_t
Selects which copy of a preference value is used as the active source.
Definition prefs.h:140
module_cb
unsigned(* module_cb)(module_t *module, void *user_data)
Definition prefs.h:532
prefs_set_pref_e
prefs_set_pref_e
Result of setting a preference.
Definition prefs.h:1267
range_t
struct epan_range range_t
color_t
RGB color representation with 16-bit precision per channel.
Definition color.h:27
enum_val_t
Defines a single named value within an enumerated preference or option type.
Definition params.h:16
epan_uat
Represents a User Accessible Table (UAT), managing a set of user-editable records exposed to a dissec...
Definition uat-int.h:44
pref_custom_cbs
Callback table for a PREF_CUSTOM preference, providing lifecycle and serialization hooks.
Definition prefs-int.h:116
pref_custom_cbs::reset_cb
pref_custom_reset_cb reset_cb
Definition prefs-int.h:118
pref_custom_cbs::is_default_cb
pref_custom_is_default_cb is_default_cb
Definition prefs-int.h:123
pref_custom_cbs::type_description_cb
pref_custom_type_description_cb type_description_cb
Definition prefs-int.h:122
pref_custom_cbs::type_name_cb
pref_custom_type_name_cb type_name_cb
Definition prefs-int.h:121
pref_custom_cbs::set_cb
pref_custom_set_cb set_cb
Definition prefs-int.h:119
pref_custom_cbs::free_cb
pref_custom_free_cb free_cb
Definition prefs-int.h:117
pref_custom_cbs::to_str_cb
pref_custom_to_str_cb to_str_cb
Definition prefs-int.h:124
pref_module
Represents a preference module grouping related preferences under a named, hierarchical entry in the ...
Definition prefs-int.h:27
pref_module::effect_flags
unsigned int effect_flags
Definition prefs-int.h:49
pref_module::scope
wmem_allocator_t * scope
Definition prefs-int.h:33
pref_module::prefs
GList * prefs
Definition prefs-int.h:34
pref_module::use_gui
bool use_gui
Definition prefs-int.h:42
pref_module::submodules
wmem_tree_t * submodules
Definition prefs-int.h:36
pref_module::description
const char * description
Definition prefs-int.h:30
pref_module::name
const char * name
Definition prefs-int.h:28
pref_module::obsolete
bool obsolete
Definition prefs-int.h:39
pref_module::parent
struct pref_module * parent
Definition prefs-int.h:35
pref_module::prefs_changed_flags
unsigned int prefs_changed_flags
Definition prefs-int.h:38
pref_module::apply_cb
void(* apply_cb)(void)
Definition prefs-int.h:32
pref_module::numprefs
int numprefs
Definition prefs-int.h:37
pref_module::title
const char * title
Definition prefs-int.h:29
pref_module::help
const char * help
Definition prefs-int.h:31
pref_unstash_data
Carries context data used when unstashing preferences back to their live values.
Definition prefs-int.h:691
pref_unstash_data::handle_decode_as
bool handle_decode_as
Definition prefs-int.h:694
pref_unstash_data::module
module_t * module
Definition prefs-int.h:692
write_pref_arg_t
Bundles a preference module with a file handle for use during preference serialization.
Definition prefs-int.h:57
write_pref_arg_t::module
module_t * module
Definition prefs-int.h:58
write_pref_arg_t::pf
FILE * pf
Definition prefs-int.h:59
wmem_scopes.h