mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
Don't compile some unused functions in gio/xdgmime/
This commit is contained in:
committed by
Emmanuel Fleury
parent
a1bfe899ab
commit
14e46ca288
@@ -489,6 +489,8 @@ xdg_mime_get_mime_type_for_data (const void *data,
|
||||
return _xdg_binary_or_text_fallback(data, len);
|
||||
}
|
||||
|
||||
#ifdef NOT_USED_IN_GIO
|
||||
|
||||
const char *
|
||||
xdg_mime_get_mime_type_for_file (const char *file_name,
|
||||
struct stat *statbuf)
|
||||
@@ -584,6 +586,8 @@ xdg_mime_get_mime_type_from_file_name (const char *file_name)
|
||||
return XDG_MIME_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int
|
||||
xdg_mime_get_mime_types_from_file_name (const char *file_name,
|
||||
const char *mime_types[],
|
||||
@@ -597,6 +601,8 @@ xdg_mime_get_mime_types_from_file_name (const char *file_name,
|
||||
return _xdg_glob_hash_lookup_file_name (global_hash, file_name, mime_types, n_mime_types);
|
||||
}
|
||||
|
||||
#ifdef NOT_USED_IN_GIO
|
||||
|
||||
int
|
||||
xdg_mime_is_valid_mime_type (const char *mime_type)
|
||||
{
|
||||
@@ -605,6 +611,8 @@ xdg_mime_is_valid_mime_type (const char *mime_type)
|
||||
return _xdg_utf8_validate (mime_type);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
xdg_mime_shutdown (void)
|
||||
{
|
||||
@@ -820,14 +828,19 @@ xdg_mime_mime_type_subclass (const char *mime,
|
||||
char **
|
||||
xdg_mime_list_mime_parents (const char *mime)
|
||||
{
|
||||
const char *umime;
|
||||
const char **parents;
|
||||
char **result;
|
||||
int i, n;
|
||||
|
||||
xdg_mime_init ();
|
||||
|
||||
if (_caches)
|
||||
return _xdg_mime_cache_list_mime_parents (mime);
|
||||
|
||||
parents = xdg_mime_get_mime_parents (mime);
|
||||
umime = _xdg_mime_unalias_mime_type (mime);
|
||||
|
||||
parents = _xdg_mime_parent_list_lookup (parent_list, umime);
|
||||
|
||||
if (!parents)
|
||||
return NULL;
|
||||
@@ -841,6 +854,8 @@ xdg_mime_list_mime_parents (const char *mime)
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef NOT_USED_IN_GIO
|
||||
|
||||
const char **
|
||||
xdg_mime_get_mime_parents (const char *mime)
|
||||
{
|
||||
@@ -870,6 +885,7 @@ xdg_mime_dump (void)
|
||||
_xdg_mime_cache_glob_dump ();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Registers a function to be called every time the mime database reloads its files
|
||||
*/
|
||||
@@ -897,6 +913,8 @@ xdg_mime_register_reload_callback (XdgMimeCallback callback,
|
||||
return callback_id - 1;
|
||||
}
|
||||
|
||||
#ifdef NOT_USED_IN_GIO
|
||||
|
||||
void
|
||||
xdg_mime_remove_callback (int callback_id)
|
||||
{
|
||||
@@ -922,6 +940,8 @@ xdg_mime_remove_callback (int callback_id)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
const char *
|
||||
xdg_mime_get_icon (const char *mime)
|
||||
{
|
||||
|
Reference in New Issue
Block a user