[maemo-users] [maemo-users] Using osso_iap_cb example

From: Pinghang.Koon at tietoenator.com Pinghang.Koon at tietoenator.com
Date: Tue Jul 25 11:11:43 EEST 2006
If you don't run into gtk_main() or some event handling loop, you won't be able to process events (callbacks), isn't it?

Yours faithfully,

Alvis Koon

From: maemo-users-bounces at maemo.org [mailto:maemo-users-bounces at maemo.org] On Behalf Of Brad Burleson
Sent: Tuesday, July 25, 2006 2:24 PM
To: maemo-users at maemo.org
Subject: [maemo-users] Using osso_iap_cb example

I'm trying to capture the events generated when the 770 goes on and off-line, and I've written a simple test program just to mess around.  The callback gets registered, but I never see any output from the callback.  I suspect it's something simple. 
Anyone got any ideas?
 * Simple test program to report changes in net work states
#include <unistd.h>
#include <osso-ic.h>
#include <hildon-widgets/hildon-program.h>
#include <gtk/gtk.h>
#include <libosso.h>
static void iap_callback(struct iap_event_t *event, void *arg)
        printf("something happened!!!\n");
int main(int argc, char *argv[]) {
        /* Attempt to register callback */
        if (osso_iap_cb(iap_callback) != OSSO_OK) {
                printf("osso_iap_cb failed.\n");
                printf("callback registered dude!\n");

More information about the maemo-users mailing list