From c7b45d0a7ddeb5a416992fcd7c35062213a688f5 Mon Sep 17 00:00:00 2001 From: Irene Ruengeler Date: Wed, 9 Jul 2014 13:50:11 +0200 Subject: GTK Remote Capturing Move the GTK files necessary for managing the recnet remote host from capture_dlg.c to recent.c in order to use them in QT, too. Change-Id: I3f3fd31ce928162de08c6db7309ef2a9b1e97760 Reviewed-on: https://code.wireshark.org/review/2955 Reviewed-by: Anders Broman --- ui/recent.h | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) (limited to 'ui/recent.h') diff --git a/ui/recent.h b/ui/recent.h index 8261ef0845..bc7aa92771 100644 --- a/ui/recent.h +++ b/ui/recent.h @@ -29,7 +29,7 @@ extern "C" { #endif /* __cplusplus */ #include - +#include #include "epan/timestamp.h" #include "ui/ui_util.h" @@ -196,6 +196,56 @@ extern GList *recent_get_cfilter_list(const gchar *ifname); */ extern void recent_add_cfilter(const gchar *ifname, const gchar *s); +/** + * Get the value of a remote host from the remote_host_list. + * + * @param host Host's address + */ +extern struct remote_host *recent_get_remote_host(const gchar *host); + +/** + * Get the number of entries of the remote_host_list. + * + * @return size of the hash table + */ +extern int recent_get_remote_host_list_size(); + +/** + * Get the pointer of the remote_host_list. + * + * @return Pointer to the hash table + */ +extern GHashTable *get_remote_host_list(); + +/** + * Free all entries of the remote_host_list. + * + */ +extern void free_remote_host_list(); + +/** + * Add an entry to the remote_host_list. + * + * @param host Key of the entry + * @param rh Vakue of the entry + */ +extern void recent_add_remote_host(gchar *host, struct remote_host *rh); + +/** + * Fill the remote_host_list with the entries stored in the 'recent' file. + * + * @param s String to be filled from the 'recent' file. + * @return True, if the list was written successfully, False otherwise. + */ +extern gboolean capture_remote_combo_add_recent(const gchar *s); + +/** + * Write the contents of the remote_host_list to the 'recent' file. + * + * @param rf File to write to. + */ +extern void capture_remote_combo_recent_write_all(FILE *rf); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit v1.2.1