Fix build by #if 0 out unused de_sgsap_tmsi() function.
[obnox/wireshark/wip.git] / gtk / main.h
index cde0803ffc9e2561c9d2b37b6520e42eb6ca6063..4b351899084543f5d296c6748daea13b652f19c6 100644 (file)
 #ifndef __MAIN_H__
 #define __MAIN_H__
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "globals.h"
 
 /** @defgroup main_window_group Main window
   digraph main_dependencies {
       node [shape=record, fontname=Helvetica, fontsize=10];
       main [ label="main window" URL="\ref main.h"];
-      menu [ label="menubar" URL="\ref menu.h"];
-      toolbar [ label="toolbar" URL="\ref toolbar.h"];
-      packet_list [ label="packet list pane" URL="\ref packet_list.h"];
-      proto_draw [ label="packet details & bytes panes" URL="\ref proto_draw.h"];
+      menu [ label="menubar" URL="\ref menus.h"];
+      toolbar [ label="toolbar" URL="\ref main_toolbar.h"];
+      packet_list [ label="packet list pane" URL="\ref main_packet_list.h"];
+      proto_draw [ label="packet details & bytes panes" URL="\ref main_proto_draw.h"];
       recent [ label="recent user settings" URL="\ref recent.h"];
       main -> menu [ arrowhead="open", style="solid" ];
       main -> toolbar [ arrowhead="open", style="solid" ];
@@ -62,14 +58,14 @@ extern GString *comp_info_str;
 /** Global runtime version string */
 extern GString *runtime_info_str;
 
-/** Global capture options type. */
-typedef struct capture_options_tag * p_capture_options_t;
-/** Pointer to global capture options. */
-extern p_capture_options_t capture_opts;
+extern GtkWidget* airpcap_tb;
 
 extern void protect_thread_critical_region(void);
 extern void unprotect_thread_critical_region(void);
 
+void
+airpcap_toolbar_encryption_cb(GtkWidget *entry, gpointer user_data);
+
 /** User requested "Zoom In" by menu or toolbar.
  *
  * @param widget parent widget (unused)
@@ -121,21 +117,51 @@ typedef enum {
 /** "bitwise or" this with MATCH_SELECTED_E value for instant apply instead of prepare only */
 #define MATCH_SELECTED_APPLY_NOW    0x100
 
-/** User highlited item in details window and then right clicked and selected the copy option 
+/** "bitwise or" this with MATCH_SELECTED_E value for copy to clipboard instead of prepare only */
+#define MATCH_SELECTED_COPY_ONLY    0x200
+
+/** User requested one of "Apply as Filter" or "Prepare a Filter" functions
+ *  by menu or context menu of protocol tree.
  *
  * @param widget parent widget
  * @param data parent widget
+ * @param action the function to use
  */
-extern void copy_selected_plist_cb(GtkWidget *w _U_, gpointer data);
+extern void match_selected_ptree_cb(GtkWidget *widget, gpointer data, MATCH_SELECTED_E action);
 
-/** User requested one of "Apply as Filter" or "Prepare a Filter" functions 
- *  by menu or context menu of protocol tree.
+/** "Copy ..." action type. */
+typedef enum {
+    COPY_SELECTED_DESCRIPTION,  /**< "Copy Description" */
+    COPY_SELECTED_FIELDNAME,    /**< "Copy Fieldname" */
+    COPY_SELECTED_VALUE         /**< "Copy Value" */
+} COPY_SELECTED_E;
+
+/** User highlighted item in details window and then right clicked and selected the copy option
  *
- * @param widget parent widget
+ * @param w parent widget
  * @param data parent widget
  * @param action the function to use
  */
