[maemo-developers] [maemo-developers] Help on how to attach a non gtk+/hildon app to D-Bus
From: Fabio Forno fabio.forno at gmail.comDate: Thu Jan 11 22:18:30 EET 2007
- Previous message: [maemo-developers] Help on how to attach a non gtk+/hildon app to D-Bus
- Next message: [maemo-developers] Help on how to attach a non gtk+/hildon app to D-Bus
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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; printf("_connecting\n"); osso_rpc_run_system( osso_context, ICD_SERVICE, ICD_OBJECT, ICD_IFACE, "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); g_main_loop_run(loop); return 0; } -- Fabio Forno, PhD Istituto Superiore Mario Boella Jabber ID: xmpp:ff at kamin.polito.it ** Try Jabber http://www.jabber.org
- Previous message: [maemo-developers] Help on how to attach a non gtk+/hildon app to D-Bus
- Next message: [maemo-developers] Help on how to attach a non gtk+/hildon app to D-Bus
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]