dbus_g_proxy_call
pete-c
pcwhizzkid at hotmail.com
Wed May 6 08:17:49 PDT 2009
Hi,
I am trying to create a simple test server and client on dbus, but am having
trouble accessing the methods. I have created my test gobject (which goes by
the inventive name of PeterTest), and have successfully tested the methods
on it (separate from dbus), so I don't think the problem is there.
The object PeterTest contains a name and an age. I declare a method in the
header file:
extern gchar *peter_test_get_name(PeterTest *self);
...
extern gchar
*peter_test_get_name(PeterTest *self)
{
return self->name;
}
Then I can't work out what string to pass in the proxy call. I've tried:
dbus_g_proxy_call(proxy, "GetName", &error, G_TYPE_INVALID, G_TYPE_STRV,
&name, G_TYPE_INVALID)
and
dbus_g_proxy_call(proxy, "peter_test_get_name" ....)
I've looked through various files of example code, which seem to have method
declarations in the format:
object_my_method(...)
and then proxy calls in the format:
dbus_g_proxy_call(proxy, "MyMethod" ...)
but I fail to see how they are linked together.
I've looked at implementing introspection data, but I've come up with
several errors, and to my understanding, its not essential in getting my
application to work (I hope I'm not wrong).
I've provided my full code below - any help would be greatly appreciated!
http://www.nabble.com/file/p23408901/client.c client.c
http://www.nabble.com/file/p23408901/server.c server.c
http://www.nabble.com/file/p23408901/peter-test.h peter-test.h
--
View this message in context: http://www.nabble.com/dbus_g_proxy_call-tp23408901p23408901.html
Sent from the Free Desktop - dbus mailing list archive at Nabble.com.
More information about the dbus
mailing list