summaryrefslogtreecommitdiff
path: root/epan/filesystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'epan/filesystem.h')
-rw-r--r--epan/filesystem.h76
1 files changed, 39 insertions, 37 deletions
diff --git a/epan/filesystem.h b/epan/filesystem.h
index 2ba5e1dacb..a972712af4 100644
--- a/epan/filesystem.h
+++ b/epan/filesystem.h
@@ -25,6 +25,8 @@
#ifndef FILESYSTEM_H
#define FILESYSTEM_H
+#include "ws_symbol_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -40,38 +42,38 @@ extern "C" {
* and save it for future use. Returns NULL on success, and a
* g_mallocated string containing an error on failure.
*/
-extern char *init_progfile_dir(const char *arg0, int (*main)(int, char **));
+WS_DLL_PUBLIC char *init_progfile_dir(const char *arg0, int (*main)(int, char **));
/*
* Get the directory in which the program resides.
*/
-extern const char *get_progfile_dir(void);
+WS_DLL_PUBLIC const char *get_progfile_dir(void);
/*
* Get the directory in which plugins are stored; this must not be called
* before init_progfile_dir() is called, as they might be stored in a
* subdirectory of the program file directory.
*/
-extern const char *get_plugin_dir(void);
+WS_DLL_PUBLIC const char *get_plugin_dir(void);
/*
* Get the directory in which python plugins are stored; this must not be
* called before init_progfile_dir() is called, as they might be stored in a
* subdirectory of the program file directory.
*/
-extern const char *get_wspython_dir(void);
+WS_DLL_PUBLIC const char *get_wspython_dir(void);
/*
* Get the flag indicating whether we're running from a build
* directory.
*/
-extern gboolean running_in_build_directory(void);
+WS_DLL_PUBLIC gboolean running_in_build_directory(void);
/*
* Get the directory in which global configuration files are
* stored.
*/
-extern const char *get_datafile_dir(void);
+WS_DLL_PUBLIC const char *get_datafile_dir(void);
/*
* Construct the path name of a global configuration file, given the
@@ -80,12 +82,12 @@ extern const char *get_datafile_dir(void);
* The returned file name was g_malloc()'d so it must be g_free()d when the
* caller is done with it.
*/
-extern char *get_datafile_path(const char *filename);
+WS_DLL_PUBLIC char *get_datafile_path(const char *filename);
/*
* Get the personal plugin dir.
*/
-extern char *get_plugins_pers_dir(void);
+WS_DLL_PUBLIC char *get_plugins_pers_dir(void);
/*
* Get the directory in which files that, at least on UNIX, are
@@ -93,51 +95,51 @@ extern char *get_plugins_pers_dir(void);
* there's no "/etc" directory, so we get them from the Wireshark
* global configuration and data file directory.
*/
-extern const char *get_systemfile_dir(void);
+WS_DLL_PUBLIC const char *get_systemfile_dir(void);
/*
* Set the configuration profile name to be used for storing
* personal configuration files.
*/
-extern void set_profile_name(const gchar *profilename);
+WS_DLL_PUBLIC void set_profile_name(const gchar *profilename);
/*
* Get the current configuration profile name used for storing
* personal configuration files.
*/
-extern const char *get_profile_name(void);
+WS_DLL_PUBLIC const char *get_profile_name(void);
/*
* Check if current profile is default profile.
*/
-extern gboolean is_default_profile(void);
+WS_DLL_PUBLIC gboolean is_default_profile(void);
/*
* Check if we have global profiles.
*/
-extern gboolean has_global_profiles(void);
+WS_DLL_PUBLIC gboolean has_global_profiles(void);
/*
* Get the directory used to store configuration profile directories.
*/
-extern const char *get_profiles_dir(void);
+WS_DLL_PUBLIC const char *get_profiles_dir(void);
/*
* Get the directory used to store global configuration profile directories.
*/
-extern const char *get_global_profiles_dir(void);
+WS_DLL_PUBLIC const char *get_global_profiles_dir(void);
/*
* Store filenames used for personal config files so we know which
* files to copy when duplicate a configuration profile.
*/
-extern void profile_store_persconffiles(gboolean store);
+WS_DLL_PUBLIC void profile_store_persconffiles(gboolean store);
/*
* Check if given configuration profile exists.
*/
-extern gboolean profile_exists(const gchar *profilename, gboolean global);
+WS_DLL_PUBLIC gboolean profile_exists(const gchar *profilename, gboolean global);
/*
* Create a directory for the given configuration profile.
@@ -146,7 +148,7 @@ extern gboolean profile_exists(const gchar *profilename, gboolean global);
* to create (it's g_mallocated, so our caller should free it); otherwise,
* return 0.
*/
-extern int create_persconffile_profile(const char *profilename,
+WS_DLL_PUBLIC int create_persconffile_profile(const char *profilename,
char **pf_dir_path_return);
/*
@@ -156,20 +158,20 @@ extern int create_persconffile_profile(const char *profilename,
* to delete (it's g_mallocated, so our caller should free it); otherwise,
* return 0.
*/
-extern int delete_persconffile_profile(const char *profilename,
+WS_DLL_PUBLIC int delete_persconffile_profile(const char *profilename,
char **pf_dir_path_return);
/*
* Rename the directory for the given confinguration profile.
*/
-extern int rename_persconffile_profile(const char *fromname, const char *toname,
+WS_DLL_PUBLIC int rename_persconffile_profile(const char *fromname, const char *toname,
char **pf_from_dir_path_return,
char **pf_to_dir_path_return);
/*
* Copy files in one profile to the other.
*/
-extern int copy_persconffile_profile(const char *toname, const char *fromname,
+WS_DLL_PUBLIC int copy_persconffile_profile(const char *toname, const char *fromname,
gboolean from_global,
char **pf_filename_return,
char **pf_to_dir_path_return,
@@ -182,7 +184,7 @@ extern int copy_persconffile_profile(const char *toname, const char *fromname,
* to create (it's g_mallocated, so our caller should free it); otherwise,
* return 0.
*/
-extern int create_persconffile_dir(char **pf_dir_path_return);
+WS_DLL_PUBLIC int create_persconffile_dir(char **pf_dir_path_return);
/*
* Construct the path name of a personal configuration file, given the
@@ -198,7 +200,7 @@ extern int create_persconffile_dir(char **pf_dir_path_return);
* The returned file name was g_malloc()'d so it must be g_free()d when the
* caller is done with it.
*/
-extern char *get_persconffile_path(const char *filename, gboolean from_profile,
+WS_DLL_PUBLIC char *get_persconffile_path(const char *filename, gboolean from_profile,
gboolean for_writing);
/*
@@ -207,7 +209,7 @@ extern char *get_persconffile_path(const char *filename, gboolean from_profile,
* On Win32, this is the "My Documents" folder in the personal profile.
* On UNIX this is simply the current directory.
*/
-extern const char *get_persdatafile_dir(void);
+WS_DLL_PUBLIC const char *get_persdatafile_dir(void);
/*
* Construct the path name of a file in $TMP/%TEMP% directory.
@@ -215,43 +217,43 @@ extern const char *get_persdatafile_dir(void);
*
* Return value is g_malloced so the caller should g_free it.
*/
-extern char *get_tempfile_path(const char *filename);
+WS_DLL_PUBLIC char *get_tempfile_path(const char *filename);
/*
* process command line option belonging to the filesystem settings
*/
-extern int filesystem_opt(int opt, const char *optstr);
+WS_DLL_PUBLIC int filesystem_opt(int opt, const char *optstr);
/*
* Return an error message for UNIX-style errno indications on open or
* create operations.
*/
-extern const char *file_open_error_message(int err, gboolean for_writing);
+WS_DLL_PUBLIC const char *file_open_error_message(int err, gboolean for_writing);
/*
* Return an error message for UNIX-style errno indications on write
* operations.
*/
-extern const char *file_write_error_message(int err);
+WS_DLL_PUBLIC const char *file_write_error_message(int err);
/*
* Given a pathname, return the last component.
*/
-extern const char *get_basename(const char *);
+WS_DLL_PUBLIC const char *get_basename(const char *);
/*
* Given a pathname, return a pointer to the last pathname separator
* character in the pathname, or NULL if the pathname contains no
* separators.
*/
-extern char *find_last_pathname_separator(const char *path);
+WS_DLL_PUBLIC char *find_last_pathname_separator(const char *path);
/*
* Given a pathname, return a string containing everything but the
* last component. NOTE: this overwrites the pathname handed into
* it....
*/
-extern char *get_dirname(char *);
+WS_DLL_PUBLIC char *get_dirname(char *);
/*
* Given a pathname, return:
@@ -264,7 +266,7 @@ extern char *get_dirname(char *);
* 0, if the attempt succeeded and the file turned out not
* to be a directory.
*/
-extern int test_for_directory(const char *);
+WS_DLL_PUBLIC int test_for_directory(const char *);
/*
* Given a pathname, return:
@@ -277,20 +279,20 @@ extern int test_for_directory(const char *);
* 0, if the attempt succeeded and the file turned out not
* to be a FIFO.
*/
-extern int test_for_fifo(const char *);
+WS_DLL_PUBLIC int test_for_fifo(const char *);
/* Delete a file */
-extern gboolean deletefile (const char *path);
+WS_DLL_PUBLIC gboolean deletefile (const char *path);
/*
* Check, if file is existing.
*/
-extern gboolean file_exists(const char *fname);
+WS_DLL_PUBLIC gboolean file_exists(const char *fname);
/*
* Check if two filenames are identical (with absolute and relative paths).
*/
-extern gboolean files_identical(const char *fname1, const char *fname2);
+WS_DLL_PUBLIC gboolean files_identical(const char *fname1, const char *fname2);
/*
* Copy a file in binary mode, for those operating systems that care about
@@ -301,7 +303,7 @@ extern gboolean files_identical(const char *fname1, const char *fname2);
* Returns TRUE on success, FALSE on failure. If a failure, it also
* displays a simple dialog window with the error message.
*/
-extern gboolean copy_file_binary_mode(const char *from_filename,
+WS_DLL_PUBLIC gboolean copy_file_binary_mode(const char *from_filename,
const char *to_filename);
#ifdef __cplusplus