[maemo-commits] [maemo-commits] r16525 - in projects/haf/trunk/hildon-thumbnail: . daemon
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Oct 29 13:28:36 EET 2008
- Previous message: [maemo-commits] r16524 - in projects/haf/trunk/hildon-thumbnail: . daemon
- Next message: [maemo-commits] r16526 - projects/haf/trunk/hildon-thumbnail/daemon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: pvanhoof Date: 2008-10-29 13:28:33 +0200 (Wed, 29 Oct 2008) New Revision: 16525 Modified: projects/haf/trunk/hildon-thumbnail/ChangeLog projects/haf/trunk/hildon-thumbnail/daemon/manager.xml projects/haf/trunk/hildon-thumbnail/daemon/plugin-runner.c projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.c projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.h Log: 2008-10-29 Philip Van Hoof <philip at codeminded.be> * daemon/thumbnail-manager.h * daemon/plugin-runner.c * daemon/manager.xml * daemon/thumbnail-manager.c: Adding groupng per URI scheme to the plugin-runner Modified: projects/haf/trunk/hildon-thumbnail/ChangeLog =================================================================== --- projects/haf/trunk/hildon-thumbnail/ChangeLog 2008-10-29 10:01:17 UTC (rev 16524) +++ projects/haf/trunk/hildon-thumbnail/ChangeLog 2008-10-29 11:28:33 UTC (rev 16525) @@ -1,5 +1,13 @@ 2008-10-29 Philip Van Hoof <philip at codeminded.be> + * daemon/thumbnail-manager.h + * daemon/plugin-runner.c + * daemon/manager.xml + * daemon/thumbnail-manager.c: Adding groupng per URI scheme to the + plugin-runner + +2008-10-29 Philip Van Hoof <philip at codeminded.be> + * daemon/thumbnail-manager.c: Refactoring for grouping per URI scheme. Same as yesterday but now for 3th party external specialized plugins. Modified: projects/haf/trunk/hildon-thumbnail/daemon/manager.xml =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/manager.xml 2008-10-29 10:01:17 UTC (rev 16524) +++ projects/haf/trunk/hildon-thumbnail/daemon/manager.xml 2008-10-29 11:28:33 UTC (rev 16525) @@ -3,6 +3,7 @@ <interface name="org.freedesktop.thumbnailer.Manager"> <method name="Register"> <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> + <arg type="s" name="uri_scheme" direction="in" /> <arg type="s" name="mime_type" direction="in" /> </method> <method name="GetSupported"> Modified: projects/haf/trunk/hildon-thumbnail/daemon/plugin-runner.c =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/plugin-runner.c 2008-10-29 10:01:17 UTC (rev 16524) +++ projects/haf/trunk/hildon-thumbnail/daemon/plugin-runner.c 2008-10-29 11:28:33 UTC (rev 16525) @@ -218,18 +218,23 @@ daemon_register_func (gpointer self, const gchar *mime_type, GModule *module, const GStrv uri_schemes, gint priority) { GError *nerror = NULL; + guint i = 0; - // TODO: we are neglecting uri_schemes and priority here + while (uri_schemes[i] != NULL) { - dbus_g_proxy_call (self, "Register", - &nerror, G_TYPE_STRING, - mime_type, - G_TYPE_INVALID, - G_TYPE_INVALID); + dbus_g_proxy_call (self, "Register", + &nerror, + G_TYPE_STRING, uri_schemes[i], + G_TYPE_STRING, mime_type, + G_TYPE_INVALID, + G_TYPE_INVALID); - if (nerror) { - g_critical ("Failed to init: %s\n", nerror->message); - g_error_free (nerror); + if (nerror) { + g_critical ("Failed to init: %s\n", nerror->message); + g_error_free (nerror); + } + + i++; } } Modified: projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.c =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.c 2008-10-29 10:01:17 UTC (rev 16524) +++ projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.c 2008-10-29 11:28:33 UTC (rev 16525) @@ -432,14 +432,18 @@ * Consult thumbnail_manager.xml for more information about this custom spec addition. */ void -thumbnail_manager_register (ThumbnailManager *object, gchar *mime_type, DBusGMethodInvocation *context) +thumbnail_manager_register (ThumbnailManager *object, gchar *uri_scheme, gchar *mime_type, DBusGMethodInvocation *context) { ThumbnailManagerPrivate *priv = THUMBNAIL_MANAGER_GET_PRIVATE (object); DBusGProxy *mime_proxy; gchar *sender; + gchar *query; dbus_async_return_if_fail (mime_type != NULL, context); + dbus_async_return_if_fail (uri_scheme != NULL, context); + query = g_strdup_printf ("%s-%s", uri_scheme, mime_type); + keep_alive (); g_mutex_lock (priv->mutex); @@ -449,8 +453,9 @@ sender = dbus_g_method_get_sender (context); - thumbnail_manager_add (object, mime_type, sender); + thumbnail_manager_add (object, query, sender); + g_free (query); g_free (sender); /* This is not necessary for activatable ones */ Modified: projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.h =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.h 2008-10-29 10:01:17 UTC (rev 16524) +++ projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.h 2008-10-29 11:28:33 UTC (rev 16525) @@ -50,7 +50,7 @@ #define manager_register thumbnail_manager_register #define manager_get_supported thumbnail_manager_get_supported -void thumbnail_manager_register (ThumbnailManager *object, gchar *mime_type, DBusGMethodInvocation *context); +void thumbnail_manager_register (ThumbnailManager *object, gchar *uri_scheme, gchar *mime_type, DBusGMethodInvocation *context); void thumbnail_manager_get_supported (ThumbnailManager *object, DBusGMethodInvocation *context); void thumbnail_manager_i_have (ThumbnailManager *object, const gchar *mime_type);
- Previous message: [maemo-commits] r16524 - in projects/haf/trunk/hildon-thumbnail: . daemon
- Next message: [maemo-commits] r16526 - projects/haf/trunk/hildon-thumbnail/daemon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]