aboutsummaryrefslogtreecommitdiffstats
path: root/epan/funnel.h
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2006-02-04 19:56:50 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2006-02-04 19:56:50 +0000
commite487660dfce79cc3b96e6dcfda7164f56c1e8c7d (patch)
tree2ea66d2cd1d0a32d46a7bc8442efd6dffd418897 /epan/funnel.h
parent3f6e2badade390f5564916703542f61ffd599ee3 (diff)
The funneled GUI mini API.
A very reduced set of gui ops (by now just a text window) that can be funneled to dissectors (even plugins) via epan. svn path=/trunk/; revision=17149
Diffstat (limited to 'epan/funnel.h')
-rw-r--r--epan/funnel.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/epan/funnel.h b/epan/funnel.h
new file mode 100644
index 0000000000..cfef7c04df
--- /dev/null
+++ b/epan/funnel.h
@@ -0,0 +1,95 @@
+/*
+ * funnel.h
+ *
+ * EPAN's GUI mini-API
+ *
+ * (c) 2006, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#ifndef _FUNNEL_H
+#define _FUNNEL_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <glib.h>
+#include "../stat_menu.h"
+
+
+typedef struct _funnel_text_window_t funnel_text_window_t ;
+typedef struct _funnel_tree_window_t funnel_tree_window_t ;
+typedef struct _funnel_node_t funnel_node_t ;
+typedef struct _funnel_dialog_t funnel_dialog_t;
+
+typedef void (*funnel_dlg_cb_t)(const gchar** user_input);
+
+typedef struct _funnel_ops_t {
+ funnel_text_window_t* (*new_text_window)(const gchar* label);
+ void (*set_text)(funnel_text_window_t* win, const gchar* text);
+ void (*append_text)(funnel_text_window_t* win, const gchar* text);
+ void (*prepend_text)(funnel_text_window_t* win, const gchar* text);
+ void (*clear_text)(funnel_text_window_t* win);
+ const gchar* (*get_text)(funnel_text_window_t* win);
+ void (*destroy_text_window)(funnel_text_window_t* win);
+#if 0
+ funnel_node_t* (*new_tree_window)(const gchar* title, gchar** columns);
+ funnel_node_t* (*add_node)(funnel_node_t* node, gchar** values);
+ void (*remove_node)(funnel_node_t* node);
+ void (*set_cell)(funnel_node_t* node, gchar* column, const gchar* text);
+
+ funnel_dialog_t* (*new_dialog)(const gchar* title,
+ const gchar* text,
+ guint32 buttonmask,
+ const gchar** fieldnames,
+ funnel_dlg_cb_t dlg_cb );
+
+ void (*set_filter)(const gchar* filter_string);
+#endif
+} funnel_ops_t;
+
+
+extern const funnel_ops_t* funnel_get_funnel_ops(void);
+extern void funnel_set_funnel_ops(const funnel_ops_t*);
+
+
+extern void funnel_register_menu(const char *name,
+ REGISTER_STAT_GROUP_E group,
+ void (*callback)(gpointer),
+ gpointer callback_data);
+#if 0
+extern void funnel_register_field_menu(const char *name,
+ const char *field_abbrev,
+ REGISTER_STAT_GROUP_E group,
+ void (*callback)(gpointer),
+ gpointer callback_data);
+#endif
+
+
+typedef void (*funnel_registration_cb_t)(const char *name,
+ REGISTER_STAT_GROUP_E group,
+ void (*callback)(gpointer),
+ gpointer callback_data);
+
+extern void funnel_register_all_menus(funnel_registration_cb_t r_cb);
+
+#endif