aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.h
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2013-03-01 23:53:11 +0000
committerBalint Reczey <balint@balintreczey.hu>2013-03-01 23:53:11 +0000
commit1ebdb2e521ca0cbd7aeebd1c89b8a5cf6a4cc322 (patch)
treed6dde0ea7b6e6e15cc2c51a5f478fb85965b9720 /epan/prefs.h
parent0b8d70bfb715bc3d89b6dfae86fc79d7c4387f02 (diff)
Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
Diffstat (limited to 'epan/prefs.h')
-rw-r--r--epan/prefs.h91
1 files changed, 48 insertions, 43 deletions
diff --git a/epan/prefs.h b/epan/prefs.h
index 8249bc42ce..d4053545fd 100644
--- a/epan/prefs.h
+++ b/epan/prefs.h
@@ -36,6 +36,7 @@ extern "C" {
#include <epan/params.h>
#include <epan/range.h>
#include <epan/addr_resolv.h>
+#include "ws_symbol_export.h"
#define PR_DEST_CMD 0
#define PR_DEST_FILE 1
@@ -55,6 +56,7 @@ extern "C" {
* Set "*name_resolve" to the bitmask, and return '\0', on success;
* return the bad character in the string on error.
*/
+WS_DLL_PUBLIC
char string_to_name_resolve(const char *string, e_addr_resolve *name_resolve);
/*
@@ -195,7 +197,7 @@ typedef struct _e_prefs {
gint gui_update_interval;
} e_prefs;
-WS_VAR_IMPORT e_prefs prefs;
+WS_DLL_PUBLIC e_prefs prefs;
/*
* Routines to let modules that have preference settings register
@@ -209,13 +211,13 @@ struct pref_custom_cbs;
typedef struct pref_module module_t;
/** Sets up memory used by proto routines. Called at program startup */
-extern void prefs_init(void);
+void prefs_init(void);
/** Reset preferences to default values. Called at profile change */
-extern void prefs_reset(void);
+WS_DLL_PUBLIC void prefs_reset(void);
/** Frees memory used by proto routines. Called at program shutdown */
-extern void prefs_cleanup(void);
+void prefs_cleanup(void);
/*
* Register a module that will have preferences.
@@ -231,7 +233,7 @@ extern void prefs_cleanup(void);
* name is the protocol name specified at the "proto_register_protocol()"
* call so that the "Protocol Properties..." menu item works.
*/
-extern module_t *prefs_register_module(module_t *parent, const char *name,
+module_t *prefs_register_module(module_t *parent, const char *name,
const char *title, const char *description, void (*apply_cb)(void),
const gboolean use_gui);
@@ -241,13 +243,13 @@ extern module_t *prefs_register_module(module_t *parent, const char *name,
* at the top level and the title used in the tab for it in a preferences
* dialog box.
*/
-extern module_t *prefs_register_subtree(module_t *parent, const char *title,
+module_t *prefs_register_subtree(module_t *parent, const char *title,
const char *description, void (*apply_cb)(void));
/*
* Register that a protocol has preferences.
*/
-extern module_t *prefs_register_protocol(int id, void (*apply_cb)(void));
+WS_DLL_PUBLIC module_t *prefs_register_protocol(int id, void (*apply_cb)(void));
/*
* Register that a statistical tap has preferences.
@@ -259,7 +261,7 @@ extern module_t *prefs_register_protocol(int id, void (*apply_cb)(void));
*
* "description" is a longer human-readable description of the tap.
*/
-extern module_t *prefs_register_stat(const char *name, const char *title,
+WS_DLL_PUBLIC module_t *prefs_register_stat(const char *name, const char *title,
const char *description,
void (*apply_cb)(void));
@@ -268,14 +270,14 @@ extern module_t *prefs_register_stat(const char *name, const char *title,
* subtree
*/
#define PREFERENCE_GROUPING
-extern module_t *prefs_register_protocol_subtree(const char *subtree, int id,
+WS_DLL_PUBLIC module_t *prefs_register_protocol_subtree(const char *subtree, int id,
void (*apply_cb)(void));
/*
* Register that a protocol used to have preferences but no longer does,
* by creating an "obsolete" module for it.
*/
-extern module_t *prefs_register_protocol_obsolete(int id);
+module_t *prefs_register_protocol_obsolete(int id);
/*
* Callback function for module list scanners.
@@ -285,7 +287,7 @@ typedef guint (*module_cb)(module_t *module, gpointer user_data);
/*
* Returns TRUE if module has any submodules
*/
-extern gboolean prefs_module_has_submodules(module_t *module);
+WS_DLL_PUBLIC gboolean prefs_module_has_submodules(module_t *module);
/*
* Call a callback function, with a specified argument, for each module
@@ -295,7 +297,7 @@ extern gboolean prefs_module_has_submodules(module_t *module);
* preferences for dissectors that no longer have preferences to be
* silently ignored in preference files.
*/
-extern guint prefs_modules_foreach(module_cb callback, gpointer user_data);
+WS_DLL_PUBLIC guint prefs_modules_foreach(module_cb callback, gpointer user_data);
/*
* Call a callback function, with a specified argument, for each submodule
@@ -307,7 +309,7 @@ extern guint prefs_modules_foreach(module_cb callback, gpointer user_data);
* silently ignored in preference files. Does not ignore subtrees,
* as this can be used when walking the display tree of modules.
*/
-extern guint prefs_modules_foreach_submodules(module_t *module, module_cb callback, gpointer user_data);
+WS_DLL_PUBLIC guint prefs_modules_foreach_submodules(module_t *module, module_cb callback, gpointer user_data);
/*
* Call the "apply" callback function for each module if any of its
@@ -315,7 +317,7 @@ extern guint prefs_modules_foreach_submodules(module_t *module, module_cb callba
* preferences have changed, as the module has been notified of that
* fact.
*/
-extern void prefs_apply_all(void);
+WS_DLL_PUBLIC void prefs_apply_all(void);
/*
* Call the "apply" callback function for a specific module if any of
@@ -323,7 +325,7 @@ extern void prefs_apply_all(void);
* preferences have changed, as the module has been notified of that
* fact.
*/
-extern void prefs_apply(module_t *module);
+WS_DLL_PUBLIC void prefs_apply(module_t *module);
struct preference;
@@ -333,12 +335,12 @@ typedef struct preference pref_t;
/*
* Returns TRUE if the given protocol has registered preferences.
*/
-extern gboolean prefs_is_registered_protocol(const char *name);
+WS_DLL_PUBLIC gboolean prefs_is_registered_protocol(const char *name);
/*
* Returns the module title of a registered protocol (or NULL if unknown).
*/
-extern const char *prefs_get_title_by_name(const char *name);
+WS_DLL_PUBLIC const char *prefs_get_title_by_name(const char *name);
/** Given a module name, return a pointer to its pref_module struct,
* or NULL if it's not found.
@@ -348,7 +350,7 @@ extern const char *prefs_get_title_by_name(const char *name);
* @return A pointer to the corresponding preference module, or NULL if it
* wasn't found.
*/
-extern module_t *prefs_find_module(const char *name);
+WS_DLL_PUBLIC module_t *prefs_find_module(const char *name);
/** Given a module name, and a preference name return a pointer to the given
* module's given preference or NULL if it's not found.
@@ -359,32 +361,32 @@ extern module_t *prefs_find_module(const char *name);
* @return A pointer to the corresponding preference, or NULL if it
* wasn't found.
*/
-extern pref_t *prefs_find_preference(module_t * module, const char *pref);
+WS_DLL_PUBLIC pref_t *prefs_find_preference(module_t * module, const char *pref);
/*
* Register a preference with an unsigned integral value.
*/
-extern void prefs_register_uint_preference(module_t *module, const char *name,
+WS_DLL_PUBLIC void prefs_register_uint_preference(module_t *module, const char *name,
const char *title, const char *description, guint base, guint *var);
/*
* Register a preference with an Boolean value.
* Note that the name must be in lowercase letters only (underscore allowed).
*/
-extern void prefs_register_bool_preference(module_t *module, const char *name,
+WS_DLL_PUBLIC void prefs_register_bool_preference(module_t *module, const char *name,
const char *title, const char *description, gboolean *var);
/*
* Register a preference with an enumerated value.
*/
-extern void prefs_register_enum_preference(module_t *module, const char *name,
+WS_DLL_PUBLIC void prefs_register_enum_preference(module_t *module, const char *name,
const char *title, const char *description, gint *var,
const enum_val_t *enumvals, gboolean radio_buttons);
/*
* Register a preference with a character-string value.
*/
-extern void prefs_register_string_preference(module_t *module, const char *name,
+WS_DLL_PUBLIC void prefs_register_string_preference(module_t *module, const char *name,
const char *title, const char *description, const char **var);
/*
@@ -393,7 +395,7 @@ extern void prefs_register_string_preference(module_t *module, const char *name,
* except that the GUI gives the user the ability to browse for the
* file.
*/
-extern void prefs_register_filename_preference(module_t *module, const char *name,
+WS_DLL_PUBLIC void prefs_register_filename_preference(module_t *module, const char *name,
const char *title, const char *description, const char **var);
/*
@@ -402,27 +404,27 @@ extern void prefs_register_filename_preference(module_t *module, const char *nam
* except that the GUI gives the user the ability to browse for a
* directory.
*/
-extern void prefs_register_directory_preference(module_t *module, const char *name,
+WS_DLL_PUBLIC void prefs_register_directory_preference(module_t *module, const char *name,
const char *title, const char *description, const char **var);
/*
* Register a preference with a ranged value.
*/
-extern void prefs_register_range_preference(module_t *module, const char *name,
+WS_DLL_PUBLIC void prefs_register_range_preference(module_t *module, const char *name,
const char *title, const char *description, range_t **var,
guint32 max_value);
/*
* Register a static text 'preference'. It can be used to add some info/explanation.
*/
-extern void prefs_register_static_text_preference(module_t *module, const char *name,
+WS_DLL_PUBLIC void prefs_register_static_text_preference(module_t *module, const char *name,
const char *title, const char *description);
/*
* Register a uat 'preference'. It adds a button that opens the uat's window in the
* preferences tab of the module.
*/
-extern void prefs_register_uat_preference(module_t *module,
+WS_DLL_PUBLIC void prefs_register_uat_preference(module_t *module,
const char *name,
const char* title,
const char *description,
@@ -434,7 +436,7 @@ extern void prefs_register_uat_preference(module_t *module,
* "GUI preferences" to aid in reading/writing the preferences file, but the
* "data" is still managed by the specific "GUI preferences" dialog.
*/
-extern void prefs_register_color_preference(module_t *module, const char *name,
+void prefs_register_color_preference(module_t *module, const char *name,
const char *title, const char *description, color_t *color);
/*
@@ -443,14 +445,14 @@ extern void prefs_register_color_preference(module_t *module, const char *name,
* "GUI preferences" to aid in reading/writing the preferences file, but the
* "data" is still managed by the specific "GUI preferences" dialog.
*/
-extern void prefs_register_custom_preference(module_t *module, const char *name,
+void prefs_register_custom_preference(module_t *module, const char *name,
const char *title, const char *description, struct pref_custom_cbs* custom_cbs,
void** custom_data);
/*
* Register a preference that used to be supported but no longer is.
*/
-extern void prefs_register_obsolete_preference(module_t *module,
+WS_DLL_PUBLIC void prefs_register_obsolete_preference(module_t *module,
const char *name);
@@ -463,21 +465,21 @@ typedef guint (*pref_cb)(pref_t *pref, gpointer user_data);
* If any of the callbacks return a non-zero value, stop and return that
* value, otherwise return 0.
*/
-extern guint prefs_pref_foreach(module_t *module, pref_cb callback,
+WS_DLL_PUBLIC guint prefs_pref_foreach(module_t *module, pref_cb callback,
gpointer user_data);
/* Parse through a list of comma-separated, possibly quoted strings.
* Return a list of the string data.
*/
-extern GList *prefs_get_string_list(const gchar *str);
+WS_DLL_PUBLIC GList *prefs_get_string_list(const gchar *str);
/* Clear the given list of string data. */
-extern void prefs_clear_string_list(GList *sl);
+WS_DLL_PUBLIC void prefs_clear_string_list(GList *sl);
/*
* Register all non-dissector modules' preferences.
*/
-extern void prefs_register_modules(void);
+WS_DLL_PUBLIC void prefs_register_modules(void);
/** Fetch a short preference type name, e.g. "Integer".
*
@@ -485,6 +487,7 @@ extern void prefs_register_modules(void);
*
* @return The preference type name. May be NULL.
*/
+WS_DLL_PUBLIC
const char *prefs_pref_type_name(pref_t *pref);
/** Fetch a long description of the preference type
@@ -495,6 +498,7 @@ const char *prefs_pref_type_name(pref_t *pref);
* values for enums. The description may include newlines. Must be
* g_free()d.
*/
+WS_DLL_PUBLIC
char *prefs_pref_type_description(pref_t *pref);
/** Fetch a string representation of the preference.
@@ -505,6 +509,7 @@ char *prefs_pref_type_description(pref_t *pref);
*
* @return A string representation of the preference. Must be g_free()d.
*/
+WS_DLL_PUBLIC
char *prefs_pref_to_str(pref_t *pref, pref_source_t source);
/* Read the preferences file, fill in "prefs", and return a pointer to it.
@@ -520,13 +525,13 @@ char *prefs_pref_to_str(pref_t *pref, pref_source_t source);
on an open error and into "*pf_read_errno_return" on a read error,
stuff a pointer to the path of the file into "*pf_path_return", and
return NULL. */
-extern e_prefs *read_prefs(int *, int *, char **, int *, int *, char **);
+WS_DLL_PUBLIC e_prefs *read_prefs(int *, int *, char **, int *, int *, char **);
/* Write out "prefs" to the user's preferences file, and return 0.
If we got an error, stuff a pointer to the path of the preferences file
into "*pf_path_return", and return the errno. */
-extern int write_prefs(char **);
+WS_DLL_PUBLIC int write_prefs(char **);
/*
* Given a string of the form "<pref name>:<pref value>", as might appear
@@ -544,28 +549,28 @@ typedef enum {
PREFS_SET_OBSOLETE /* preference used to exist but no longer does */
} prefs_set_pref_e;
-extern prefs_set_pref_e prefs_set_pref(char *prefarg);
+WS_DLL_PUBLIC prefs_set_pref_e prefs_set_pref(char *prefarg);
/*
* Get or set a preference's obsolete status. These can be used to make a
* preference obsolete after startup so that we can fetch its value but
* keep it from showing up in the prefrences dialog.
*/
-extern gboolean prefs_get_preference_obsolete(pref_t *pref);
-extern prefs_set_pref_e prefs_set_preference_obsolete(pref_t *pref);
+gboolean prefs_get_preference_obsolete(pref_t *pref);
+prefs_set_pref_e prefs_set_preference_obsolete(pref_t *pref);
/*
* Returns TRUE if the given device is hidden
*/
-extern gboolean prefs_is_capture_device_hidden(const char *name);
+WS_DLL_PUBLIC gboolean prefs_is_capture_device_hidden(const char *name);
/*
* Returns TRUE if the given device should capture in monitor mode by default
*/
-extern gboolean prefs_capture_device_monitor_mode(const char *name);
+WS_DLL_PUBLIC gboolean prefs_capture_device_monitor_mode(const char *name);
-extern gboolean prefs_capture_options_dialog_column_is_visible(const gchar *column);
+WS_DLL_PUBLIC gboolean prefs_capture_options_dialog_column_is_visible(const gchar *column);
#ifdef __cplusplus
}