summaryrefslogtreecommitdiff
path: root/tumbler/tumbler-thumbnailer.h
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis@xfce.org>2009-05-19 01:15:44 +0200
committerJannis Pohlmann <jannis@xfce.org>2009-05-19 01:15:44 +0200
commitc22081e3281b587fbeb920030705ed4ef58e960b (patch)
tree07edebfa644ed87af53f2e65ecdbccf0e0f294e4 /tumbler/tumbler-thumbnailer.h
parenta66781a82678305cee2566f72cb0ea2c34667871 (diff)
downloadtumbler-c22081e3281b587fbeb920030705ed4ef58e960b.tar.gz
Implement thumbnailer management in TumblerRegistry.
Use a (gchar *) to (GList **) hash table for managing thumbnailers in TumblerRegistry. For each so-called hash key (a combination of an URI scheme and a MIME type, e.g. "file-image/png") we store a list of registered thumbnailers. Only the first thumbnailer in this list will ever be used. The others can move forward in the list when a thumbnailer is unregistered. The order in which thumbnailers are inserted into a list is defined as follows: - thumbnailers registered dynamically over D-Bus go before anything else. The thumbnailer registered latest goes first. - specialized thumbnailers with most recent service files go first. - built-in thumbnailers are always at the end of the list in the order they were added to the registry. Connect to the new "unregister" signal of all TumblerThumbnailers to remove them when required. The signal is only emitted by TumblerSpecializedThumbnailers when their proxy is destroyed. TumblerSpecializedThumbnailer has two new properties: "foreign" and "modified". Foreign thumbnailers are those registered dynamically over D-Bus (using org.freedesktop.thumbnailer.Manager.Register()). The "modified" property represents the timestamp of when the thumbnailer's .service file was last modified. It is 0 for foreign thumbnailers.
Diffstat (limited to 'tumbler/tumbler-thumbnailer.h')
-rw-r--r--tumbler/tumbler-thumbnailer.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/tumbler/tumbler-thumbnailer.h b/tumbler/tumbler-thumbnailer.h
index c5eec08..1033391 100644
--- a/tumbler/tumbler-thumbnailer.h
+++ b/tumbler/tumbler-thumbnailer.h
@@ -38,12 +38,13 @@ struct _TumblerThumbnailerIface
GTypeInterface __parent__;
/* signals */
- void (*ready) (TumblerThumbnailer *thumbnailer,
- const gchar *uri);
- void (*error) (TumblerThumbnailer *thumbnailer,
- const gchar *failed_uri,
- gint error_code,
- const gchar *message);
+ void (*ready) (TumblerThumbnailer *thumbnailer,
+ const gchar *uri);
+ void (*error) (TumblerThumbnailer *thumbnailer,
+ const gchar *failed_uri,
+ gint error_code,
+ const gchar *message);
+ void (*unregister) (TumblerThumbnailer *thumbnailer);
/* virtual methods */
void (*create) (TumblerThumbnailer *thumbnailer,