Add _g_io_module_get_default(), use to simplify other *_get_default()s

Add _g_io_module_get_default(), which implements the
figure-out-the-best-available-module-that-is-actually-usable logic,
and use that to simplify g_proxy_resolver_get_default(),
g_settings_backend_get_default(), g_tls_backend_get_default(), and
g_vfs_get_default().

https://bugzilla.gnome.org/show_bug.cgi?id=620932
This commit is contained in:
Dan Winship
2011-06-21 18:21:27 -04:00
parent 38d21f6d8a
commit 1481b7bca3
6 changed files with 161 additions and 174 deletions

View File

@@ -30,6 +30,11 @@ G_BEGIN_DECLS
void _g_io_modules_ensure_extension_points_registered (void);
void _g_io_modules_ensure_loaded (void);
typedef gboolean (*GIOModuleVerifyFunc) (gpointer);
gpointer _g_io_module_get_default (const gchar *extension_point,
const gchar *envvar,
GIOModuleVerifyFunc verify_func);
G_END_DECLS
#endif /* __G_IO_MODULE_PRIV_H__ */