:)<br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Jonas</b> <<a href="mailto:sanoix@gmail.com">sanoix@gmail.com</a>><br>Date: Jul 24, 2006 1:39 PM<br>Subject: Re: [Telepathy] What am I doing wrong?
<br>To: Abner José <<a href="mailto:abnerf@gmail.com">abnerf@gmail.com</a>><br><br></span>Thank you very much. Now it works fine :-)<br><br>On 7/24/06, Abner José <<a href="mailto:abnerf@gmail.com">abnerf@gmail.com
</a>> wrote:<br>> Hi!<br>><br>> Well, I think you made a mistake when you create the proxy.<br>> The INTERFACE must be<br>> "org.freedesktop.Telepathy.ConnectionManager".<br>> You are using the bus_name as interface. I think that's the error.
<br>><br>> Good luck!<br>><br>> BR,<br>><br>> -Abner<br>><br>><br>> On 7/24/06, Jonas <<a href="mailto:sanoix@gmail.com">sanoix@gmail.com</a>> wrote:<br>> ><br>> I'm experimenting with D-Bus and Telepathy as I like the concept.. But
<br>> I find the documentation a lil confusing.. I have written a piece of<br>> code that refuses to work as it should, can someone help?<br>><br>> When I run it I get this message:<br>><br>> Error: Method "GetMandatoryParameters" with signature "s" on interface
<br>> "org.freedesktop.Telepathy.ConnectionManager.gabble"<br>> doesn't exist<br>><br>> Here's the code (please reply to my email as I'm not registered on the<br>> mailing list).<br>><br>> ---------------------------------------------------------
<br>> #define DBUS_API_SUBJECT_TO_CHANGE 1<br>><br>> #include <stdio.h><br>> #include <glib.h><br>> #include <dbus/dbus.h><br>> #include <dbus/dbus- glib.h><br>><br>> #define BUS_NAME
<br>> "org.freedesktop.Telepathy.ConnectionManager.gabble"<br>> #define OBJECT_PATH<br>> "/org/freedesktop/Telepathy/ConnectionManager/gabble"<br>><br>> int<br>> main (int argc, char **argv)
<br>> {<br>> DBusGConnection *connection;<br>> GError *error;<br>> DBusGProxy *proxy;<br>> GHashTable *parameters;<br>><br>> g_type_init ();<br>><br>> error = NULL;<br>> connection = dbus_g_bus_get (DBUS_BUS_SESSION,
<br>> &error);<br>> if (connection == NULL)<br>> {<br>> g_printerr ("Failed to open connection to bus: %s\n",<br>> error->message);
<br>> g_error_free (error);<br>> return 1;<br>> }<br>><br>> proxy = dbus_g_proxy_new_for_name (connection,<br>> BUS_NAME,<br>> OBJECT_PATH,
<br>> BUS_NAME);<br>><br>> error = NULL;<br>> if (!dbus_g_proxy_call (proxy, "GetMandatoryParameters", &error,<br>> G_TYPE_STRING, "jabber",
<br>> G_TYPE_INVALID,<br>><br>> DBUS_TYPE_G_STRING_STRING_HASHTABLE,<br>> &parameters, G_TYPE_INVALID))<br>> {<br>> /* Just do demonstrate remote exceptions versus regular GError */<br>> if (error->domain == DBUS_GERROR && error->code ==
<br>> DBUS_GERROR_REMOTE_EXCEPTION)<br>> g_printerr ("Caught remote method exception %s: %s",<br>> dbus_g_error_get_name (error),<br>> error->message);
<br>> else<br>> g_printerr ("Error: %s\n", error->message);<br>> g_error_free (error);<br>> return 1;<br>> }<br>><br>> /* Now we should have the results in 'parameters' */
<br>><br>> g_object_unref (proxy);<br>><br>> return 0;<br>> }<br>><br>> ---------------------------------------------------------<br>> _______________________________________________<br>> Telepathy mailing list
<br>> <a href="mailto:Telepathy@lists.freedesktop.org">Telepathy@lists.freedesktop.org</a><br>> <a href="http://lists.freedesktop.org/mailman/listinfo/telepathy">http://lists.freedesktop.org/mailman/listinfo/telepathy
</a><br>><br>><br>><br>> --<br>> current->uid = 0;<br>> >> Powered by Linux<br><br clear="all"><br>-- <br>current->uid = 0;<br>>> Powered by Linux