DBUS - Pidgin presence

Etan Reisner deryni at pidgin.im
Tue Jun 7 14:40:57 EDT 2011


On Mon, Jun 06, 2011 at 12:42:10PM +0200, Krzysztof wrote:
>   { Initializes the errors }
>   dbus_error_init(@FDBErr);
>
>   { Connection }
>   FDBConn := dbus_bus_get(DBUS_BUS_SESSION, @FDBErr);
>
>   { Request the name of the bus }
>   ret := dbus_bus_request_name(FDBConn, 'im.pidgin.purple.PurpleInterface',
> DBUS_NAME_FLAG_REPLACE_EXISTING, @FDBErr);
>
> It works but only if I connect when pidgin is running. If my plugin connect
> first (I don't get any errors) and then run Pidgin, then I don't get any
> signals (receiving and sending chat message).
> How can I check if pidgin is running or connect with correct flags?

request_name isn't the right thing for you to be using there. You want to
connect to signals/etc. on that name not claim to own it yourself. I'm
surprised this works at all actually.

This is likely why you don't get an error since claiming a name that isn't
taken isn't an error causing scenario.

    -Etan




More information about the Support mailing list