From 434eb43979d170509b9b28c0598e5f44e31aa348 Mon Sep 17 00:00:00 2001 From: daniel_tomas Date: Thu, 6 Jan 2011 18:47:23 -0800 Subject: Event field ON/OFF management added in the libnfc Change-Id: Ieafb6ab9094d9dc4b7edfb1e3676fd9794d8af28 --- src/phLibNfc.h | 6 ++++-- src/phLibNfc_SE.c | 36 ++++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/phLibNfc.h b/src/phLibNfc.h index 0ef7522..c09815a 100644 --- a/src/phLibNfc.h +++ b/src/phLibNfc.h @@ -168,9 +168,11 @@ typedef enum element*/ phLibNfc_eSE_EvtTypeTransaction=0x02, /**sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, @@ -223,17 +223,37 @@ STATIC void phLibNfc_SeNotification(void *context, &Se_Trans_Info, status); break; - } - case NFC_EVT_START_OF_TRANSACTION: // PLG ++ - - (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + } + case NFC_EVT_START_OF_TRANSACTION: + { + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, phLibNfc_eSE_EvtTypeTransaction, pSeInfo->hSecureElement, &Se_Trans_Info, status); - - break; // PLG -- + break; + } + case NFC_EVT_FIELD_ON: + { + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, + phLibNfc_eSE_EvtFieldOn, + pSeInfo->hSecureElement, + &Se_Trans_Info, + status); + break; + } + case NFC_EVT_FIELD_OFF: + { + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, + phLibNfc_eSE_EvtFieldOff, + pSeInfo->hSecureElement, + &Se_Trans_Info, + status); + break; + } default: { break; -- cgit v1.1