summaryrefslogtreecommitdiff
path: root/wsutil/plugins.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-12-02 08:30:29 +0000
committerGuy Harris <guy@alum.mit.edu>2013-12-02 08:30:29 +0000
commit0cc1545d05be6f655c950904b1da776190f3af16 (patch)
treeb82725615b527304bfb2e9e7d9f3b6dfc50ce7fd /wsutil/plugins.h
parentbaf569188ac49ad38912b82d23ff241321cd654f (diff)
downloadwireshark-0cc1545d05be6f655c950904b1da776190f3af16.tar.gz
Move most of the plugin code from epan to wsutil and remove all
knowledge of particular types of plugins. Instead, let particular types of plugins register with the common plugin code, giving a name and a routine to recognize that type of plugin. In particular applications, only process the relevant plugin types. Add a Makefile.common to the codecs directory. svn path=/trunk/; revision=53710
Diffstat (limited to 'wsutil/plugins.h')
-rw-r--r--wsutil/plugins.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/wsutil/plugins.h b/wsutil/plugins.h
new file mode 100644
index 0000000000..49d24970fa
--- /dev/null
+++ b/wsutil/plugins.h
@@ -0,0 +1,64 @@
+/* plugins.h
+ * definitions for plugins structures
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __PLUGINS_H__
+#define __PLUGINS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <glib.h>
+#include <gmodule.h>
+
+#include "ws_symbol_export.h"
+
+typedef gboolean (*plugin_callback)(GModule *handle);
+
+WS_DLL_PUBLIC void scan_plugins(void);
+WS_DLL_PUBLIC void add_plugin_type(const char *type, plugin_callback callback);
+typedef void (*plugin_description_callback)(const char *, const char *,
+ const char *, const char *,
+ void *);
+WS_DLL_PUBLIC void plugins_get_descriptions(plugin_description_callback callback, void *user_data);
+WS_DLL_PUBLIC void plugins_dump_all(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __PLUGINS_H__ */
+
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */