aboutsummaryrefslogtreecommitdiffstats
path: root/ui/preference_utils.h
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2015-06-05 11:19:37 +0200
committerAnders Broman <a.broman58@gmail.com>2015-06-25 16:23:08 +0000
commitacc581081e84c93e878a678fbb3655aba253607a (patch)
tree10ad9f0c0195475d01f42d64509e0c6ef53abb79 /ui/preference_utils.h
parentd4aa1a1c24e984339806c4ddb000ea9f9b352659 (diff)
Plugin Interface: Add GUI callbacks
Rename ext_menubar to a more appropriate plugin_if. External menus can be implemented by plugins to present additional menus for deep-packet analysis. One side-effect of such menus being implemented as plugins is, that they are being executed in different threads and therefore can only use limited access to the main GUI. Also, there is no safe cross-gui (GTK and Qt) way for many features. This patch implements a first functionality, by which a plugin implemented using ext_menubar can apply a display filter to the main view. For now the implementation supports filtering, as well as saving a preference. Change-Id: Iffe4caa954bbeb8ce356352de4dae348a50efba9 Reviewed-on: https://code.wireshark.org/review/8773 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/preference_utils.h')
-rw-r--r--ui/preference_utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/preference_utils.h b/ui/preference_utils.h
index 882555d70a..a0b345d043 100644
--- a/ui/preference_utils.h
+++ b/ui/preference_utils.h
@@ -80,6 +80,16 @@ extern void prefs_to_capture_opts(void);
*/
extern void prefs_main_write(void);
+/** Convenient function for plugin_if
+ *
+ * @param module the module for the preference
+ * @param key the key for the preference
+ * @param value the new value as string for the preference
+ *
+ * @return true if the value has been stored successfully
+ */
+extern gboolean prefs_store_ext(const char * module, const char * key, const char * value);
+
/** Add a custom column.
*
* @param fmt column format