[maemo-developers] [maemo-developers] Help on how to attach a non gtk+/hildon app to D-Bus

From: Fabio Forno fabio.forno at gmail.com
Date: Thu Jan 11 22:18:30 EET 2007
> No, Libosso does not use Gtk+. It uses D-Bus and Glib. Receiving signals
> with the current Libosso API requires using the D-Bus API, though. You
> could do it by getting the DBusConnection from Libosso and installing a
> D-Bus filter function for the system bus to catch all the signals
> broadcast there.

Yep, a very quick starting example using the glib loop:

gboolean connect_ap(gpointer data) {
    osso_rpc_t retval;
    osso_context_t *osso_context = (osso_context_t *) data;

            "connect", &retval,
            DBUS_TYPE_STRING, "rfid",
            DBUS_TYPE_UINT32, 0,
            DBUS_TYPE_UINT32, 0
    printf("result: %d\n", retval.type);
    return FALSE;

int main(int argc, char * argv[]) {
    GMainLoop *loop;
    osso_context_t *osso_context;

    osso_context = osso_initialize(
        "test", "0.0.1", TRUE, NULL

    g_type_init ();

    loop = g_main_loop_new (NULL, FALSE);

    g_timeout_add(0, &connect_ap, osso_context);


    return 0;

Fabio Forno, PhD
Istituto Superiore Mario Boella
Jabber ID: xmpp:ff at kamin.polito.it
** Try Jabber http://www.jabber.org

More information about the maemo-developers mailing list