<br><br>hi ppl<br> i am trying to writea simple client application to connect to a dbus server..<br>the code is as below..<br>#include <stdio.h><br>#include <dbus/dbus-glib.h><br>#include <stdlib.h><br>
#define DBUS_SERVICE <br><br><br><br>int <br>main()<br>{<br> DBusGConnection *connection;<br> DBusGProxy *remote_object;<br> GMainLoop *mainloop;<br> gchar *path;<br> char *nameList1,*nameList2,*nameList3,*nameList4;
<br> GError *error = NULL;<br><br> g_type_init();<br> connection= dbus_g_bus_get (DBUS_BUS_SESSION, &error);<br> if (connection == NULL) {<br> printf("\nCould not connect..");<br> return 1;
<br> }<br> remote_object =dbus_g_proxy_new_for_name(connection,<br> "org.freedesktop.Notifications",<br> "/org/freedesktop/Notifications","org.freedesktop.Notifications
");<br><br> printf("\nGot proxy.."); <br> error = NULL;<br> if(!dbus_g_proxy_call(remote_object,"GetServerInformation",&error,G_TYPE_STRING,&nameList1,G_TYPE_STRING,&nameList2,G_TYPE_STRING,&nameList3,G_TYPE_STRING,&nameList4,G_TYPE_INVALID,G_TYPE_INVALID)){
<br> printf ("\nerror..%s\n",error->message);<br> return 1;<br> }<br><br>}<br> <br><br>when i run the program, i get an error..<br>arvind@ARVIND:~/mydev$ ./dbus-test mydev$ ./dbus-test<br>
<br>Got proxy..<br>error..No reply within specified time<br><br><br>how do i correct it?<br><br><br clear="all"><br>-- <br>Regards<br> ARviND AyyangaR<br><br> "Success is not measured by what a man accomplishes, but by the opposition he has encountered, and the courage with which he maintained the struggle against overwhelming odds."