1.1 --- a/epoc32/include/stdapis/glib-2.0/gmodule.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/glib-2.0/gmodule.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,103 @@
1.4 -gmodule.h
1.5 +/* GMODULE - GLIB wrapper code for dynamic module loading
1.6 + * Copyright (C) 1998 Tim Janik
1.7 + * Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
1.8 + *
1.9 + * This library is free software; you can redistribute it and/or
1.10 + * modify it under the terms of the GNU Lesser General Public
1.11 + * License as published by the Free Software Foundation; either
1.12 + * version 2 of the License, or (at your option) any later version.
1.13 + *
1.14 + * This library is distributed in the hope that it will be useful,
1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.17 + * Lesser General Public License for more details.
1.18 + *
1.19 + * You should have received a copy of the GNU Lesser General Public
1.20 + * License along with this library; if not, write to the
1.21 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1.22 + * Boston, MA 02111-1307, USA.
1.23 + */
1.24 +
1.25 +/*
1.26 + * Modified by the GLib Team and others 1997-2000. See the AUTHORS
1.27 + * file for a list of people on the GLib Team. See the ChangeLog
1.28 + * files for a list of changes. These files are distributed with
1.29 + * GLib at ftp://ftp.gtk.org/pub/gtk/.
1.30 + */
1.31 +
1.32 +#ifndef __GMODULE_H__
1.33 +#define __GMODULE_H__
1.34 +
1.35 +#include <_ansi.h>
1.36 +#include <glib.h>
1.37 +
1.38 +G_BEGIN_DECLS
1.39 +
1.40 +/* exporting and importing functions, this is special cased
1.41 + * to feature Windows dll stubs.
1.42 + */
1.43 +#define G_MODULE_IMPORT extern
1.44 +#ifdef G_PLATFORM_WIN32
1.45 +# define G_MODULE_EXPORT __declspec(dllexport)
1.46 +#else /* !G_PLATFORM_WIN32 */
1.47 +# define G_MODULE_EXPORT
1.48 +#endif /* !G_PLATFORM_WIN32 */
1.49 +
1.50 +typedef enum
1.51 +{
1.52 + G_MODULE_BIND_LAZY = 1 << 0,
1.53 + G_MODULE_BIND_LOCAL = 1 << 1,
1.54 + G_MODULE_BIND_MASK = 0x03
1.55 +} GModuleFlags;
1.56 +
1.57 +typedef struct _GModule GModule;
1.58 +typedef const gchar* (*GModuleCheckInit) (GModule *module);
1.59 +typedef void (*GModuleUnload) (GModule *module);
1.60 +
1.61 +#ifdef G_OS_WIN32
1.62 +#define g_module_open g_module_open_utf8
1.63 +#define g_module_name g_module_name_utf8
1.64 +#endif
1.65 +
1.66 +/* return TRUE if dynamic module loading is supported */
1.67 +IMPORT_C gboolean g_module_supported (void) G_GNUC_CONST;
1.68 +
1.69 +/* open a module `file_name' and return handle, which is NULL on error */
1.70 +IMPORT_C GModule* g_module_open (const gchar *file_name,
1.71 + GModuleFlags flags);
1.72 +
1.73 +/* close a previously opened module, returns TRUE on success */
1.74 +IMPORT_C gboolean g_module_close (GModule *module);
1.75 +
1.76 +/* make a module resident so g_module_close on it will be ignored */
1.77 +IMPORT_C void g_module_make_resident (GModule *module);
1.78 +
1.79 +/* query the last module error as a string */
1.80 +IMPORT_C G_CONST_RETURN gchar* g_module_error (void);
1.81 +
1.82 +/* retrieve a symbol pointer from `module', returns TRUE on success */
1.83 +IMPORT_C gboolean g_module_symbol (GModule *module,
1.84 + const gchar *symbol_name,
1.85 + gpointer *symbol);
1.86 +
1.87 +/* retrieve the file name from an existing module */
1.88 +IMPORT_C G_CONST_RETURN gchar* g_module_name (GModule *module);
1.89 +
1.90 +/* Build the actual file name containing a module. `directory' is the
1.91 + * directory where the module file is supposed to be, or NULL or empty
1.92 + * in which case it should either be in the current directory or, on
1.93 + * some operating systems, in some standard place, for instance on the
1.94 + * PATH. Hence, to be absoultely sure to get the correct module,
1.95 + * always pass in a directory. The file name consists of the directory,
1.96 + * if supplied, and `module_name' suitably decorated accoring to
1.97 + * the operating system's conventions (for instance lib*.so or *.dll).
1.98 + *
1.99 + * No checks are made that the file exists, or is of correct type.
1.100 + */
1.101 +IMPORT_C gchar* g_module_build_path (const gchar *directory,
1.102 + const gchar *module_name);
1.103 +
1.104 +
1.105 +G_END_DECLS
1.106 +
1.107 +#endif /* __GMODULE_H__ */