From 23dfcf4ff925f61bcb2c3bdd712ff0f70bde4fcb Mon Sep 17 00:00:00 2001 From: laforge Date: Tue, 24 Oct 2006 13:07:08 +0000 Subject: - clean up header files (all in include/gmsd now) - finish vendor plugin support - add call progress indicator and signal quality unsolicited support to vendor_ti.c git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@120 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/util/event.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/util/event.c') diff --git a/src/util/event.c b/src/util/event.c index 0f09d47..bff895d 100644 --- a/src/util/event.c +++ b/src/util/event.c @@ -6,14 +6,14 @@ static int incall_handler(struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux) { - printf("EVENT: Incoming call type=%u!\n", aux->u.call.type); + printf("EVENT: Incoming call type = %u\n", aux->u.call.type); return 0; } static int clip_handler(struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux) { - printf("EVENT: Incoming call clip=`%s'\n", aux->u.clip.addr.number); + printf("EVENT: Incoming call clip = %s\n", aux->u.clip.addr.number); return 0; } @@ -41,15 +41,21 @@ static int netreg_handler(struct lgsm_handle *lh, int evt, struct gsmd_evt_auxda } if (aux->u.netreg.lac) - printf("LocationAreaCode=0x%04X ", aux->u.netreg.lac); + printf("LocationAreaCode = 0x%04X ", aux->u.netreg.lac); if (aux->u.netreg.ci) - printf("CellID=0x%04X ", aux->u.netreg.ci); + printf("CellID = 0x%04X ", aux->u.netreg.ci); printf("\n"); return 0; } +static int sigq_handler(struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux) +{ + printf("EVENT: Signal Quality: %u\n", aux->u.signal.sigq.rssi); + return 0; +} + int event_init(struct lgsm_handle *lh) { int rc; @@ -57,6 +63,7 @@ int event_init(struct lgsm_handle *lh) rc = lgsm_evt_handler_register(lh, GSMD_EVT_IN_CALL, &incall_handler); rc |= lgsm_evt_handler_register(lh, GSMD_EVT_IN_CLIP, &clip_handler); rc |= lgsm_evt_handler_register(lh, GSMD_EVT_NETREG, &netreg_handler); + rc |= lgsm_evt_handler_register(lh, GSMD_EVT_SIGNAL, &sigq_handler); return rc; } -- cgit v1.2.3