diff options
author | Jannis Pohlmann <jannis@xfce.org> | 2009-10-21 17:57:20 +0200 |
---|---|---|
committer | Jannis Pohlmann <jannis@xfce.org> | 2009-11-16 14:53:18 +0100 |
commit | 47b8b19d478b6f0846454aeecb25fc67c7113a20 (patch) | |
tree | 83c038703ba1a6674d443e9deea2d08876e1b87c /tumblerd/tumbler-registry.h | |
parent | a13a6b37a203cf03937d714a5faa40879d9a696c (diff) | |
download | tumbler-47b8b19d478b6f0846454aeecb25fc67c7113a20.tar.gz |
Support specialized thumbnailers and overrides files properly.
This required some major changes, most of which are documented in the
source code. It still needs to be tested but it should be fine. The
mutex locks in TumblerManager could probably be optimized and some other
parts are not optimal with regards to speed and memory usage yet.
All in all, what's done now is:
- overrides files are parsed into override info structs and kept in
a (hashkey -> override info list) hash table
- each of these override info lists is sorted in the order of the
directories the overrides files are located in (with higher priority
directories coming first)
- the first override info in each list determines which specialized
thumbnailer is set as preferred for the corresponding hash key in
the registry
- thumbnailer service files are parsed into thumbnailer info structs
and kept in a (basename -> thumbnailer info list) hash table
- each of these thumbnailer info lists is sorted in the order of
the directories the thumbnailer service infos come from
- the first thumbnailers in each list are added to the registry
- whenever something changes on the disk, this internal representation
is updated
Diffstat (limited to 'tumblerd/tumbler-registry.h')
-rw-r--r-- | tumblerd/tumbler-registry.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tumblerd/tumbler-registry.h b/tumblerd/tumbler-registry.h index dcd3ad3..c58a0e0 100644 --- a/tumblerd/tumbler-registry.h +++ b/tumblerd/tumbler-registry.h @@ -42,6 +42,8 @@ gboolean tumbler_registry_load (TumblerRegistry GError **error); void tumbler_registry_add (TumblerRegistry *registry, TumblerThumbnailer *thumbnailer); +void tumbler_registry_remove (TumblerRegistry *registry, + TumblerThumbnailer *thumbnailer); GList *tumbler_registry_get_thumbnailers (TumblerRegistry *registry) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; TumblerThumbnailer **tumbler_registry_get_thumbnailer_array (TumblerRegistry *registry, TumblerFileInfo **infos, @@ -50,6 +52,11 @@ void tumbler_registry_update_supported (TumblerRegistry void tumbler_registry_get_supported (TumblerRegistry *registry, const gchar *const **uri_schemes, const gchar *const **mime_types); +TumblerThumbnailer *tumbler_registry_get_preferred (TumblerRegistry *registry, + const gchar *hash_key) G_GNUC_WARN_UNUSED_RESULT; +void tumbler_registry_set_preferred (TumblerRegistry *registry, + const gchar *hash_key, + TumblerThumbnailer *thumbnailer); G_END_DECLS |