Luka Napotnik wrote:
Hello.
I have a D-BUS listener with a GObject method which should send a string
back to D-BUS. My d-bus listener method is:
gboolean
some_object_get_name(GObject *object, gchar *str, GError **error)
{
str = g_strdup("Hello");
return TRUE;
}
But when the client connect to this d-bus interface and calls the
get_name() method, the method doesn't return the string. I'm guessing
I'm passing the string the wrong way. Please help.
You probably want:
gboolean
some_object_get_name(GObject *object, gchar **str, GError **error)
{
*str = g_strdup("Hello");
return TRUE
}
and call that function this way:
gchar *str = NULL;
if (some_object_get_name(object, &str, &error) == TRUE)
gprintf("name: %s\n", str);
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list