[Telepathy] What am I doing wrong?

Abner José abnerf at gmail.com
Mon Jul 24 09:45:29 PDT 2006


:)
---------- Forwarded message ----------
From: Jonas <sanoix at gmail.com>
Date: Jul 24, 2006 1:39 PM
Subject: Re: [Telepathy] What am I doing wrong?
To: Abner José <abnerf at gmail.com>

Thank you very much. Now it works fine :-)

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


-- 
current->uid = 0;
>> Powered by Linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/telepathy/attachments/20060724/60e6f05c/attachment.html


More information about the Telepathy mailing list