[maemo-commits] [maemo-commits] r16041 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Sep 5 17:30:37 EEST 2008
- Previous message: [maemo-commits] r16040 - in projects/haf/branches/hildon-thumbnail/daemonize: . daemon
- Next message: [maemo-commits] r16042 - projects/haf/branches/hildon-thumbnail/daemonize
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: pvanhoof
Date: 2008-09-05 17:30:35 +0300 (Fri, 05 Sep 2008)
New Revision: 16041
Modified:
projects/haf/branches/hildon-thumbnail/daemonize/daemon/manager.c
projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugin-runner.c
Log:
Making it work
Modified: projects/haf/branches/hildon-thumbnail/daemonize/daemon/manager.c
===================================================================
--- projects/haf/branches/hildon-thumbnail/daemonize/daemon/manager.c 2008-09-05 14:12:06 UTC (rev 16040)
+++ projects/haf/branches/hildon-thumbnail/daemonize/daemon/manager.c 2008-09-05 14:30:35 UTC (rev 16041)
@@ -72,11 +72,21 @@
{
ManagerPrivate *priv = MANAGER_GET_PRIVATE (object);
DBusGProxy *mime_proxy;
+ gchar *path = g_strdup_printf ("/%s", name);
+ guint len = strlen (path);
+ guint i;
+ for (i = 0; i< len; i++) {
+ if (path[i] == '.')
+ path[i] = '/';
+ }
+
mime_proxy = dbus_g_proxy_new_for_name (priv->connection, name,
- THUMBNAILER_PATH,
- THUMBNAILER_INTERFACE);
+ path,
+ name);
+ g_free (path);
+
g_hash_table_replace (priv->handlers,
g_strdup (mime_type),
g_object_ref (mime_proxy));
@@ -411,7 +421,7 @@
"connection", connection,
NULL);
- manager_check (object);
+ manager_check (MANAGER (object));
dbus_g_object_type_install_info (G_OBJECT_TYPE (object),
&dbus_glib_manager_object_info);
Modified: projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugin-runner.c
===================================================================
--- projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugin-runner.c 2008-09-05 14:12:06 UTC (rev 16040)
+++ projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugin-runner.c 2008-09-05 14:30:35 UTC (rev 16041)
@@ -22,6 +22,7 @@
*
*/
+#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <dbus/dbus-glib-bindings.h>
@@ -250,6 +251,15 @@
{ NULL }
};
+DBusGObjectInfo custom_info = {
+ 0,
+ dbus_glib_plugin_runner_methods,
+ 1,
+"org.freedesktop.Thumbnailer\0Create\0A\0uris\0I\0as\0\0\0",
+"\0",
+"\0"
+};
+
int
main (int argc, char **argv)
{
@@ -262,6 +272,8 @@
GMainLoop *main_loop;
GObject *object;
GModule *module;
+ gchar str[4000];
+ guint len;
g_type_init ();
@@ -308,8 +320,15 @@
daemon_start (DAEMON (object), dynamic_register);
+ len = strlen (bus_name);
+ memcpy (str, bus_name, len);
+ memcpy (str+len, "\0Create\0A\0uris\0I\0as\0\0\0", 30);
+
+ custom_info.data = str;
+
+
dbus_g_object_type_install_info (G_OBJECT_TYPE (object),
- &dbus_glib_plugin_runner_object_info);
+ &custom_info);
dbus_g_connection_register_g_object (connection,
bus_path,
- Previous message: [maemo-commits] r16040 - in projects/haf/branches/hildon-thumbnail/daemonize: . daemon
- Next message: [maemo-commits] r16042 - projects/haf/branches/hildon-thumbnail/daemonize
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