-extern void match_selected_ptree_cb(GtkWidget *widget, gpointer data, MATCH_SELECTED_E action);
+extern void copy_selected_plist_cb(GtkWidget *w _U_, gpointer data, COPY_SELECTED_E action);
+
+/** Set or remove a time reference on this frame 
+ *
+ * @param set TRUE = set time ref, FALSE=unset time ref
+ * @param frame pointer to frame
+ * @param row row number
+ */
+extern void set_frame_reftime(gboolean set, frame_data *frame, gint row);
+
+/** User requested the colorize function
+ *  by menu or context menu of protocol tree.
+ *
+ * @param w parent widget
+ * @param data parent widget
+ * @param filt_nr  1-10: use filter for color 1-10
+ *                    0: open new colorization rule dialog
+ *                  255: clear filters for color 1-10
+ */
+extern void colorize_selected_ptree_cb(GtkWidget *w, gpointer data, guint8 filt_nr);
 
 /** User requested one of "Apply as Filter" or "Prepare a Filter" functions
  *  by context menu of packet list.
@@ -202,6 +228,13 @@ extern void export_pdml_cmd_cb(GtkWidget *widget, gpointer data);
  */
 extern void export_csv_cmd_cb(GtkWidget *widget, gpointer data);
 
+/** User requested "Export as C Arrays" by menu.
+ *
+ * @param widget parent widget (unused)
+ * @param data unused
+ */
+extern void export_carrays_cmd_cb(GtkWidget *widget, gpointer data);
+
 /** User requested "Expand Tree" by menu.
  *
  * @param widget parent widget (unused)
@@ -216,6 +249,13 @@ extern void expand_tree_cb(GtkWidget *widget, gpointer data);
  */
 extern void expand_all_cb(GtkWidget *widget, gpointer data);
 
+/** User requested "Apply as a custom column" by menu.
+ *
+ * @param widget parent widget (unused)
+ * @param data unused
+ */
+extern void apply_as_custom_column_cb(GtkWidget *widget, gpointer data);
+
 /** User requested "Collapse All" by menu.
  *
  * @param widget parent widget (unused)
@@ -267,10 +307,11 @@ extern void find_prev_mark_cb(GtkWidget *widget, gpointer data, int action);
  */
 extern gboolean dfilter_combo_add_recent(gchar *dftext);
 
+#if 0
 /** Empty out the combobox entry field */
 extern void dfilter_combo_add_empty(void);
-
-/** Write all non empty display filters (until maximum count) 
+#endif
+/** Write all non empty display filters (until maximum count)
  *  of the combo box GList to the user's recent file.
  *
  * @param rf the recent file
@@ -289,7 +330,7 @@ extern void main_widgets_rearrange(void);
 /** Show or hide the main window widgets, user changed it's preferences. */
 extern void main_widgets_show_or_hide(void);
 
-/** Apply a new filter string. 
+/** Apply a new filter string.
  *  Call cf_filter_packets() and add this filter string to the recent filter list.
  *
  * @param cf the capture file
@@ -300,23 +341,28 @@ extern void main_widgets_show_or_hide(void);
 extern gboolean main_filter_packets(capture_file *cf, const gchar *dftext,
     gboolean force);
 
-/** Init the drag-n-drop functionality.
- *
- * @param w the target widget for this dnd operations
- */
-extern void dnd_init(GtkWidget *w);
-
-/** Open a new file coming from drag and drop.
- * @param cf_names_freeme the selection data reported from GTK
- */
-extern void dnd_open_file_cmd(gchar *cf_names_freeme);
-
-/** Update the packets statusbar to the current values. */
-extern void packets_bar_update(void);
-
 #ifdef _WIN32
 /** Win32 only: Create a console. Beware: cannot be closed again. */
 extern void create_console(void);
 #endif
 
+#if defined(_WIN32) || ! defined USE_THREADS
+/** Restart the tap update display timer with new configured interval */
+extern void reset_tap_update_timer(void);
+#endif
+
+/** Fill in capture options with values from the preferences */
+extern void prefs_to_capture_opts(void);
+
+/** Change configuration profile */
+extern void change_configuration_profile(const gchar *profile_name);
+
+/** redissect packets and update UI */
+extern void redissect_packets(void);
+
+/** Fetch all IP addresses from selected row */
+extern GList *get_ip_address_list_from_packet_list_row(gpointer data);
+
+extern GtkWidget *pkt_scrollw;
+
 #endif /* __MAIN_H__ */