Home | History | Annotate | Download | only in src
      1 /*
      2  * Copyright (C) 2010 NXP Semiconductors
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 /*!
     18 *\file  phLibNfc_1.1.h
     19 *\brief Contains FRI1.1 API details.
     20 *Project:   NFC-FRI 1.1
     21 * $Workfile:: phLibNfc_1.1.h  $
     22 * $Modtime::          $
     23 * $Author: ing07385 $
     24 * $Revision: 1.80 $
     25 * $Aliases: NFC_FRI1.1_WK1014_SDK,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1019_SDK,NFC_FRI1.1_WK1024_SDK $
     26 *\defgroup grp_lib_nfc LIBNFC Component
     27 */
     28 /* \page LibNfc_release_label FRI1.1 API Release Label
     29 * $Aliases: NFC_FRI1.1_WK1014_SDK,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1019_SDK,NFC_FRI1.1_WK1024_SDK $
     30 *\note This is the TAG (label, alias) of the FRI1.1.
     31 *If the string is empty, the current documentation
     32 * has not been generated for official release.
     33 */
     34 #ifndef PHLIBNFC_H
     35 #define PHLIBNFC_H
     36 #include <phNfcTypes.h>
     37 #include <phLibNfcStatus.h>
     38 #include <phFriNfc_NdefRecord.h>
     39 #include <phNfcLlcpTypes.h>
     40 #include <phNfcConfig.h>
     41 #ifdef ANDROID
     42 #include <string.h>
     43 #endif
     44 
     45 /*!
     46 *\def PHLIBNFC_MAXNO_OF_SE
     47 *Defines maximum no of secured elements supported by PN544.
     48 */
     49 #define LIBNFC_READONLY_NDEF
     50 #define PHLIBNFC_MAXNO_OF_SE        (0x02)
     51 
     52 typedef uint32_t    phLibNfc_Handle;
     53 
     54 extern const unsigned char *nxp_nfc_full_version;
     55 
     56 
     57 /**
     58 *\ingroup grp_lib_nfc
     59 *
     60 *\brief Defines Testmode Init configuration values
     61 */
     62 
     63 typedef enum
     64 {
     65     phLibNfc_TstMode_Off = 0x00,      /**< Test mode is off  */
     66     phLibNfc_TstMode_On               /**< Testmode is on */
     67 
     68 } phLibNfc_Cfg_Testmode_t;
     69 
     70 
     71 /**
     72 *\ingroup grp_lib_nfc
     73 *
     74 *\brief Defines Secure Element configurable states
     75 */
     76 
     77 typedef enum
     78 {
     79     phLibNfc_SE_Active = 0x00,      /**< state of the SE is active  */
     80     phLibNfc_SE_Inactive= 0x01      /**< state of the SE is In active*/
     81 
     82 } phLibNfc_SE_State_t;
     83 
     84 /**
     85 *\ingroup grp_lib_nfc
     86 *
     87 *\brief Defines Secure Element types.
     88 */
     89 typedef enum
     90 {
     91     phLibNfc_SE_Type_Invalid=0x00,/**< Indicates SE type is Invalid */
     92     phLibNfc_SE_Type_SmartMX=0x01,/**< Indicates SE type is SmartMX */
     93     phLibNfc_SE_Type_UICC   =0x02,/**<Indicates SE type is   UICC */
     94     phLibNfc_SE_Type_Unknown=0x03/**< Indicates SE type is Unknown */
     95 }phLibNfc_SE_Type_t;
     96 
     97 /**
     98 *\ingroup grp_lib_nfc
     99 *
    100 *\brief Defines  Ndef Card Offset.
    101 */
    102 typedef enum
    103 {
    104     phLibNfc_Ndef_EBegin = 0x01,      /**<  Start from Beginning position */
    105     phLibNfc_Ndef_ECurrent            /**<  Start from Current position */
    106 
    107 } phLibNfc_Ndef_EOffset_t;
    108 
    109 /**
    110 * \ingroup grp_lib_nfc
    111 *
    112 *\brief This function allows to activate specific Secure element.
    113 
    114 *\b VirtualMode: Virtual mode is used to communicated with secure elements from external reader.
    115 *                This mode is also called as card emulation mode.when secure element mode is set
    116 *                to this mode,external reader can communicate with this SE.
    117 *
    118 *\b WiredMode:   Wired mode is used to communicate with the Secure Element internally.
    119 *                No RF field is generated. In this mode, PN544 acts as reader and discovers
    120 *                SmartMX as MIFARE tag.External reader cannot access any of the SE's in this mode.
    121 *                This mode is applicable to only SmartMX secure element.
    122 *
    123 */
    124 typedef enum
    125 {
    126     phLibNfc_SE_ActModeWired=0x00,      /**< Enables Wired Mode communication.This mode shall
    127                                         be applied to */
    128     phLibNfc_SE_ActModeDefault = 0x01,    /**< Enables Virtual Mode communication.
    129                                         This can be applied to UICC as well as SmartMX*/
    130     phLibNfc_SE_ActModeVirtual=0x02,    /**< Enables Virtual Mode communication.
    131                                         This can be applied to UICC as well as SmartMX*/
    132     phLibNfc_SE_ActModeOff  =0x03       /**< Inactivate SE.This means,put SE in in-active state */
    133 
    134 }phLibNfc_eSE_ActivationMode;
    135 
    136 /**
    137 * \ingroup grp_lib_nfc
    138 *
    139 *\brief Defines SE low power mode types.
    140 */
    141 typedef enum
    142 {
    143     phLibNfc_SE_LowPowerMode_Off= 0x01, /**< Indicates no SE to be selected in low power mode */
    144     phLibNfc_SE_LowPowerMode_On = 0x02  /**< Indicates requested SE to be  selected in low power mode */
    145 
    146 } phLibNfc_SE_LowPowerMode_t;
    147 
    148 /**
    149 * \ingroup grp_lib_nfc
    150 *
    151 *\brief Defines Secure element event info .
    152 */
    153 typedef union phLibNfc_uSeEvtInfo
    154 {
    155    phNfc_sUiccInfo_t UiccEvtInfo;	/**< Indicates UICC event info for Evt_Transaction event */
    156 }phLibNfc_uSeEvtInfo_t;
    157 
    158 /**
    159 * \ingroup grp_lib_nfc
    160 *
    161 *\brief Types of SE transaction events sent to SE notification handler .
    162 */
    163 typedef enum
    164 {
    165     phLibNfc_eSE_EvtStartTransaction=0x00,   /**< Indicates  transaction started on
    166                                             secure element */
    167     phLibNfc_eSE_EvtEndTransaction=0x01,      /**<Indicates  transaction ended on    secure
    168                                              element*/
    169     phLibNfc_eSE_EvtTypeTransaction=0x02,   /**<Indicates external reader trying to access secure element */
    170 
    171     phLibNfc_eSE_EvtConnectivity,           /**<This event notifies the terminal host that it shall
    172                                            send a connectivity event from UICC as defined in
    173                                            ETSI TS 102 622 V7.4.0 */
    174     phLibNfc_eSE_EvtFieldOn,  // consider using phLibNfc_eSE_EvtConnectivity
    175     phLibNfc_eSE_EvtFieldOff,
    176 
    177     phLibNfc_eSE_EvtApduReceived, /* PAYPASS MagStripe or MCHIP_4 transaction */
    178 
    179     phLibNfc_eSE_EvtCardRemoval, /* Indicates the beginning of an EMV Card Removal sequence */
    180 
    181     phLibNfc_eSE_EvtMifareAccess /* Indicates when the SMX Emulation MIFARE is accessed */
    182 } phLibNfc_eSE_EvtType_t;
    183 
    184 /**
    185 * \ingroup grp_lib_nfc
    186 *
    187 *\brief Defines possible registration details for notifications.
    188 */
    189 typedef phNfc_sSupProtocol_t    phLibNfc_Registry_Info_t;
    190 
    191 /**
    192 * \ingroup grp_lib_nfc
    193 *
    194 *\brief  Generic Data buffer definition.
    195 */
    196 typedef phNfc_sData_t phLibNfc_Data_t;
    197 /**
    198 * \ingroup grp_lib_nfc
    199 *
    200 * Application Identifier (phLibNfc_AID)
    201 *
    202 * The application identifier defines a specific application on a SE.
    203 *
    204 */
    205 typedef phNfc_sData_t   phLibNfc_AID;
    206 /**
    207 * \ingroup grp_lib_nfc
    208 *
    209 *\brief Remote Device Info definition  .
    210 */
    211 typedef phNfc_sRemoteDevInformation_t   phLibNfc_sRemoteDevInformation_t;
    212 /**
    213 * \ingroup grp_lib_nfc
    214 */
    215 typedef phNfc_eDiscoveryConfigMode_t    phLibNfc_eDiscoveryConfigMode_t;
    216 
    217 /**
    218 * \ingroup grp_lib_nfc
    219 *
    220 *\brief Transceive info definition.
    221 */
    222 typedef phNfc_sTransceiveInfo_t         phLibNfc_sTransceiveInfo_t;
    223 /**
    224 * \ingroup grp_lib_nfc
    225 *
    226 *\brief Automatic Device Discovery Definition.
    227 */
    228 typedef phNfc_sADD_Cfg_t            phLibNfc_sADD_Cfg_t;
    229 /**
    230 *\ingroup grp_lib_nfc
    231 *
    232 *\brief Release mode definition.
    233 */
    234 typedef phNfc_eReleaseType_t        phLibNfc_eReleaseType_t;
    235 
    236 /**
    237 *\ingroup grp_lib_nfc
    238 *
    239 *\brief device capabilities details.
    240 */
    241 typedef phNfc_sDeviceCapabilities_t phLibNfc_sDeviceCapabilities_t;
    242 
    243 /**
    244 * \ingroup grp_lib_nfc
    245 *
    246 *\brief Defines supported tag types for NDEF mapping and formatting feature.
    247 */
    248 typedef struct SupportedTagInfo
    249 {
    250     unsigned MifareUL:1;  /**<TRUE indicates  specified feature (mapping or formatting)for MIFARE UL tag supported else  not supported.*/
    251     unsigned MifareStd:1;  /**<TRUE indicates  specified feature (mapping or formatting)for Mifare Std tag supported else  not supported.*/
    252     unsigned MifareULC:1;  /**<TRUE indicates  specified feature (mapping or formatting)for MIFARE UL2 tag supported else  not supported.*/
    253     unsigned ISO14443_4A:1;  /**<TRUE indicates  specified feature (mapping or formatting)for ISO14443_4A tag supported else  not supported.*/
    254     unsigned ISO14443_4B:1;  /**<TRUE indicates  specified feature (mapping or formatting)for ISO14443_4B tag supported else  not supported.*/
    255     unsigned ISO15693:1;  /**<TRUE indicates  specified feature (mapping or formatting)for ISO15693 tag supported else  not supported.*/
    256     unsigned FeliCa:1;  /**<TRUE indicates  specified feature (mapping or formatting)for FeliCa tag  supported else  not supported.*/
    257     unsigned Jewel:1;  /**<TRUE indicates  specified feature (mapping or formatting)for JEWEL tag supported else  not supported.*/
    258     unsigned Desfire:1;  /**<TRUE indicates  specified feature (mapping or formatting)for desfire tag supported else  not supported.*/
    259 
    260 }phLibNfc_sSupportedTagInfo_t;
    261 
    262 
    263 /**
    264 * \ingroup grp_lib_nfc
    265 *
    266 *\brief Defines supported tag types for NDEF mapping feature.
    267 */
    268 typedef phLibNfc_sSupportedTagInfo_t  phLibNfc_sNDEFMappingInfo_t;
    269 
    270 /**
    271 * \ingroup grp_lib_nfc
    272 *
    273 *\brief Defines supported tag types for NDEF formatting feature.
    274 */
    275 
    276 typedef phLibNfc_sSupportedTagInfo_t  phLibNfc_sTagFormattingInfo_t;
    277 
    278 /**
    279 * \ingroup grp_lib_nfc
    280 *
    281 *\brief Stack capabilities details contains device capabilities and supported tags for NDEF mapping and formatting feature.
    282 */
    283 
    284 typedef struct StackCapabilities
    285 {
    286     phLibNfc_sDeviceCapabilities_t      psDevCapabilities;
    287     phLibNfc_sNDEFMappingInfo_t         psMappingCapabilities;
    288     phLibNfc_sTagFormattingInfo_t       psFormatCapabilities;
    289 }phLibNfc_StackCapabilities_t;
    290 
    291 
    292 /**
    293 * \ingroup grp_lib_nfc
    294 *
    295 *\brief Defines Secure Element list type.
    296 */
    297 typedef struct phLibNfc_SecureElementInfo
    298 {
    299     phLibNfc_Handle         hSecureElement; /**< handle to Secure Element */
    300     phLibNfc_SE_Type_t      eSE_Type;       /**< type of Secure Element(SE)*/
    301     phLibNfc_SE_State_t     eSE_CurrentState;/**< state of the secure element indicates activated or not*/
    302 } phLibNfc_SE_List_t;
    303 
    304 /**
    305 * \ingroup grp_lib_nfc
    306 *
    307 *\brief Defines target specific info obtained during device discovery.
    308 */
    309 typedef struct phLibNfc_RemoteDev
    310 {
    311     phLibNfc_Handle                   hTargetDev;       /**< discovered Target handle */
    312     phLibNfc_sRemoteDevInformation_t* psRemoteDevInfo;  /**< discovered Target details */
    313 
    314 }phLibNfc_RemoteDevList_t;
    315 
    316 typedef  phNfc_sNfcIPCfg_t      phLibNfc_sNfcIPCfg_t;
    317 
    318 /**
    319 *\ingroup grp_lib_nfc
    320 *\brief  NDEF registration structure definition.
    321 */
    322 typedef struct phLibNfc_Ndef_SrchType
    323 {
    324     uint8_t Tnf;        /**<  Type Name Format of this NDEF record */
    325     uint8_t *Type;      /**<  Type field of this NDEF record */
    326     uint8_t TypeLength; /**<  Length of the Type field of this NDEF record */
    327 } phLibNfc_Ndef_SrchType_t;
    328 
    329 /**
    330 *\ingroup grp_lib_nfc
    331 * \brief NDEF information structure definition. \n
    332 */
    333 typedef struct phLibNfc_Ndef_Info
    334 {
    335     uint32_t                NdefMessageLengthActual;   /**<  Actual length of the NDEF message  */
    336     uint32_t                NdefMessageLengthMaximum;  /**<  Maximum length of the NDEF message */
    337     uint8_t                 *pNdefMessage;             /**<  Pointer to raw NDEF Data buffer    */
    338     uint32_t                NdefRecordCount;           /**<  Number of NDEF records pointed by pNdefRecord */
    339     phFriNfc_NdefRecord_t   *pNdefRecord;              /**<  Pointer to the NDEF Records contained within the NDEF message */
    340 
    341 } phLibNfc_Ndef_Info_t;
    342 
    343 /* As per NFC forum specification, the card can be in either of the below mentioned states
    344     INVALID - means card is NOT NFC forum specified tag. NDEF FORMAT can only be performed for
    345                 the factory cards, other cards may or may not be formatted for NDEF FORMAT function.
    346     INITIALISED - means card is NFC forum specified tag. But, in this state
    347                 the user has to first call NDEF WRITE, because in INITIALISED state, there
    348                 wont be any data i.e.,ACTUAL NDEF FILE SIZE is 0. After the first
    349                 NDEF WRITE, NDEF READ and WRITE functions can be called any number of times.
    350     READ WRITE - means card is NFC forum specified tag. User can use both
    351                 NDEF READ and WRITE functions
    352     READ ONLY - means card is NFC forum specified tag. User can only use
    353                 NDEF READ. NDEF WRITE function will not work.
    354     */
    355 #define PHLIBNFC_NDEF_CARD_INVALID                      0x00U
    356 #define PHLIBNFC_NDEF_CARD_INITIALISED                  0x01U
    357 #define PHLIBNFC_NDEF_CARD_READ_WRITE                   0x02U
    358 #define PHLIBNFC_NDEF_CARD_READ_ONLY                    0x03U
    359 
    360 /**
    361 * \ingroup grp_lib_nfc
    362 *
    363 *\brief Ndef Information Structure.
    364 */
    365 typedef struct phLibNfc_ChkNdef_Info
    366 {
    367     uint8_t   NdefCardState;                    /**< Card state information */
    368     uint32_t  ActualNdefMsgLength;              /**< Indicates Actual length of NDEF Message in Tag */
    369     uint32_t  MaxNdefMsgLength;                 /**< Indicates Maximum Ndef Message length that Tag can hold*/
    370 } phLibNfc_ChkNdef_Info_t;
    371 
    372 /**
    373 *\ingroup grp_lib_nfc
    374 *
    375 *\brief LLCP link status. Refer to \ref phFriNfc_LlcpMac_eLinkStatus_t
    376 *
    377 */
    378 typedef phFriNfc_LlcpMac_eLinkStatus_t phLibNfc_Llcp_eLinkStatus_t;
    379 
    380 typedef  phFriNfc_Llcp_sLinkParameters_t  phLibNfc_Llcp_sLinkParameters_t;
    381 
    382 typedef phFriNfc_LlcpTransport_eSocketType_t phLibNfc_Llcp_eSocketType_t;
    383 
    384 typedef phFriNfc_LlcpTransport_sSocketOptions_t phLibNfc_Llcp_sSocketOptions_t;
    385 
    386 /**
    387 * \ingroup grp_lib_nfc
    388 *
    389 *\brief Response callback for connect request.
    390 *
    391 * Callback type used to indicate a Connect request Successful or Failure indication to
    392 * LibNfc client.
    393 *
    394 * \param[in] pContext           Context passed in the connect request before.
    395 * \param[in] hRemoteDev         Handle to remote device on which connect was requested.
    396 * \param[in] psRemoteDevInfo    contains updated remote device details.For few tags
    397 *                               like ISO-14443A  details like historical bytes gets updated
    398 *                               only after connecting to target.Once connect is successful
    399 *                               \b psRemoteDevInfo gets updated.
    400 *
    401 * \param[in] status             Status of the response  callback.
    402 *
    403 *                  \param NFCSTATUS_SUCCESS          Connect operation successful.
    404 *                  \param NFCSTATUS_TARGET_LOST Connect operation failed because target is lost.
    405 *                  \param NFCSTATUS_SHUTDOWN    Shutdown in progress.
    406 *
    407 */
    408 
    409 typedef void (*pphLibNfc_ConnectCallback_t) (void*		pContext,
    410                                 phLibNfc_Handle			hRemoteDev,
    411                                 phLibNfc_sRemoteDevInformation_t* psRemoteDevInfo,
    412                                 NFCSTATUS				Status
    413                                 );
    414 
    415 /**
    416 * \ingroup grp_lib_nfc
    417 *
    418 *\brief Response callback for disconnect request.
    419 *
    420 * Callback type used to provide a disconnect Success or Failure indication to
    421 * LibNfc client.
    422 *
    423 * \param[in] pContext       Context passed in the disconnect request before.
    424 * \param[in] hRemoteDev     Handle to remote device on which disconnect is requested.
    425 * \param[in] status         Status of the response  callback.
    426 *
    427 *                  \param NFCSTATUS_SUCCESS          Disconnect operation successful.
    428 *                  \param NFCSTATUS_SHUTDOWN    Shutdown in progress.
    429 *
    430 */
    431 typedef void (*pphLibNfc_DisconnectCallback_t)(void*                pContext,
    432                                                phLibNfc_Handle      hRemoteDev,
    433                                                NFCSTATUS            Status
    434                                               );
    435 /**
    436 * \ingroup grp_lib_nfc
    437 *
    438 *\brief Response callback for IOCTL request.
    439 *
    440 * Callback type to inform success or failure of the Ioctl request
    441 * made by LibNfc client. It may optionally contain response data
    442 * depending on the Ioctl command type issued.
    443 
    444 *
    445 * \param[in] pContext           Context passed in the connect request before.
    446 * \param[in] status             Status of the response  callback.
    447 *
    448 *                  \param NFCSTATUS_SUCCESS          Ioctl operation successful.
    449 *                  \param NFCSTATUS_TARGET_LOST Ioctl operation failed because target is lost.
    450 *                  \param NFCSTATUS_SHUTDOWN    Ioctl operation failed because Shutdown in progress.
    451 *
    452 *\param[in,out]     pOutParam       contains Ioctl command specific response buffer and size
    453 *                                   of the buffer.This buffer address will be same as
    454 *                                   pOutParam sent in \ref phLibNfc_Mgt_IoCtl.
    455 *
    456 */
    457 
    458 
    459 typedef void (*pphLibNfc_IoctlCallback_t)   (void*          pContext,
    460                                              phNfc_sData_t* pOutParam,
    461                                              NFCSTATUS      Status
    462                                              );
    463 
    464 
    465 
    466 /**
    467 * \ingroup grp_lib_nfc
    468 *
    469 *\brief Response callback for Transceive request.
    470 *
    471 * This callback type is used to provide received data and it's size to the
    472 * LibNfc client in \ref phNfc_sData_t format ,when  LibNfc client has performed
    473 * a Transceive operation on a tag or when the device acts as an Initiator during a
    474 * P2P transactions.
    475 *
    476 * \param[in] pContext       LibNfc client context   passed in the corresponding request before.
    477 * \param[in] hRemoteDev     Handle to remote device on transceive is performed.
    478 * \param[in] pResBuffer     Response buffer of type \ref phNfc_sData_t.
    479 * \param[in] status         Status of the response  callback.
    480 *
    481 *           \param NFCSTATUS_SUCCESS                 Transceive operation  successful.
    482 *           \param NFCSTATUS_TARGET_LOST        Transceive operation failed because target is lost.
    483 *           \param NFCSTATUS_SHUTDOWN           Transceive operation failed because Shutdown in progress.
    484 *           \param NFCSTATUS_ABORTED            Aborted due to disconnect request in between.
    485 *
    486 */
    487 typedef void (*pphLibNfc_TransceiveCallback_t)( void*               pContext,
    488                                                 phLibNfc_Handle     hRemoteDev,
    489                                                 phNfc_sData_t*      pResBuffer,
    490                                                 NFCSTATUS			Status
    491                                               );
    492 
    493 /**
    494 * \ingroup grp_lib_nfc
    495 *
    496 * \brief  Generic Response Callback definition.
    497 *
    498 * Generic callback definition used as callback type in few APIs below.
    499 *
    500 * \note : Status and error codes for this type of callback are documented in respective APIs
    501 * wherever it is used.
    502 *
    503 * \param[in] pContext       LibNfc client context   passed in the corresponding request
    504 *                           before.
    505 * \param[in] status         Status of the response  callback.
    506 */
    507 typedef void(*pphLibNfc_RspCb_t) (void* pContext,NFCSTATUS  Status);
    508 /**
    509 * \ingroup grp_lib_nfc
    510 *
    511 * \brief  Check NDEF Callback definition.
    512 *
    513 * This call back is used by check ndef api.
    514 *
    515 * \note : Status and error codes for this type of callback are documented in API
    516 *
    517 * \param[in] pContext       LibNfc client context   passed in the corresponding request
    518 *                           before.
    519 * \param[in] Ndef_Info      Ndef message length and the container size.
    520 * \param[in] status         Status of the response  callback.
    521 */
    522 typedef void(*pphLibNfc_ChkNdefRspCb_t)(void*           pContext,
    523                                 phLibNfc_ChkNdef_Info_t Ndef_Info,
    524                                 NFCSTATUS               Status);
    525 
    526 
    527 /**
    528 * \ingroup grp_lib_nfc
    529 * \brief  Notification handler callback definition.
    530 *
    531 *This callback type is used to provide information on discovered targets to LibNfcClient.
    532 *Discovered targets will be notified in \ref phLibNfc_RemoteDevList_t format.
    533 *In case multiple targets discovered ,remote device list contains these targets one after another.
    534 *
    535 *\note List will be exported as memory block,based on \b uNofRemoteDev
    536 *      parameter application has to access remote devices accordingly.
    537 *
    538 *\b Ex: Multiple targets discovered  can be referred as phLibNfc_RemoteDevList_t[0]
    539 *and phLibNfc_RemoteDevList_t[1].
    540 *
    541 *Subsequent operations on discovered target shall be performed using  target specific handle
    542 *\b hTargetDev.
    543 *
    544 * \param[in] pContext       Client context passed in the corresponding
    545 *                           request before.The context is handled by client
    546 *                           only.
    547 *
    548 * \param[in] psRemoteDevList Remote Device list contains discovered target details.
    549 *                            Refer to \ref phLibNfc_RemoteDevList_t .
    550 *                            List size depends on no of remote devices discovered.
    551 *
    552 * \param[in] uNofRemoteDev   Indicates no of remote devices discovered .
    553 *                            In case more than one target discovered,\b psRemoteDevList contains
    554 *                            multiple target details.
    555 *
    556 * \param[in] Status Status  of the response callback.
    557 *
    558 *                   \param NFCSTATUS_SUCCESS                 Discovered single target successfully.
    559 *                   \param NFCSTATUS_MULTIPLE_TARGETS   multiple targets found.
    560 *                   \param NFCSTATUS_MULTI_PROTOCOLS    Target found supports multiple protocols.
    561 *                   \param NFCSTATUS_SHUTDOWN           Registration  failed because shutdown in progress.
    562 *                   \param NFCSTATUS_DESELECTED         initiator issued disconnect or intiator
    563 *                                                       physically removed from the RF field.
    564 *
    565 *\note: multiple tag detection is possible only within same technology but not across
    566 *       different technologies.
    567 */
    568 typedef void (*phLibNfc_NtfRegister_RspCb_t)(
    569     void*                           pContext,
    570     phLibNfc_RemoteDevList_t*       psRemoteDevList,
    571     uint8_t                         uNofRemoteDev,
    572     NFCSTATUS                       Status
    573     );
    574 
    575 /**
    576 * \ingroup grp_lib_nfc
    577 * \brief Response Callback for secure element mode settings.
    578 *
    579 * This callback type is used to provide information on requested secure element is
    580 * activated or not to LibNfcClient.
    581 *
    582 * \param[in] pContext LibNfc client context     passed in the activation request.
    583 *
    584 * \param[in] hSecureElement     Handle to secure element.
    585 *
    586 * \param[in] Status             Indicates API status.
    587 *           \param NFCSTATUS_SUCCESS    Secure element  activated successfully.
    588 *           \param NFCSTATUS_SHUTDOWN   Activation failed because shutdown in progress.
    589 *           \param NFCSTATUS_FAILED     Activation failed.
    590 *
    591 */
    592 typedef void(*pphLibNfc_SE_SetModeRspCb_t)(
    593                                             void*            pContext,
    594                                             phLibNfc_Handle  hSecureElement,
    595                                             NFCSTATUS        Status
    596                                            );
    597 /**
    598 * \ingroup grp_lib_nfc
    599 * \brief Notification callback for \ref phLibNfc_SE_NtfRegister().
    600 *
    601 * A function of this type is called when external reader tries to access SE.
    602 *
    603 *\param[in] pContext        LibNfc client context passed in the SE notification register request.
    604 *                           The context is Handled by client only.
    605 * \param[in] EventType          Event type of secure element transaction
    606 * \param[in] hSecureElement     handle to Secures Element.
    607 *
    608 *\param[in] pAppID              Application identifier to be accessed on SE .
    609 *                               Sent when available from SE otherwise empty.
    610 *
    611 *\param[in] Status      Indicates API status.
    612 *       \param NFCSTATUS_SUCCESS         Notification handler registered sucessfully.
    613 *       \param NFCSTATUS_SHUTDOWN   Shutdown in progress.
    614 *       \param NFCSTATUS_FAILED     set mode operation failed.
    615 *
    616 *
    617 */
    618 typedef void (*pphLibNfc_SE_NotificationCb_t) (void*                        pContext,
    619                                                phLibNfc_eSE_EvtType_t       EventType,
    620                                                phLibNfc_Handle              hSecureElement,
    621                                                phLibNfc_uSeEvtInfo_t*       pSeEvtInfo,
    622                                                NFCSTATUS                    Status
    623                                                );
    624 
    625 
    626 /**
    627 *\ingroup grp_lib_nfc
    628 *\brief Receive callback definition.
    629 *
    630 * This callback type is used to provide received data and it's size to the
    631 * LibNfc client in \ref phNfc_sData_t format ,when  LibNfc client has performed
    632 * when the device acts as a Target during P2P communication
    633 *
    634 * \param[in] pContext                   LibNfc client context   passed in the corresponding
    635 *                                       request before.
    636 * \param[in] pRecvBufferInfo            Response buffer of type \ref phNfc_sData_t.
    637 * \param[in] status                     Status of the response  callback.
    638 *
    639 *           \param NFCSTATUS_SUCCESS         Receive operation  successful.
    640 *           \param NFCSTATUS_SHUTDOWN   Receive operation failed because
    641 *                                       Shutdown in progress.
    642 *           \param NFCSTATUS_ABORTED    Aborted due to initiator issued disconnect request.
    643 *                                       This status code reported,to indicate P2P session
    644 *                                       closed and send and receive requests not allowed any more
    645 *                                       unless new session is started.
    646 */
    647 typedef void (*pphLibNfc_Receive_RspCb_t)(void*              pContext,
    648                                           phNfc_sData_t*     pRecvBufferInfo,
    649                                           NFCSTATUS          status
    650                                           );
    651 /**
    652 *\ingroup grp_lib_nfc
    653 *
    654 * \brief NDEF Response callback definition
    655 *
    656 *  A function of this type is notified when registered NDEF type detected.
    657 *
    658 * \b Note :Once this type callback is notified,discovery wheel is stopped.
    659 *In order to restart discovery process again it is important to disconnect
    660 *from current tag.LibNfc client shall disconnect explicitly using
    661 *\ref phLibNfc_RemoteDev_Disconnect() interface.
    662 *
    663 *\param[in] pContext                    Pointer to context previously provided by the user
    664 *\param[in] psNdefInfo                  All Ndef specific details of the remote device discovered.
    665 *\param[in] hRemoteDevice               handle to remote device on which NDEF detection is done.
    666 *
    667 *\param[in] Status                      Indicates callback status.
    668 *
    669 *           \param NFCSTATUS_SUCCESS         Indicates registered tnf  type detected.            .
    670 *           \param NFCSTATUS_SHUTDOWN   Indicates shutdown in progress.
    671 *           \param NFCSTATUS_FAILED     status failed.
    672 *           \param NFCSTATUS_ABORTED    Aborted due to disconnect operation in between.
    673 
    674 
    675 */
    676 typedef void (*pphLibNfc_Ndef_Search_RspCb_t)   ( void*                  pContext,
    677                                                 phLibNfc_Ndef_Info_t*    psNdefInfo,
    678                                                 phLibNfc_Handle          hRemoteDevice,
    679                                                 NFCSTATUS                Status
    680                                                 );
    681 
    682 
    683 /**
    684 *\ingroup grp_lib_nfc
    685 *
    686 * \brief LLCP check response callback definition
    687 */
    688 typedef void (*pphLibNfc_ChkLlcpRspCb_t) ( void*      pContext,
    689                                            NFCSTATUS  status
    690                                            );
    691 
    692 
    693 /**
    694 *\ingroup grp_lib_nfc
    695 *
    696 * \brief LLCP check response callback definition
    697 */
    698 typedef void (*pphLibNfc_LlcpLinkStatusCb_t) ( void*                         pContext,
    699                                                phLibNfc_Llcp_eLinkStatus_t   eLinkStatus
    700                                                );
    701 
    702 
    703 /**
    704 *\ingroup grp_lib_nfc
    705 *
    706 * \brief LLCP socket error notification callback definition
    707 */
    708 typedef void (*pphLibNfc_LlcpSocketErrCb_t) ( void*      pContext,
    709                                               uint8_t    nErrCode
    710                                               );
    711 
    712 /**
    713 *\ingroup grp_lib_nfc
    714 *
    715 * \brief Incoming connection on a listening LLCP socket callback definition
    716 */
    717 typedef void (*pphLibNfc_LlcpSocketListenCb_t) ( void*            pContext,
    718                                                  phLibNfc_Handle  hIncomingSocket
    719                                                  );
    720 
    721 /**
    722 *\ingroup grp_lib_nfc
    723 *
    724 * \brief LLCP socket connect callback definition
    725 */
    726 typedef void (*pphLibNfc_LlcpSocketConnectCb_t) ( void*        pContext,
    727                                                   uint8_t      nErrCode,
    728                                                   NFCSTATUS    status
    729                                                   );
    730 
    731 /**
    732 *\ingroup grp_lib_nfc
    733 *
    734 * \brief LLCP socket disconnect callback definition
    735 */
    736 typedef void (*pphLibNfc_LlcpSocketDisconnectCb_t) ( void*        pContext,
    737                                                      NFCSTATUS    status
    738                                                      );
    739 
    740 /**
    741 *\ingroup grp_lib_nfc
    742 *
    743 * \brief LLCP socket Accept callback definition
    744 */
    745 typedef void (*pphLibNfc_LlcpSocketAcceptCb_t) ( void*        pContext,
    746                                                  NFCSTATUS    status
    747                                                  );
    748 
    749 /**
    750 *\ingroup grp_lib_nfc
    751 *
    752 * \brief LLCP socket Reject callback definition
    753 */
    754 typedef void (*pphLibNfc_LlcpSocketRejectCb_t) ( void*        pContext,
    755                                                  NFCSTATUS    status
    756                                                  );
    757 
    758 /**
    759 *\ingroup grp_lib_nfc
    760 *
    761 * \brief LLCP socket reception callback definition
    762 */
    763 typedef void (*pphLibNfc_LlcpSocketRecvCb_t) ( void*     pContext,
    764                                                NFCSTATUS status
    765                                                );
    766 
    767 /**
    768 *\ingroup grp_lib_nfc
    769 *
    770 * \brief LLCP socket reception with SSAP callback definition
    771 */
    772 typedef void (*pphLibNfc_LlcpSocketRecvFromCb_t) ( void*       pContext,
    773                                                    uint8_t     ssap,
    774                                                    NFCSTATUS   status
    775                                                    );
    776 
    777 /**
    778 *\ingroup grp_lib_nfc
    779 *
    780 * \brief LLCP socket emission callback definition
    781 */
    782 typedef void (*pphLibNfc_LlcpSocketSendCb_t) ( void*        pContext,
    783                                                NFCSTATUS    status
    784                                                );
    785 
    786 
    787 /*  FUNCTION PROTOTYPES  */
    788 /**
    789  * \ingroup grp_lib_nfc
    790  *
    791  * \brief Driver configuration function
    792  * This synchronous function configures the given driver Interface and
    793  * sends the HANDLE to the caller.
    794  *
    795  * \param[in]       psConfig   Driver configuration details as provided
    796  *                             by the upper layer.
    797  * \param[in,out]   ppDriverHandle     pointer to which valid Handle to driver
    798  *                             interface is assigned.
    799  *
    800  * \retval NFCSTATUS_SUCCESS                    Configuration happened successfully.
    801  * \retval NFCSTATUS_INVALID_PARAMETER          At least one parameter of the function
    802  *                                              is invalid.
    803  * \retval NFCSTATUS_FAILED                     Configuration failed(example.unable to
    804  *                                              open HW Interface).
    805  * \retval NFCSTATUS_INVALID_DEVICE             The device has not been opened or
    806  *                                              has been disconnected meanwhile
    807  * \retval NFCSTATUS_BOARD_COMMUNICATION_ERROR  A board communication error occurred
    808                                                 (e.g. configuration went wrong).
    809  *\msc
    810 *LibNfcClient,LibNfc;
    811 *--- [label="Before initializing Nfc LIB,Configure Driver layer"];
    812 *LibNfcClient=>LibNfc[label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref   phLibNfc_Mgt_ConfigureDriver"];
    813 *LibNfcClient<<LibNfc[label="NFCSTATUS_SUCCESS"];
    814  *\endmsc
    815  */
    816 NFCSTATUS phLibNfc_Mgt_ConfigureDriver (pphLibNfc_sConfig_t     psConfig,
    817                                         void **                 ppDriverHandle
    818                                         );
    819  /**
    820  * \ingroup grp_lib_nfc
    821  *
    822  * \brief Release configuration for the given driver Interface.
    823  *
    824  * \copydoc page_reg Release all that has been
    825  *      initialised in \b phLibNfc_Mgt_ConfigureDriver function (Synchronous function).
    826  *
    827  * \param[in] pDriverHandle            Link information of the hardware
    828  *
    829  * \retval NFCSTATUS_SUCCESS            Driver Configuration Released successfully.
    830  * \retval NFCSTATUS_FAILED             Configuration release failed(example: Unable to close Com port).
    831  *
    832  *\msc
    833  *LibNfcClient,LibNfc;
    834  *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
    835  *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
    836  *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
    837  *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
    838  *LibNfcClient<-LibNfc [label="pInitCb"];
    839  *--- [label="Perform feature operations "];
    840  *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_DeInitialize()",URL="\ref   phLibNfc_Mgt_DeInitialize"];
    841  *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
    842  *LibNfcClient<-LibNfc [label="pDeInitCb"];
    843  *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_UnConfigureDriver()",URL="\ref phLibNfc_Mgt_UnConfigureDriver"];
    844  *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
    845  *\endmsc
    846  */
    847 NFCSTATUS phLibNfc_Mgt_UnConfigureDriver (void *                 pDriverHandle
    848                                           );
    849 
    850 NFCSTATUS phLibNfc_HW_Reset ();
    851 
    852 NFCSTATUS phLibNfc_Download_Mode ();
    853 
    854 int phLibNfc_Load_Firmware_Image ();
    855 
    856 // timeout is 8 bits
    857 // bits [0..3] => timeout value, (256*16/13.56*10^6) * 2^value
    858 //                  [0] -> 0.0003s
    859 //                  ..
    860 //                  [14] -> 4.9s
    861 //                  [15] -> not allowed
    862 // bit [4]     => timeout enable
    863 // bit [5..7]  => unused
    864 NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout);
    865 NFCSTATUS phLibNfc_SetHciTimeout(uint32_t timeout_in_ms);
    866 
    867 /**
    868 * \ingroup grp_lib_nfc
    869 *
    870 * \brief Initializes the NFC library .
    871 *
    872 *
    873 *\brief This function initializes NFC library and its underlying layers.
    874 * As part of this interface underlying modules gets initialized.
    875 * A session with NFC hardware will be established.
    876 * Once initialization is successful ,NFC library ready for use.
    877 *\note It is must to initialize prior usage of the stack .
    878 *
    879 * \param[in] pDriverHandle      Driver Handle currently application is using.
    880 * \param[in] pInitCb            The init callback is called by the LibNfc when  init is
    881 *                               completed or there is an error in initialization.
    882 *
    883 * \param[in] pContext           Client context which will   be included in
    884 *                               callback when the request is completed.
    885 *
    886 * \retval NFCSTATUS_ALREADY_INITIALISED     Stack is already initialized.
    887 * \retval NFCSTATUS_PENDING                 Init sequence   has been successfully
    888 *                                           started and result will be  conveyed via
    889 *                                           callback notification.
    890 * \retval NFCSTATUS_INVALID_PARAMETER       The parameter could not be  properly
    891 *                                           interpreted.
    892 *\retval NFCSTATUS_INSUFFICIENT_RESOURCES   Insufficient resource.(Ex: insufficient memory)
    893 *
    894 *\msc
    895 *LibNfcClient,LibNfc;
    896 *--- [label="Before initializing Nfc LIB,Configure Driver layer"];
    897 *LibNfcClient=>LibNfc[label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref   phLibNfc_Mgt_ConfigureDriver"];
    898 *LibNfcClient<<LibNfc[label="NFCSTATUS_SUCCESS"];
    899 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
    900 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
    901 *LibNfcClient<-LibNfc   [label="pInitCb"];
    902 *\endmsc
    903 */
    904 NFCSTATUS phLibNfc_Mgt_Initialize (void *                 pDriverHandle,
    905                                   pphLibNfc_RspCb_t       pInitCb,
    906                                   void*                   pContext
    907                                   );
    908 /**
    909 * \ingroup grp_lib_nfc
    910 *
    911 * \brief De-Initializes NFC library.
    912 *
    913 *
    914 * This function de-initializes and closes the current session with  PN544 NFC hardware.
    915 * All configurations and setups done until now are invalidated to restart
    916 * communication. Resources currently used by stack gets released during De-initialization.
    917 *\ref phLibNfc_Mgt_Initialize needs to be    called once stack is
    918 * De-initialized before using the stack again.
    919 *
    920 * \param[in]    pHwHandle       Hardware context currently application is using.
    921 *
    922 * \param[in]    pDeInitCb       De-initialization callback  is called by the LibNfc when init
    923 *                               completed or there is an error in initialization.
    924 * \param[in]    pContext        Client context which will   be included in
    925 *                               callback when the request is completed.
    926 *
    927 * \retval NFCSTATUS_SUCCESS     Device stack is already De-Initialized.
    928 * \retval NFCSTATUS_PENDING     De-Initialization sequence has been successfully
    929 *                               started and result is conveyed via callback
    930 *                               notification.
    931 *
    932 * \retval NFCSTATUS_INVALID_PARAMETER   The parameter could not be  properly
    933 *                                       interpreted.
    934 * \retval  NFCSTATUS_NOT_INITIALISED    Indicates stack is not yet initialized.
    935 * \retval  NFCSTATUS_BUSY               Previous request in progress can not accept new request.
    936 * \retval  NFCSTATUS_FAILED             Request failed.
    937 
    938 *
    939 *
    940 *\msc
    941 *LibNfcClient,LibNfc;
    942 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
    943 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
    944 *LibNfcClient<-LibNfc   [label="pInitCb"];
    945 *--- [label="Perform feature operations "];
    946 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_DeInitialize()",URL="\ref   phLibNfc_Mgt_DeInitialize"];
    947 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
    948 *LibNfcClient<-LibNfc   [label="pDeInitCb"];
    949 *\endmsc
    950 */
    951 NFCSTATUS phLibNfc_Mgt_DeInitialize(void *                      pDriverHandle,
    952                                    pphLibNfc_RspCb_t            pDeInitCb,
    953                                    void*                        pContext
    954                                    );
    955 
    956 /**
    957 * \ingroup grp_lib_nfc
    958 * \brief Get list of available Secure Elements.
    959 *
    960 * This  function retrieves list of secure elements locally connected.
    961 * during LibNfc initialization these SEs enumerated from lower stack and maintained
    962 * in LibNfc library.Once libNfc client queries using this interface,
    963 * same details exposed to LibNfc client.
    964 * LibNfc client  shall pass empty list of size \ref PHLIBNFC_MAXNO_OF_SE .
    965 * Once SE list is available, libNfc client can perform operation on specific SE
    966 * using SE handle.
    967 * The handle given in the \ref phLibNfc_SE_List_t structure stays valid until
    968 * shutdown is called.
    969 *
    970 *\note In case no SE's found, API still returns \ref NFCSTATUS_SUCCESS with \b uSE_count
    971 set to zero.Value zero indicates none of the SE's connected to PN544 hardware.
    972 
    973 * \param[in,out] pSE_List       contains list of SEs with SE details in \ref phLibNfc_SE_List_t format.
    974 * \param[in,out] uSE_count      contains no of SEs in the list.
    975 *
    976 *\note LibNfc client has to interpret no of secure elements in \b pSE_List   based on this
    977 *count.
    978 *
    979 *\retval    NFCSTATUS_SUCCESS                  Indicates operation is sucessfull.
    980 *\retval    NFCSTATUS_SHUTDOWN                 Operation failed because shutdown in progress.
    981 *\retval    NFCSTATUS_NOT_INITIALISED          Operation failed because stack is not yet initialized.
    982 * \retval   NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
    983 *                                              could not be properly interpreted.
    984 *
    985 *\msc
    986 *LibNfcClient,LibNfc;
    987 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
    988 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
    989 *LibNfcClient<-LibNfc   [label="pInitCb"];
    990 *--- [label="Now SE list can be retrieved"];
    991 *\endmsc
    992 */
    993 
    994 NFCSTATUS phLibNfc_SE_GetSecureElementList(phLibNfc_SE_List_t*  pSE_List,
    995                                            uint8_t*             uSE_count
    996                                            );
    997 
    998 
    999 /**
   1000 * \ingroup grp_lib_nfc
   1001 *
   1002 *\brief Sets secure element mode.
   1003 *
   1004 * This  function configures SE to specific mode based on activation mode type.
   1005 * Effect of different modes on SE is as below.
   1006 *
   1007 *\b a)If mode is \ref phLibNfc_SE_ActModeVirtual then external reader can communicate
   1008 * with this SE.
   1009 *\note This mode is applicable to both UICC and SmartMX.
   1010 *
   1011 \b b)If mode is \ref phLibNfc_SE_ActModeWired then internal reader can communicate with
   1012 * this SE.In this mode PN544 can act as reader and communicate with SE as normal Tag.
   1013 *In this mode mode external reader ca not communicate with any of the SEs since RF filed is off.
   1014 *
   1015 *\note 1.Wired Mode is applicable to only SmartMX not to UICC.
   1016 * 2.When SmartMX SE configured in Wired Mode ,LibNfc client shall restart discovery process.
   1017 *   SmartMX gets detected as MIFARE tag.
   1018 * 3.To exit wired mode ,LibNfc client has to disconnect with release type as "NFC_SMARTMX_RELEASE".
   1019 *
   1020 *
   1021 *\b c)If mode is \ref phLibNfc_SE_ActModeOff
   1022 *This means SE is off mode .It can not be accessed any more in wired or virtual mode.
   1023 *internal reader any more.communicate with internal reader and only
   1024 *PN544 can communicate in reader mode and external reader can not
   1025 *communicate with it.This mode is applicable  both SE types ( UICC and SmartMX)
   1026 *
   1027 * \param[in]  hSE_Handle            Secure  Element Handle .
   1028 * \param[in]  eActivation_mode      Indicates SE mode to be configured.
   1029 *
   1030 *
   1031 *
   1032 * \param[in]  pphLibNfc_SE_setModeRspCb_t   pointer to response callback.
   1033 *
   1034 * \param[in]  pContext              Client context which will   be included in
   1035 *                                   callback when the request is completed.
   1036 *
   1037 *
   1038 * \retval   NFCSTATUS_PENDING               Activation transaction started.
   1039 * \retval   NFSCSTATUS_SHUTDOWN             Shutdown in progress.
   1040 * \retval   NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   1041 * \retval   NFCSTATUS_INVALID_HANDLE        Invalid Handle.
   1042 * \retval   NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   1043 *                                           could not be properly interpreted.
   1044 * \retval   NFCSTATUS_REJECTED              Invalid request.(Ex: If wired mode settings called using
   1045 *                                           UICC SE handle ,this error code seen).
   1046 * \retval   NFCSTATUS_FAILED                Request failed.
   1047 *
   1048 *\msc
   1049 *LibNfcClient,LibNfc;
   1050 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1051 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
   1052 *LibNfcClient<-LibNfc   [label="pInitCb"];
   1053 *--- [label="Now query for available SE's"];
   1054 *LibNfcClient=>LibNfc   [label="phLibNfc_SE_GetSecureElementList()",URL="\ref phLibNfc_SE_GetSecureElementList"];
   1055 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1056 *--- [label="Now configure specific SE"];
   1057 *LibNfcClient=>LibNfc   [label="phLibNfc_SE_SetMode(hSE_Handle,)",URL="\ref phLibNfc_SE_SetMode"];
   1058 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
   1059 *LibNfcClient<-LibNfc   [label="pSE_SetMode_Rsp_cb"];
   1060 *\endmsc
   1061 */
   1062 NFCSTATUS phLibNfc_SE_SetMode ( phLibNfc_Handle             hSE_Handle,
   1063                                phLibNfc_eSE_ActivationMode  eActivation_mode,
   1064                                pphLibNfc_SE_SetModeRspCb_t  pSE_SetMode_Rsp_cb,
   1065                                void *                       pContext
   1066                                );
   1067 
   1068 /**
   1069 * \ingroup grp_lib_nfc
   1070 * \brief Registers notification handler to handle secure element specific events.
   1071 *
   1072 *  This function registers handler to report SE specific transaction events.
   1073 *  Possible different types of events are as defined in \ref phLibNfc_eSE_EvtType_t.
   1074 
   1075 * \param[in]  pSE_NotificationCb    pointer to notification callback.
   1076 * \param[in]  pContext              Client context which will   be included in
   1077 *                                   callback when the request is completed.
   1078 *
   1079 *\retval  NFCSTATUS_SUCCESS                 Registration Sucessful.
   1080 *\retval  NFSCSTATUS_SHUTDOWN               Shutdown in progress.
   1081 *\retval  NFCSTATUS_NOT_INITIALISED         Indicates stack is not yet initialized.
   1082 *\retval  NFCSTATUS_INVALID_PARAMETER       One or more of the supplied parameters
   1083 *                                           could not be properly interpreted.
   1084 *\retval  NFCSTATUS_FAILED                  Request failed.
   1085 *
   1086 *
   1087 *\msc
   1088 *LibNfcClient,LibNfc;
   1089 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1090 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
   1091 *LibNfcClient<-LibNfc   [label="pInitCb"];
   1092 *--- [label="Perform feature operations "];
   1093 *
   1094 *LibNfcClient=>LibNfc   [label="phLibNfc_SE_NtfRegister()",URL="\ref    phLibNfc_SE_NtfRegister"];
   1095 LibNfcClient<<LibNfc    [label="NFCSTATUS_SUCCESS"];
   1096 *--- [label="Registration sucessfull"];
   1097 *
   1098 *--- [label="In case external reader performs transactions,callback is notified as shown below"];
   1099 *LibNfcClient<-LibNfc   [label="pSE_NotificationCb"];
   1100 *\endmsc
   1101 */
   1102 
   1103 NFCSTATUS phLibNfc_SE_NtfRegister   (pphLibNfc_SE_NotificationCb_t  pSE_NotificationCb,
   1104                                      void   *                       pContext
   1105                                      );
   1106 /**
   1107 * \ingroup grp_lib_nfc
   1108 *\brief This function unregister the registered listener for SE event.
   1109 * This function unregisters the listener which  has been registered with \ref
   1110 * phLibNfc_SE_NtfRegister.
   1111 *
   1112 *\retval  NFCSTATUS_SUCCESS                 Unregistration successful.
   1113 *\retval  NFSCSTATUS_SHUTDOWN               Shutdown in progress.
   1114 *\retval  NFCSTATUS_NOT_INITIALISED         Indicates stack is not yet initialized.
   1115 *\retval  NFCSTATUS_FAILED                  Request failed.
   1116 *\msc
   1117 *LibNfcClient,LibNfc;
   1118 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1119 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
   1120 *LibNfcClient<-LibNfc   [label="pInitCb"];
   1121 *--- [label="Perform feature operations "];
   1122 *LibNfcClient=>LibNfc   [label="phLibNfc_SE_NtfRegister()",URL="\ref    phLibNfc_SE_NtfRegister"];
   1123 LibNfcClient<<LibNfc    [label="NFCSTATUS_SUCCESS"];
   1124 *--- [label="Registration sucessfull"];
   1125 *
   1126 *--- [label="In case external reader performs transactions,callback is notified as shown below"];
   1127 *
   1128 *LibNfcClient<-LibNfc   [label="pSE_NotificationCb"];
   1129 *--- [label="Unregister SE notification handler in case required "];
   1130 *LibNfcClient=>LibNfc   [label="phLibNfc_SE_NtfUnregister()",URL="\ref  phLibNfc_SE_NtfUnregister"];
   1131 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1132 
   1133 *\endmsc
   1134 */
   1135 NFCSTATUS phLibNfc_SE_NtfUnregister(void);
   1136 
   1137 /**
   1138 *\ingroup   grp_lib_nfc
   1139 * \brief IOCTL interface.
   1140 *
   1141 * The I/O Control function allows   the caller to configure specific
   1142 * functionality provided by the lower layer.Each feature is accessible via a
   1143 * specific IOCTL Code.
   1144 *
   1145 * \param[in]        pDriverHandle      Interface handle.This parameter is valid only for firmware download feature.
   1146 *                                   for other IOCTL features this parameter is  not relevent.
   1147 *
   1148 * \param[in]        IoctlCode       Control code for the operation.
   1149 *                                   This value identifies the specific
   1150 *                                   operation to be performed.For more details on supported
   1151 *                                   IOCTL codes refer to \ref grp_lib_ioctl.
   1152 *\param[in,out]     pInParam        Pointer to any input data structure
   1153 *                                   containing data which is interpreted
   1154 *                                   based on IoCtl code and the length of
   1155 *                                   the data.
   1156 *
   1157 *\param[in,out]     pOutParam       Pointer to output buffer details to hold
   1158 *                                   Ioctl specific response buffer and size of
   1159 *                                   the buffer.This buffer will be updated and
   1160 *                                   sent back as part of of callback details.
   1161 *
   1162 *\param[in]         pIoCtl_Rsp_cb   Response callback registered by the caller.
   1163 *
   1164 * \param[in]    pContext            Client context which will   be included in
   1165 *                                   callback when the request is completed.
   1166 *
   1167 *
   1168 *\retval    NFCSTATUS_PENDING           Update in pending state. RspCB will be
   1169 *                                       called later.
   1170 *\retval    NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
   1171 *                                       could not be properly interpreted.
   1172 *
   1173 \retval     NFCSTATUS_BUFFER_TOO_SMALL  The buffer supplied by the caller is to
   1174 *\retval    NFSCSTATUS_SHUTDOWN         Shutdown in progress.
   1175 *\retval    NFCSTATUS_NOT_INITIALISED   Indicates stack is not yet initialized.
   1176 *\retval    NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
   1177 *                                       could not be properly interpreted.
   1178 *
   1179 *\msc
   1180 *LibNfcClient,LibNfc;
   1181 *--- [label="Firmware download Scenario"];
   1182 
   1183 *--- [label="Intialise Driver"];
   1184 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_IoCtl(pDriverHandle,)",URL="\ref phLibNfc_Mgt_IoCtl"];
   1185 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
   1186 *LibNfcClient<-LibNfc   [label="pIoCtl_Rsp_cb()",URL="\ref pphLibNfc_IoctlCallback_t"];
   1187 **--- [label="requested IoCtl processed sucessfully "];
   1188 *
   1189 *\endmsc
   1190 */
   1191 NFCSTATUS phLibNfc_Mgt_IoCtl    (void*                      pDriverHandle,
   1192                                  uint16_t                   IoctlCode,
   1193                                  phNfc_sData_t*             pInParam,
   1194                                  phNfc_sData_t*             pOutParam,
   1195                                  pphLibNfc_IoctlCallback_t  pIoCtl_Rsp_cb,
   1196                                  void*                      pContext
   1197                                  );
   1198 
   1199 /**
   1200 * \ingroup  grp_lib_nfc
   1201 * \brief    This interface registers notification handler for target discovery.
   1202 *
   1203 * This  function allows  libNfc client to register for notifications based technology
   1204 * type it is interested to discover. In case application is interested in multiples technology
   1205 * discovery,it can enable respective bits in \b pRegistryInfo . when Registered type target
   1206 * is discovered in RF field ,LibNfc notifies registered notification callback.
   1207 *
   1208 * \note In case this API is called multiple times ,most recent request registry details will be used
   1209 *for registration.
   1210 *
   1211 *\param[in] pRegistryInfo           structure contains bitwise registry information.
   1212 *                                   Specific technology type discovery can be registered if
   1213 *                                   corresponding bit is enabled.In case bit is disabled
   1214 *                                   it indicates specific technology type unregistered.
   1215 *
   1216 *\param[in] pNotificationHandler    Notification callback.This callback will
   1217 *                                   be notified once registered target is discovered.
   1218 * \param[in]    pContext            Client context which will   be included in
   1219 *                                   callback when the request is completed.
   1220 *
   1221 * \retval NFCSTATUS_SUCCESS             Indicates registration successful.
   1222 * \retval NFCSTATUS_INVALID_PARAMETER   One or more of the supplied parameters could
   1223 *                                       not be properly interpreted.
   1224 * \retval  NFCSTATUS_NOT_INITIALISED    Indicates stack is not yet initialized.
   1225 * \retval NFSCSTATUS_SHUTDOWN           Shutdown in progress.
   1226 *
   1227 *
   1228 *\msc
   1229 *LibNfcClient,LibNfc;
   1230 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1231 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1232 *--- [label="Register for technology type.Ex: MIFARE UL"];
   1233 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1234 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1235 *
   1236 *\endmsc
   1237 */
   1238 
   1239 NFCSTATUS   phLibNfc_RemoteDev_NtfRegister(
   1240                                         phLibNfc_Registry_Info_t*       pRegistryInfo,
   1241                                         phLibNfc_NtfRegister_RspCb_t    pNotificationHandler,
   1242                                         void*                           pContext
   1243                                         );
   1244 
   1245 
   1246 /**
   1247 * \ingroup  grp_lib_nfc
   1248 * \brief Configure Discovery Modes.
   1249 *
   1250 *This function is used to configure ,start and stop the discovery wheel.
   1251 *Configuration includes
   1252 *<br><br>a)Enabling/disabling of Reader phases for A,B and F technologies.
   1253 *<br>b)Configuring NFC-IP1 Initiator Speed and duration of the Emulation phase .
   1254 *
   1255 *Discovery wheel configuration based on discovery mode selected is as below.
   1256 *<br><br>1.If discovery Mode is set as \ref NFC_DISCOVERY_CONFIG then  previous configurations
   1257 * over written by new configurations passed in \ref phLibNfc_sADD_Cfg_t and Discovery wheel
   1258 *restarts with new configurations.
   1259 *<br><br>2.If discovery Mode is set as \ref NFC_DISCOVERY_START or \ref NFC_DISCOVERY_STOP then
   1260 * discovery parameters passed in \ref phLibNfc_sADD_Cfg_t will not be considered and previous
   1261 *configurations still holds good.
   1262 *<br><br>3.If discovery Mode is set as \ref NFC_DISCOVERY_RESUME discovery mode starts the discovery
   1263 *wheel from where it is stopped previously.
   1264 *
   1265 *\b Note: Config types \b NFC_DISCOVERY_START, \b NFC_DISCOVERY_STOP and \b NFC_DISCOVERY_RESUME
   1266 * are not supported currently. It is for future use.
   1267 *
   1268 * \param[in]    DiscoveryMode           Discovery Mode allows to choose between:
   1269 *                                       discovery configuration and start, stop
   1270 *                                       discovery and start discovery (with last
   1271 *                                       set configuration).For  mode details refer  to
   1272 \ref phNfc_eDiscoveryConfigMode_t.
   1273 * \param[in]    sADDSetup               Includes Enable/Disable discovery for
   1274 *                                       each protocol   A,B and F.
   1275 *                                       Details refer to \ref phNfc_sADD_Cfg_t.
   1276 * \param[in]    pConfigDiscovery_RspCb  is called once the discovery wheel
   1277 *                                       configuration is    complete.
   1278 * \param[in]    pContext                Client context which will   be included in
   1279 *                                       callback when the request is completed.
   1280 *
   1281 *
   1282 *\retval NFCSTATUS_PENDING                  Discovery request is in progress and result
   1283 *                                           will be notified via callback later.
   1284 *\retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   1285 *                                           could not be properly interpreted.
   1286 *\retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not initialized.
   1287 *\retval NFCSTATUS_INSUFFICIENT_RESOURCES   Insufficient resource.(Ex: insufficient memory)
   1288 *\retval NFCSTATUS_BUSY                     already discovery in progress
   1289 *                                           or it is already discovered Target  and
   1290 *                                           connected.
   1291 *\retval NFSCSTATUS_SHUTDOWN                Shutdown in progress.
   1292 *\retval NFCSTATUS_FAILED                   Request failed.
   1293 
   1294 *
   1295 *   \note :     During Reader/Initiator mode it is mandatory
   1296 *               to call \ref phLibNfc_RemoteDev_Connect before any transaction can be performed
   1297 *               with the discovered target. Even if the LibNfc client is not
   1298 *               interested in using any of the discovered targets \ref phLibNfc_RemoteDev_Connect
   1299 *               and \ref phLibNfc_RemoteDev_Disconnect should be called to restart the Discovery
   1300 *               wheel.
   1301 *   \sa \ref phLibNfc_RemoteDev_Connect, phLibNfc_RemoteDev_Disconnect.
   1302 
   1303 *\msc
   1304 *LibNfcClient,LibNfc;
   1305 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1306 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1307 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref
   1308 phLibNfc_RemoteDev_NtfRegister"];
   1309 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1310 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1311 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1312 *--- [label="Now discovery wheel configured as requested"];
   1313 *
   1314 *\endmsc
   1315 *
   1316 *\note Response callback parameters details for this interface are as listed below.
   1317 *
   1318 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   1319 * \param[in] status     Status of the response  callback.
   1320 *
   1321 *               \param NFCSTATUS_SUCCESS Discovery   Configuration  successful.
   1322 *               \param NFCSTATUS_SHUTDOWN       Shutdown in progress.
   1323 *               \param NFCSTATUS_FAILED         Request failed.
   1324 */
   1325 
   1326 NFCSTATUS phLibNfc_Mgt_ConfigureDiscovery (phLibNfc_eDiscoveryConfigMode_t  DiscoveryMode,
   1327                                            phLibNfc_sADD_Cfg_t              sADDSetup,
   1328                                            pphLibNfc_RspCb_t                pConfigDiscovery_RspCb,
   1329                                            void*                            pContext
   1330                                            );
   1331 
   1332 
   1333 /**
   1334 * \ingroup  grp_lib_nfc
   1335 * \brief This function is used to to connect to a single Remote Device.
   1336 *
   1337 * This function is called to connect to discovered target.
   1338 * Once notification handler notified sucessfully discovered targets will be available in
   1339 * \ref phLibNfc_RemoteDevList_t .Remote device list contains valid handles for discovered
   1340 * targets .Using this interface LibNfc client can connect to one out of 'n' discovered targets.
   1341 * A new session is started after  connect operation is successful.The session ends with a
   1342 * successful disconnect operation.Connect operation on an already connected tag Reactivates
   1343 * the Tag.This Feature is not Valid for Jewel/Topaz Tags ,and hence a second connect if issued
   1344 * without disconnecting a Jewel/Topaz tag always Fails.
   1345 *
   1346 * \note :In case multiple targets discovered LibNfc client can connect to only one target.
   1347 *
   1348 * \param[in]     hRemoteDevice       Handle of the target device obtained during discovery process.
   1349 *
   1350 * \param[in]    pNotifyConnect_RspCb Client response callback to be to be
   1351 *                                    notified to indicate status of the request.
   1352 *
   1353 * \param[in]    pContext             Client context which will  be included in
   1354 *                                    callback when the request is completed.
   1355 *
   1356 *\retval NFCSTATUS_PENDING           Request initiated, result will be informed via
   1357 *                                    callback.
   1358 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
   1359 *                                    could not be properly interpreted.
   1360 *\retval NFCSTATUS_TARGET_LOST       Indicates target is lost.
   1361 *\retval NFSCSTATUS_SHUTDOWN         shutdown in progress.
   1362 *\retval NFCSTATUS_NOT_INITIALISED   Indicates stack is not yet initialized.
   1363 *\retval NFCSTATUS_INVALID_HANDLE    Target handle is invalid.
   1364 *
   1365 *\retval NFCSTATUS_FAILED            Request failed.
   1366 *
   1367 *
   1368 *\msc
   1369 *LibNfcClient,LibNfc;
   1370 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1371 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1372 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1373 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1374 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1375 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1376 *--- [label="Now Present Tag to be  discovered"];
   1377 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1378 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1379 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
   1380 *
   1381 *\endmsc
   1382 */
   1383 
   1384 NFCSTATUS phLibNfc_RemoteDev_Connect(phLibNfc_Handle                hRemoteDevice,
   1385                                      pphLibNfc_ConnectCallback_t    pNotifyConnect_RspCb,
   1386                                      void*                          pContext
   1387                                      );
   1388 
   1389 #ifdef RECONNECT_SUPPORT
   1390 
   1391 /**
   1392 * \ingroup  grp_lib_nfc
   1393 * \brief This function is used to to connect to NEXT Remote Device.
   1394 *
   1395 * This function is called only if there are more than one remote device is detected.
   1396 * Once notification handler notified sucessfully discovered targets will be available in
   1397 * \ref phLibNfc_RemoteDevList_t .Remote device list contains valid handles for discovered
   1398 * targets .Using this interface LibNfc client can connect to one out of 'n' discovered targets.
   1399 * A new session is started after  connect operation is successful.
   1400 * Similarly, if the user wants to connect to another handle. Libnfc client can select the handle and
   1401 * the previously connected device is replaced by present handle. The session ends with a
   1402 * successful disconnect operation.
   1403 * Re-Connect operation on an already connected tag Reactivates the Tag. This Feature is not
   1404 * Valid for Jewel/Topaz Tags ,and hence a second re-connect if issued
   1405 * without disconnecting a Jewel/Topaz tag always Fails.
   1406 *
   1407 * \note :In case multiple targets discovered LibNfc client can re-connect to only one target.
   1408 *
   1409 * \param[in]     hRemoteDevice       Handle of the target device obtained during discovery process.
   1410 *
   1411 * \param[in]    pNotifyReConnect_RspCb Client response callback to be to be
   1412 *                                    notified to indicate status of the request.
   1413 *
   1414 * \param[in]    pContext             Client context which will  be included in
   1415 *                                    callback when the request is completed.
   1416 *
   1417 *\retval NFCSTATUS_PENDING           Request initiated, result will be informed via
   1418 *                                    callback.
   1419 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
   1420 *                                    could not be properly interpreted.
   1421 *\retval NFCSTATUS_TARGET_LOST       Indicates target is lost.
   1422 *\retval NFSCSTATUS_SHUTDOWN         shutdown in progress.
   1423 *\retval NFCSTATUS_NOT_INITIALISED   Indicates stack is not yet initialized.
   1424 *\retval NFCSTATUS_INVALID_HANDLE    Target handle is invalid.
   1425 *
   1426 *\retval NFCSTATUS_FAILED            Request failed.
   1427 *
   1428 *
   1429 *\msc
   1430 *LibNfcClient,LibNfc;
   1431 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1432 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1433 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1434 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1435 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1436 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1437 *--- [label="Now Present multiple protocol Tag to be  discovered"];
   1438 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1439 *--- [label="TWO remote device information is received, So connect with one handle"];
   1440 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1441 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
   1442 *--- [label="Connect is successful, so transact using this handle. Now if user wants to switch to another handle then call Reconnect "];
   1443 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_ReConnect()",URL="\ref phLibNfc_RemoteDev_ReConnect"];
   1444 *LibNfcClient<-LibNfc [label="pNotifyReConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
   1445 *
   1446 *\endmsc
   1447 */
   1448 NFCSTATUS
   1449 phLibNfc_RemoteDev_ReConnect (
   1450     phLibNfc_Handle                 hRemoteDevice,
   1451     pphLibNfc_ConnectCallback_t     pNotifyReConnect_RspCb,
   1452     void                            *pContext);
   1453 
   1454 #endif /* #ifdef RECONNECT_SUPPORT */
   1455 
   1456 /**
   1457 * \ingroup  grp_lib_nfc
   1458 * \brief This interface allows to perform Read/write operation on remote device.
   1459 *
   1460 * This function allows to send data to and receive data
   1461 * from the target selected by libNfc client.It is also used by the
   1462 * NFCIP1 Initiator while performing a transaction with the NFCIP1 target.
   1463 * The LibNfc client  has to provide the handle of the target and the
   1464 * command in order to communicate with the selected remote device.
   1465 *
   1466 *
   1467 *\param[in] hRemoteDevice       handle of the remote device.This handle to be
   1468 *                               same as as handle obtained for specific remote device
   1469 *                               during device discovery.
   1470 * \param[in] psTransceiveInfo   Information required by transceive  is concealed in
   1471 *                               this structure.It   contains send,receive buffers
   1472 *                               and command specific details.
   1473 *
   1474 *
   1475 * \param[in] pTransceive_RspCb   Callback function for returning the received response
   1476 *                                or error.
   1477 * \param[in]    pContext         Client context which will  be included in
   1478 *                                callback when the request is completed.
   1479 *
   1480 * \retval NFCSTATUS_PENDING      Request    initiated, result will be informed through
   1481 *                                the callback.
   1482 *   \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters could
   1483 *                                           not be properly interpreted or  invalid.
   1484 *   \retval NFCSTATUS_COMMAND_NOT_SUPPORTED The command is not supported.
   1485 *   \retval NFSCSTATUS_SHUTDOWN             shutdown in progress.
   1486 *   \retval NFCSTATUS_TARGET_LOST           Indicates target is lost.
   1487 *   \retval NFCSTATUS_TARGET_NOT_CONNECTED            The Remote Device is not connected.
   1488 *   \retval NFCSTATUS_INVALID_HANDLE        Target  handle is invalid
   1489 *   \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   1490 *   \retval NFCSTATUS_REJECTED              Indicates invalid request.
   1491 *   \retval NFCSTATUS_FAILED                Request failed.
   1492 *
   1493 *\msc
   1494 *LibNfcClient,LibNfc;
   1495 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1496 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1497 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1498 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1499 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1500 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1501 *--- [label="Now Present Tag to be  discovered"];
   1502 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1503 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1504 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
   1505 *--- [label="Now perform transceive operation"];
   1506 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Transceive()",URL="\ref  phLibNfc_RemoteDev_Transceive "];
   1507 *LibNfcClient<-LibNfc   [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
   1508 *
   1509 *\endmsc
   1510 */
   1511 
   1512 NFCSTATUS phLibNfc_RemoteDev_Transceive(phLibNfc_Handle                 hRemoteDevice,
   1513                                         phLibNfc_sTransceiveInfo_t*     psTransceiveInfo,
   1514                                         pphLibNfc_TransceiveCallback_t  pTransceive_RspCb,
   1515                                         void*                           pContext
   1516                                         );
   1517 
   1518 /**
   1519 *\ingroup   grp_lib_nfc
   1520 *\brief Allows to disconnect from already connected target.
   1521 *
   1522 *  The function allows to disconnect from from already connected target. This
   1523 *  function closes the session opened during connect operation.The status of discovery
   1524 *  wheel after disconnection is determined by the \ref phLibNfc_eReleaseType_t parameter.
   1525 *  it is also used to switch from wired to virtual mode in case the discovered
   1526 *  device is SmartMX in wired mode.
   1527 *
   1528 *\param[in]  hRemoteDevice              handle of the target device.This handle to be
   1529 *                                       same as as handle obtained for specific remote device
   1530 *                                       during device discovery.
   1531 * \param[in] ReleaseType                Release mode to be  used while
   1532 *                                       disconnecting from target.Refer \ref phLibNfc_eReleaseType_t
   1533 *                                       for possible release types.
   1534 *\param[in] pDscntCallback              Client response callback to be  to be notified
   1535 to indicate status of the request.
   1536 * \param[in]    pContext                Client context which will   be included in
   1537 *                                       callback when the request is completed.
   1538 
   1539 *\retval    NFCSTATUS_PENDING                Request initiated,  result will be informed through
   1540 the callback.
   1541 *\retval    NFCSTATUS_INVALID_PARAMETER      One or  more of the supplied parameters could not be
   1542 *                                            properly interpreted.
   1543 *\retval    NFCSTATUS_TARGET_NOT_CONNECTED   The Remote Device is not connected.
   1544 *\retval    NFCSTATUS_NOT_INITIALISED        Indicates stack is not yet initialized.
   1545 * \retval   NFCSTATUS_INVALID_HANDLE         Target  handle is invalid.
   1546 *\retval    NFSCSTATUS_SHUTDOWN              Shutdown in progress.
   1547 *\retval    NFCSTATUS_REJECTED               Indicates previous disconnect in progress.
   1548 * \retval   NFCSTATUS_BUSY                   Indicates can not disconnect due to outstanding transaction in progress.
   1549 * \retval   NFCSTATUS_FAILED                 Request failed.
   1550 
   1551 *
   1552 *
   1553 *
   1554 *\msc
   1555 *LibNfcClient,LibNfc;
   1556 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1557 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1558 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1559 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1560 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1561 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1562 *--- [label="Now Present Tag to be  discovered"];
   1563 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1564 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1565 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
   1566 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Transceive()",URL="\ref  phLibNfc_RemoteDev_Transceive"];
   1567 *LibNfcClient<-LibNfc   [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
   1568 *--- [label="Once transceive is completed Now disconnect"];
   1569 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Disconnect()",URL="\ref  phLibNfc_RemoteDev_Disconnect"];
   1570 *LibNfcClient<-LibNfc   [label="pDscntCallback",URL="\ref pphLibNfc_RspCb_t"];
   1571 *
   1572 *\endmsc
   1573 */
   1574 NFCSTATUS phLibNfc_RemoteDev_Disconnect( phLibNfc_Handle                 hRemoteDevice,
   1575                                         phLibNfc_eReleaseType_t          ReleaseType,
   1576                                         pphLibNfc_DisconnectCallback_t   pDscntCallback,
   1577                                         void*                            pContext
   1578 										);
   1579 
   1580 
   1581 
   1582 /**
   1583 * \ingroup  grp_lib_nfc
   1584 *\brief This interface unregisters notification handler for target discovery.
   1585 *
   1586 * This  function unregisters the listener which has been registered with
   1587 * phLibNfc_RemoteDev_NtfUnregister() before. After  this call the callback
   1588 * function  won't be called anymore. If nothing is  registered the
   1589 * function  still succeeds
   1590 * \retval NFCSTATUS_SUCCESS          callback unregistered.
   1591 * \retval NFCSTATUS_SHUTDOWN         Shutdown in progress.
   1592 *\retval  NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
   1593 *
   1594 *\msc
   1595 *LibNfcClient,LibNfc;
   1596 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1597 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1598 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1599 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1600 *--- [label="Perform operations"];
   1601 *--- [label="In case required unregister now"];
   1602 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfUnregister()",URL="\ref phLibNfc_RemoteDev_NtfUnregister"];
   1603 *
   1604 *\endmsc
   1605 */
   1606 
   1607 NFCSTATUS phLibNfc_RemoteDev_NtfUnregister(void);
   1608 
   1609 /**
   1610 * \ingroup  grp_lib_nfc
   1611 * \brief Check  for target presence.
   1612 * This  function checks ,given target is present in RF filed or not.
   1613 * Client can make  use of this API to check  periodically discovered
   1614 * tag is present in RF field or not.
   1615 *
   1616 *
   1617 *\param[in]  hRemoteDevice          handle of the target device.This handle to be
   1618 *                                   same as as handle obtained for specific remote device
   1619 *                                   during device discovery.
   1620 * \param[in] pPresenceChk_RspCb     callback function called on completion  of the
   1621 *                                   presence check or in case an error has occurred.
   1622 * \param[in]    pContext            Client context which will   be included in
   1623 *                                   callback when the request is completed.
   1624 *
   1625 * \retval  NFCSTATUS_PENDING        presence check  started. Status will be notified
   1626 *                                   via callback.
   1627 *
   1628 * \retval  NFCSTATUS_NOT_INITIALISED        Indicates stack is not initialized.
   1629 * \retval  NFCSTATUS_INVALID_PARAMETER      One or more of the supplied parameters could
   1630 *                                           not be properly interpreted.
   1631 * \retval  NFCSTATUS_TARGET_NOT_CONNECTED   The Remote Device is not connected.
   1632 * \retval  NFCSTATUS_INVALID_HANDLE         Target  handle is invalid
   1633 * \retval  NFCSTATUS_SHUTDOWN               Shutdown in progress.
   1634 * \retval  NFCSTATUS_FAILED                 Request failed.
   1635 *
   1636 *
   1637 *\msc
   1638 *LibNfcClient,LibNfc;
   1639 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1640 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1641 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1642 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1643 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1644 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1645 *--- [label="Now Present Tag to be  discovered"];
   1646 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1647 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1648 *LibNfcClient<-LibNfc   [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1649 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_CheckPresence()",URL="\ref phLibNfc_RemoteDev_CheckPresence"];
   1650 *LibNfcClient<-LibNfc   [label="pPresenceChk_RspCb",URL="\ref   pphLibNfc_RspCb_t"];
   1651 *
   1652 *\endmsc
   1653 *
   1654 *\note Response callback parameters details for this interface are as listed below.
   1655 *
   1656 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   1657 * \param[in] status     Status of the response  callback.
   1658 *
   1659 *                  \param NFCSTATUS_SUCCESS          Successful,indicates tag is present in RF field.
   1660 *                  \param NFCSTATUS_TARGET_LOST Indicates target is lost.
   1661 *                  \param NFCSTATUS_SHUTDOWN    Shutdown in progress.
   1662 *                  \param NFCSTATUS_FAILED      Request failed.
   1663 *
   1664 */
   1665 NFCSTATUS phLibNfc_RemoteDev_CheckPresence( phLibNfc_Handle     hRemoteDevice,
   1666                                            pphLibNfc_RspCb_t    pPresenceChk_RspCb,
   1667                                            void*                pContext
   1668                                            );
   1669 
   1670 /**
   1671 * \ingroup  grp_lib_nfc
   1672 *\brief Allows  to check connected tag is NDEF compliant or not.
   1673 * This function allows  to validate connected tag is NDEF compliant or  not.
   1674 *
   1675 *\param[in] hRemoteDevice       handle of the remote device.This handle to be
   1676 *                               same as as handle obtained for specific remote device
   1677 *                               during device discovery.
   1678 *\param[in] pCheckNdef_RspCb    Response callback defined by the caller.
   1679 *\param[in] pContext            Client context which will   be included in
   1680 *                               callback when the request is completed.
   1681 *
   1682 * \retval NFCSTATUS_PENDING            The action has been successfully triggered.
   1683 * \retval NFCSTATUS_INVALID_PARAMETER  At least one parameter of the function
   1684 *                                      is invalid.
   1685 * \retval NFCSTATUS_TARGET_LOST        Indicates target is lost
   1686 * \retval NFCSTATUS_TARGET_NOT_CONNECTED         The Remote Device is not connected.
   1687 * \retval NFCSTATUS_INVALID_HANDLE     Target   handle is invalid
   1688 * \retval NFCSTATUS_SHUTDOWN           Shutdown in progress.
   1689 * \retval  NFCSTATUS_FAILED            Request failed.
   1690 *
   1691 *
   1692 *\msc
   1693 *LibNfcClient,LibNfc;
   1694 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1695 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1696 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1697 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1698 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1699 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1700 *--- [label="Now Present NDEF complaint Tag Type"];
   1701 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1702 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1703 *LibNfcClient<-LibNfc   [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1704 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
   1705 *LibNfcClient<-LibNfc   [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1706 *
   1707 *\endmsc
   1708 *
   1709 *\note Response callback parameters details for this interface are as listed below.
   1710 *
   1711 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   1712 * \param[in] status     Status of the response  callback.
   1713 *
   1714 *                  \param NFCSTATUS_SUCCESS             Successful and tag is NDEF compliant .
   1715 *                  \param NFCSTATUS_TARGET_LOST         NDEF check operation is failed because of target is	**														lost.
   1716 *                  \param NFCSTATUS_SHUTDOWN            Shutdown in progress.
   1717 *                  \param NFCSTATUS_ABORTED             Aborted due to disconnect operation in between.
   1718 *                  \param NFCSTATUS_FAILED              Request failed.
   1719 */
   1720 
   1721 NFCSTATUS phLibNfc_Ndef_CheckNdef(phLibNfc_Handle              hRemoteDevice,
   1722                                   pphLibNfc_ChkNdefRspCb_t     pCheckNdef_RspCb,
   1723                                   void*                        pContext);
   1724 
   1725 /**
   1726 * \ingroup  grp_lib_nfc
   1727 * \brief Read NDEF  message from a Tag.
   1728 * This  function reads an NDEF message from already connected tag.
   1729 * the NDEF  message is read starting after the position of the last read operation
   1730 * of the same tag during current session.
   1731 * If it's FALSE the NDEF message is read from starting  of the NDEF message.
   1732 * If the call returns with NFCSTATUS_PENDING , a response callback pNdefRead_RspCb is
   1733 * called ,when the read operation is complete.
   1734 *
   1735 *\note Before issuing NDEF read operation LibNfc client should perform NDEF check operation
   1736 * using \ref phLibNfc_Ndef_CheckNdef interface.
   1737 * If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
   1738 * phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
   1739 *
   1740 *\param[in]  hRemoteDevice          handle of the remote device.This handle to be
   1741 *                                   same as as handle obtained for specific remote device
   1742 *                                   during device discovery.
   1743 *   \param[in]  psRd                Pointer to  the  read buffer info.
   1744 *   \param[in]  Offset              Reading Offset  : phLibNfc_Ndef_EBegin means from the
   1745 *                                   beginning, phLibNfc_Ndef_ECurrent means from the
   1746 *                                   current offset.
   1747 *   \param[in]  pNdefRead_RspCb     Response callback defined by the caller.
   1748 *   \param[in]  pContext            Client context which will   be included in
   1749 *                                   callback when the request is completed.
   1750 *
   1751 * \retval NFCSTATUS_SUCCESS             NDEF read operation successful.
   1752 * \retval NFCSTATUS_PENDING             Request accepted and started
   1753 * \retval NFCSTATUS_SHUTDOWN            Shutdown in progress
   1754 * \retval NFCSTATUS_INVALID_HANDLE      Target  handle is invalid
   1755 * \retval NFCSTATUS_NOT_INITIALISED     Indicates stack is not yet initialized.
   1756 * \retval NFCSTATUS_INVALID_PARAMETER   One or more of the supplied parameters could not
   1757 *                                       be properly interpreted.
   1758 * \retval NFCSTATUS_TARGET_NOT_CONNECTED          The Remote Device is not connected.
   1759 * \retval NFCSTATUS_FAILED              Read operation failed since tag does not contain NDEF data.
   1760 * \retval NFCSTATUS_NON_NDEF_COMPLIANT  Tag is not Ndef Compliant.
   1761 * \param NFCSTATUS_REJECTED             Rejected due to NDEF read issued on non
   1762 *                                       ,or Ndef check has not been performed
   1763 *                                       before the readNDEF tag.
   1764 *
   1765 *\msc
   1766 *LibNfcClient,LibNfc;
   1767 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1768 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1769 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1770 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1771 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1772 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1773 *--- [label="Now Present NDEF complaint Tag Type"];
   1774 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1775 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1776 *LibNfcClient<-LibNfc   [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1777 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
   1778 *LibNfcClient<-LibNfc   [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1779 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_Read()",URL="\ref phLibNfc_Ndef_Read "];
   1780 *LibNfcClient<-LibNfc   [label="pNdefRead_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1781 *
   1782 *\endmsc
   1783 *
   1784 *\note Response callback parameters details for this interface are as listed below.
   1785 *
   1786 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   1787 * \param[in] status     Status of the response  callback.
   1788 *
   1789 *                  \param NFCSTATUS_SUCCESS             NDEF read operation successful.
   1790 *                  \param NFCSTATUS_SHUTDOWN            Shutdown in progress.
   1791 *                  \param NFCSTATUS_ABORTED             Aborted due to disconnect operation in between.
   1792 *                  \param NFCSTATUS_FAILED              Request failed.
   1793 */
   1794 NFCSTATUS phLibNfc_Ndef_Read(phLibNfc_Handle                   hRemoteDevice,
   1795                             phNfc_sData_t*                     psRd,
   1796                             phLibNfc_Ndef_EOffset_t            Offset,
   1797                             pphLibNfc_RspCb_t                  pNdefRead_RspCb,
   1798                             void*                              pContext
   1799                             );
   1800 /**
   1801 **  \ingroup grp_lib_nfc
   1802 *
   1803 * \brief Write  NDEF data to  NFC tag.
   1804 *
   1805 * This function allows the client to write a NDEF data to already connected NFC tag.
   1806 * Function writes a complete NDEF   message to a tag. If a NDEF message already
   1807 * exists in the tag, it will be overwritten. When the transaction is complete,
   1808 * a notification callback is notified.
   1809 *
   1810 *\note Before issuing NDEF write operation LibNfc client should perform NDEF check operation
   1811 * using \ref phLibNfc_Ndef_CheckNdef interface.
   1812 *
   1813 *\param[in] hRemoteDevice           handle of the remote device.This handle to be
   1814 *                                   same as as handle obtained for specific remote device
   1815 *                                   during device discovery.
   1816 *\param[in] psWr                    Ndef    Buffer to write. If NdefMessageLen is set to 0
   1817 *                                   and pNdefMessage    = NULL, the NFC library will erase
   1818 *                                   tag internally.
   1819 *\param[in] pNdefWrite_RspCb        Response callback defined by the caller.
   1820 *\param[in] pContext                Client context which will   be included in
   1821 *                                   callback when the request is completed.
   1822 *
   1823 *\note If \ref phNfc_sData_t.NdefMessageLen is 0 bytes,  this function will erase all
   1824 *current NDEF data present in the tag. Any non-zero length buffer size
   1825 *will attempt to write  NEDF data onto the tag.
   1826 * If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
   1827 * phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
   1828 *
   1829 *
   1830 * \retval NFCSTATUS_PENDING             Request accepted and started.
   1831 * \retval NFCSTATUS_SHUTDOWN            Shutdown in progress.
   1832 * \retval NFCSTATUS_INVALID_HANDLE      Target  handle is invalid.
   1833 * \retval NFCSTATUS_NOT_INITIALISED     Indicates stack is not yet initialized.
   1834 * \retval NFCSTATUS_INVALID_PARAMETER   One or more of the supplied parameters could not
   1835 *                                       be  properly interpreted.
   1836 * \retval NFCSTATUS_NON_NDEF_COMPLIANT  Tag is not Ndef Compliant.
   1837 * \retval NFCSTATUS_TARGET_NOT_CONNECTED            The Remote Device is not connected.
   1838 * \retval NFCSTATUS_REJECTED            Rejected due to NDEF write issued without
   1839 *                                       performing a CheckNdef().
   1840 * \retval NFCSTATUS_FAILED              operation failed.
   1841 *
   1842 *\msc
   1843 *LibNfcClient,LibNfc;
   1844 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1845 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1846 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1847 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1848 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1849 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1850 *--- [label="Now Present NDEF Tag "];
   1851 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1852 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1853 *LibNfcClient<-LibNfc   [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1854 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
   1855 *LibNfcClient<-LibNfc   [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1856 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_Write()",URL="\ref phLibNfc_Ndef_Write "];
   1857 *LibNfcClient<-LibNfc   [label="pNdefWrite_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1858 *
   1859 *\endmsc
   1860 *
   1861 *\note Response callback parameters details for this interface are as listed below.
   1862 *
   1863 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   1864 * \param[in] status     Status of the response  callback.
   1865 *
   1866 *                  \param NFCSTATUS_SUCCESS                  NDEF write operation is successful.
   1867 *                  \param NFCSTATUS_SHUTDOWN            Shutdown in progress.
   1868 *                  \param NFCSTATUS_ABORTED,            Aborted due to disconnect operation in between.
   1869 *                  \param NFCSTATUS_NOT_ENOUGH_MEMORY   Requested no of bytes to be writen exceeds size of the memory available on the tag.
   1870 *                  \param NFCSTATUS_FAILED              Request failed.
   1871 */
   1872 
   1873 NFCSTATUS phLibNfc_Ndef_Write (phLibNfc_Handle          hRemoteDevice,
   1874                                phNfc_sData_t*           psWr,
   1875                                pphLibNfc_RspCb_t        pNdefWrite_RspCb,
   1876                                void*                    pContext
   1877                                );
   1878 
   1879 
   1880 
   1881 /**
   1882 * \ingroup grp_lib_nfc
   1883 *
   1884 * \brief Format target.
   1885 *
   1886 * This function allows the LibNfc client to perform  NDEF formating operation on discovered target.
   1887 This function formats given target
   1888 *
   1889 *\note
   1890 * <br>1. Prior to formating it is recommended to perform NDEF check using \ref phLibNfc_Ndef_CheckNdef interface.
   1891 * <br>2. formatting feature supported only for MIFARE Std,MIFARE UL and Desfire tag types.
   1892 * If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
   1893 * phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
   1894 *
   1895 *\param[in]  hRemoteDevice          handle of the remote device.This handle to be
   1896 *                                   same as as handle obtained for specific remote device
   1897 *                                   during device discovery.
   1898 *\param[in] pScrtKey                info containing the secret key data
   1899 *                                   and  Secret key buffer length.
   1900 *
   1901 *\param[in] pNdefformat_RspCb       Response    callback defined by the caller.
   1902 *\param[in] pContext                Client context which will   be included in
   1903 *                                   callback when the request is completed.
   1904 *
   1905 *
   1906 * \retval NFCSTATUS_PENDING                 Request accepted and started.
   1907 * \retval NFCSTATUS_SHUTDOWN                Shutdown in progress.
   1908 * \retval NFCSTATUS_INVALID_HANDLE          Target  handle is invalid.
   1909 * \retval NFCSTATUS_NOT_INITIALISED         Indicates stack is not yet initialized.
   1910 * \retval NFCSTATUS_INVALID_PARAMETER       One or more of the supplied parameters could not
   1911 *                                           be  properly interpreted.
   1912 * \retval NFCSTATUS_TARGET_NOT_CONNECTED    The Remote Device is not connected.
   1913 * \retval NFCSTATUS_FAILED                  operation failed.
   1914 * \retval NFCSTATUS_REJECTED                Tag is already  formatted one.
   1915 *
   1916 *\msc
   1917 *LibNfcClient,LibNfc;
   1918 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1919 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1920 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1921 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1922 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1923 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1924 *--- [label="Now Present non NDEF Tag "];
   1925 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1926 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1927 *LibNfcClient<-LibNfc   [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1928 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
   1929 *LibNfcClient<-LibNfc   [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1930 *--- [label="Tag found to be non NDEF compliant ,now format it"];
   1931 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_FormatNdef()",URL="\ref  phLibNfc_RemoteDev_FormatNdef   "];
   1932 *LibNfcClient<-LibNfc   [label="pNdefformat_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1933 *
   1934 *\endmsc
   1935 *
   1936 *\note Response callback parameters details for this interface are as listed below.
   1937 *
   1938 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   1939 * \param[in] status     Status of the response  callback.
   1940 *
   1941 *                  \param NFCSTATUS_SUCCESS                  NDEF formatting operation is successful.
   1942 *                  \param NFCSTATUS_SHUTDOWN            Shutdown in progress.
   1943 *                  \param NFCSTATUS_ABORTED,            Aborted due to disconnect operation in between.
   1944 *                  \param NFCSTATUS_FAILED              Request failed.
   1945 */
   1946 
   1947 NFCSTATUS phLibNfc_RemoteDev_FormatNdef(phLibNfc_Handle         hRemoteDevice,
   1948                                         phNfc_sData_t*          pScrtKey,
   1949                                         pphLibNfc_RspCb_t       pNdefformat_RspCb,
   1950                                         void*                   pContext
   1951                                         );
   1952 
   1953 #ifdef LIBNFC_READONLY_NDEF
   1954 /**
   1955 * \ingroup grp_lib_nfc
   1956 *
   1957 * \brief To convert a already formatted NDEF READ WRITE tag to READ ONLY.
   1958 *
   1959 * This function allows the LibNfc client to convert a already formatted NDEF READ WRITE
   1960 * tag to READ ONLY on discovered target.
   1961 *
   1962 *\note
   1963 * <br>1. Prior to formating it is recommended to perform NDEF check using \ref phLibNfc_Ndef_CheckNdef interface.
   1964 * <br>2. READ ONLY feature supported only for MIFARE UL and Desfire tag types.
   1965 * If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
   1966 * phLibNfc_RemoteDev_CheckPresence to find, its communication error or target lost.
   1967 *
   1968 *\param[in] hRemoteDevice           handle of the remote device.This handle to be
   1969 *                                   same as as handle obtained for specific remote device
   1970 *                                   during device discovery.
   1971 *\param[in] pNdefReadOnly_RspCb     Response callback defined by the caller.
   1972 *\param[in] pContext                Client context which will be included in
   1973 *                                   callback when the request is completed.
   1974 *
   1975 *
   1976 * \retval NFCSTATUS_PENDING                 Request accepted and started.
   1977 * \retval NFCSTATUS_SHUTDOWN                Shutdown in progress.
   1978 * \retval NFCSTATUS_INVALID_HANDLE          Target  handle is invalid.
   1979 * \retval NFCSTATUS_NOT_INITIALISED         Indicates stack is not yet initialized.
   1980 * \retval NFCSTATUS_INVALID_PARAMETER       One or more of the supplied parameters could not
   1981 *                                           be  properly interpreted.
   1982 * \retval NFCSTATUS_TARGET_NOT_CONNECTED    The Remote Device is not connected.
   1983 * \retval NFCSTATUS_FAILED                  operation failed.
   1984 * \retval NFCSTATUS_REJECTED                Tag is already  formatted one.
   1985 *
   1986 *\msc
   1987 *LibNfcClient,LibNfc;
   1988 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   1989 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   1990 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   1991 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   1992 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   1993 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1994 *--- [label="Now Present NDEF Tag "];
   1995 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   1996 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   1997 *LibNfcClient<-LibNfc   [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   1998 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
   1999 *LibNfcClient<-LibNfc   [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2000 *--- [label="Tag found to be NDEF compliant ,now convert the tag to read only"];
   2001 *LibNfcClient=>LibNfc   [label="phLibNfc_ConvertToReadOnlyNdef()",URL="\ref  phLibNfc_ConvertToReadOnlyNdef   "];
   2002 *LibNfcClient<-LibNfc   [label="pNdefReadOnly_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2003 *
   2004 *\endmsc
   2005 *
   2006 *\note Response callback parameters details for this interface are as listed below.
   2007 *
   2008 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   2009 * \param[in] status     Status of the response  callback.
   2010 *
   2011 *                  \param NFCSTATUS_SUCCESS             Converting the tag to READ ONLY NDEF is successful.
   2012 *                  \param NFCSTATUS_SHUTDOWN            Shutdown in progress.
   2013 *                  \param NFCSTATUS_ABORTED,            Aborted due to disconnect operation in between.
   2014 *                  \param NFCSTATUS_FAILED              Request failed.
   2015 */
   2016 
   2017 NFCSTATUS phLibNfc_ConvertToReadOnlyNdef (phLibNfc_Handle       hRemoteDevice,
   2018                                         pphLibNfc_RspCb_t       pNdefReadOnly_RspCb,
   2019                                         void*                   pContext
   2020                                         );
   2021 #endif /* #ifdef LIBNFC_READONLY_NDEF */
   2022 
   2023 /**
   2024 * \ingroup grp_lib_nfc
   2025 * \brief <b>Search for NDEF Record type</b>.
   2026 *
   2027 *  This function allows  LibNfc client to search NDEF content based on TNF value and type \n
   2028 *
   2029 *This API allows to find NDEF records based on  RTD (Record Type Descriptor) info.
   2030 *LibNfc internally parses NDEF content based registration type registered.
   2031 *In case there is match LibNfc notifies LibNfc client with NDEF information details.
   2032 *LibNfc client can search a new NDEF registration type once the previous call is handled.
   2033 *
   2034 *\param[in]     hRemoteDevice       Handle of the remote device.This handle to be
   2035 *                                   same as as handle obtained for specific remote device
   2036 *                                   during device discovery.
   2037 *\param[in]     psSrchTypeList      List of NDEF records to be looked in based on TNF value and type.
   2038 *                                   For NDEF search type refer to \ref phLibNfc_Ndef_SrchType.
   2039 *                                   If this set to NULL then it means that libNfc client interested in
   2040 *                                   all possible NDEF records.
   2041 *
   2042 *\param[in]     uNoSrchRecords      Indicates no of NDEF records in requested list as mentioned
   2043 *                                   in psSrchTypeList.
   2044 *\param[in]     pNdefNtfRspCb       Response callback defined by the caller.
   2045 *\param[in]     pContext            Client context which will   be included in
   2046 *                                   callback when callback is notified.
   2047 *
   2048 *
   2049 * \retval NFCSTATUS_SUCCESS             Indicates NDEF notification registration successful.
   2050 * \retval NFCSTATUS_SHUTDOWN            Shutdown in progress.
   2051 * \retval  NFCSTATUS_NOT_INITIALISED    Indicates stack is not yet initialized.
   2052 * \retval NFCSTATUS_INVALID_HANDLE      Target  handle is invalid.
   2053 * \retval NFCSTATUS_INVALID_PARAMETER   One or more of the supplied parameters could not
   2054 *                                       be  properly interpreted.
   2055 * \retval NFCSTATUS_TARGET_NOT_CONNECTED          The Remote Device is not connected.
   2056 * \retval NFCSTATUS_FAILED              operation failed.
   2057 * \retval NFCSTATUS_BUSY                Previous request in progress can not accept new request.
   2058 *
   2059 * \retval NFCSTATUS_ABORTED             Aborted due to disconnect request in between.
   2060 *\msc
   2061 *LibNfcClient,LibNfc;
   2062 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   2063 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   2064 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   2065 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   2066 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
   2067 *LibNfcClient<-LibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2068 *--- [label="Now Present NDEF Tag "];
   2069 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   2070 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   2071 *LibNfcClient<-LibNfc   [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2072 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
   2073 *LibNfcClient<-LibNfc   [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2074 *LibNfcClient=>LibNfc   [label="phLibNfc_Ndef_SearchNdefContent()",URL="\ref phLibNfc_Ndef_SearchNdefContent"];
   2075 *LibNfcClient<-LibNfc   [label="pNdefNtfRspCb",URL="\ref pphLibNfc_Ndef_Search_RspCb_t()"];
   2076 *\endmsc
   2077 *
   2078 *\note Response callback parameters details for this interface are as listed below.
   2079 *
   2080 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   2081 * \param[in] status     Status of the response  callback.
   2082 *
   2083 */
   2084 NFCSTATUS phLibNfc_Ndef_SearchNdefContent(
   2085                                 phLibNfc_Handle                 hRemoteDevice,
   2086                                 phLibNfc_Ndef_SrchType_t*       psSrchTypeList,
   2087                                 uint8_t                         uNoSrchRecords,
   2088                                 pphLibNfc_Ndef_Search_RspCb_t   pNdefNtfRspCb,
   2089                                 void *                          pContext
   2090                                 );
   2091 
   2092 
   2093 
   2094 
   2095 /**
   2096 * \ingroup grp_lib_nfc
   2097 * \brief <b> Interface used to receive data from initiator at target side during P2P communication</b>.
   2098 *
   2099 *This function  Allows the NFC-IP1 target to retrieve data/commands coming from the
   2100 *Initiator.Once this function is called by LibNfc client on target side it waits for
   2101 *receiving data from initiator.It is used by libNfc client which acts as target during P2P
   2102 *communication.
   2103 *
   2104 *\note : Once this API is called,its mandatory to wait for receive
   2105 *\ref pphLibNfc_Receive_RspCb_t callback notification,before calling any other
   2106 *API.Only function allowed is \ref phLibNfc_Mgt_DeInitialize.
   2107 *
   2108 *  \param[in]     hRemoteDevice         Peer handle obtained during device discovery process.
   2109 *
   2110 *  \param[in]     pReceiveRspCb         Callback function called after receiving
   2111 *                                       the data or in case an error has
   2112 *                                       has occurred.
   2113 *
   2114 *  \param[in]     pContext              Upper layer context to be returned
   2115 *                                       in the callback.
   2116 *
   2117 *  \retval NFCSTATUS_PENDING            Receive operation is in progress.
   2118 *  \retval NFCSTATUS_INVALID_PARAMETER  One or more of the supplied parameters
   2119 *                                       could not be properly interpreted.
   2120 * \retval  NFCSTATUS_NOT_INITIALISED    Indicates stack is not yet initialized.
   2121 * \retval  NFCSTATUS_SHUTDOWN           Shutdown in progress.
   2122 * \retval  NFCSTATUS_INVALID_DEVICE     The device has been disconnected meanwhile.
   2123 * \retval  NFCSTATUS_DESELECTED         Receive operation is not possible due to
   2124 *                                       initiator issued disconnect or intiator
   2125 *                                       physically removed from the RF field.
   2126 *
   2127 *\retval   NFCSTATUS_REJECTED           Indicates invalid request.
   2128 *\retval   NFCSTATUS_FAILED             Request failed.
   2129 *
   2130 *\msc
   2131 *P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
   2132 *--- [label="stack is intialised and P2P notification handler registered alredy"];
   2133 *P2PTargetClient=>P2PTargetLibNfc   [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref    phLibNfc_Mgt_SetP2P_ConfigParams"];
   2134 *P2PTargetClient<<P2PTargetLibNfc   [label="NFCSTATUS_PENDING"];
   2135 *P2PTargetClient<-P2PTargetLibNfc   [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
   2136 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref    phLibNfc_Mgt_SetP2P_ConfigParams"];
   2137 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2138 *P2PInitiatorClient<-InitiatorLibNfc    [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
   2139 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref  phLibNfc_Mgt_ConfigureDiscovery"];
   2140 *P2PTargetClient<<P2PTargetLibNfc   [label="NFCSTATUS_PENDING"];
   2141 *P2PTargetClient<-P2PTargetLibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2142 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref    phLibNfc_Mgt_ConfigureDiscovery"];
   2143 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2144 *P2PInitiatorClient<-InitiatorLibNfc    [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2145 *--- [label="Place Initiator and target closely"];
   2146 *P2PInitiatorClient<-InitiatorLibNfc    [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   2147 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   2148 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2149 *P2PInitiatorClient<-InitiatorLibNfc    [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
   2150 *P2PTargetClient<-P2PTargetLibNfc   [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   2151 *--- [label="On connect target must be immediately ready to receive data from initiator"];
   2152 *P2PTargetClient=>P2PTargetLibNfc   [label="phLibNfc_RemoteDev_Receive()",URL="\ref phLibNfc_RemoteDev_Receive"];
   2153 *--- [label="Now target waits to receive data from intiator"];
   2154 *--- [label="Send data from initiator now"];
   2155 *P2PInitiatorClient=>InitiatorLibNfc   [label="phLibNfc_RemoteDev_Transceive()",URL="\ref  phLibNfc_RemoteDev_Transceive "];
   2156 *P2PInitiatorClient<-InitiatorLibNfc   [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
   2157 *--- [label="Now data arrived at target side"];
   2158 *P2PTargetClient<-P2PTargetLibNfc   [label="pReceiveRspCb",URL="\ref    pphLibNfc_Receive_RspCb_t"];
   2159 \endmsc
   2160 *\note Response callback parameters details for this interface are as listed below.
   2161 *
   2162 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   2163 * \param[in] status     Status of the response  callback.
   2164 *
   2165 *           \param NFCSTATUS_SUCCESS             Receive operation  successful.
   2166 *           \param NFCSTATUS_SHUTDOWN       Receive operation failed because Shutdown in progress.
   2167 *           \param NFCSTATUS_ABORTED        Aborted due to initiator issued disconnect request.
   2168 *                                           or intiator removed physically from the RF field.
   2169 *                                           This status code reported,to indicate P2P session
   2170 *                                           closed and send and receive requests not allowed
   2171 *                                           any more unless new session is started.
   2172 *           \param  NFCSTATUS_DESELECTED    Receive operation is not possible due to
   2173 *                                           initiator issued disconnect or intiator
   2174 *                                           physically removed from the RF field.
   2175 */
   2176 extern
   2177 NFCSTATUS
   2178 phLibNfc_RemoteDev_Receive( phLibNfc_Handle            hRemoteDevice,
   2179                            pphLibNfc_Receive_RspCb_t   pReceiveRspCb,
   2180                            void*                       pContext
   2181                            );
   2182 
   2183 
   2184 
   2185 
   2186 
   2187 /**
   2188 * \ingroup grp_lib_nfc
   2189 * \brief <b>Interface used to send data from target to initiator during P2P communication</b>.
   2190 *
   2191 *This function  Allows the NFC-IP1 target to send data to Initiator,in response to packet received
   2192 *from initiator during P2P communication.It is must prior to send request target has received
   2193 *data from initiator using \ref phLibNfc_RemoteDev_Receive interface.
   2194 *
   2195 *
   2196 *  \param[in]     hRemoteDevice        Peer handle obtained during device discovery process.
   2197 *
   2198 *  \param[in]     pTransferData         Data and the length of the data to be
   2199 *                                       transferred.
   2200 *  \param[in]     pSendRspCb            Callback function called on completion
   2201 *                                       of the NfcIP sequence or in case an
   2202 *                                       error has occurred.
   2203 *
   2204 *  \param[in]     pContext              Upper layer context to be returned in
   2205 *                                       the callback.
   2206 *
   2207 **  \retval NFCSTATUS_PENDING            Send operation is in progress.
   2208 *  \retval NFCSTATUS_INVALID_PARAMETER  One or more of the supplied parameters
   2209 *                                       could not be properly interpreted.
   2210 * \retval  NFCSTATUS_NOT_INITIALISED    Indicates stack is not yet initialized.
   2211 * \retval  NFCSTATUS_SHUTDOWN           Shutdown in progress.
   2212 *  \retval NFCSTATUS_INVALID_DEVICE     The device has been disconnected meanwhile.
   2213 * \retval  NFCSTATUS_BUSY               Previous request in progress can not accept new request.
   2214 * \retval  NFCSTATUS_DESELECTED         Receive operation is not possible due to
   2215 *                                       initiator issued disconnect or intiator
   2216 *                                       physically removed from the RF field.
   2217 *\retval   NFCSTATUS_REJECTED           Indicates invalid request.
   2218 *\retval   NFCSTATUS_FAILED             Request failed.
   2219 *
   2220 *\msc
   2221 *P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
   2222 *--- [label="stack is intialised and P2P notification handler registered alredy"];
   2223 *P2PTargetClient=>P2PTargetLibNfc   [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref    phLibNfc_Mgt_SetP2P_ConfigParams"];
   2224 *P2PTargetClient<<P2PTargetLibNfc   [label="NFCSTATUS_PENDING"];
   2225 *P2PTargetClient<-P2PTargetLibNfc   [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
   2226 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref    phLibNfc_Mgt_SetP2P_ConfigParams"];
   2227 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2228 *P2PInitiatorClient<-InitiatorLibNfc    [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
   2229 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref  phLibNfc_Mgt_ConfigureDiscovery"];
   2230 *P2PTargetClient<<P2PTargetLibNfc   [label="NFCSTATUS_PENDING"];
   2231 *P2PTargetClient<-P2PTargetLibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2232 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref    phLibNfc_Mgt_ConfigureDiscovery"];
   2233 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2234 *P2PInitiatorClient<-InitiatorLibNfc    [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2235 *--- [label="Place Initiator and target closely"];
   2236 *P2PInitiatorClient<-InitiatorLibNfc    [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   2237 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   2238 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2239 *P2PInitiatorClient<-InitiatorLibNfc    [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
   2240 *P2PTargetClient<-P2PTargetLibNfc   [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   2241 *--- [label="On connect target must be immediately ready to receive data from initiator"];
   2242 *P2PTargetClient=>P2PTargetLibNfc   [label="phLibNfc_RemoteDev_Receive()",URL="\ref phLibNfc_RemoteDev_Receive"];
   2243 *--- [label="Now target waits to receive data from intiator"];
   2244 *--- [label="Send data from initiator now"];
   2245 *P2PInitiatorClient=>InitiatorLibNfc   [label="phLibNfc_RemoteDev_Transceive()",URL="\ref  phLibNfc_RemoteDev_Transceive "];
   2246 *--- [label="Now data arrived at target side"];
   2247 *P2PTargetClient<-P2PTargetLibNfc   [label="pReceiveRspCb",URL="\ref    pphLibNfc_Receive_RspCb_t"];
   2248 *--- [label="Now send data from target"];
   2249 *P2PTargetClient=>P2PTargetLibNfc   [label="phLibNfc_RemoteDev_Send()",URL="\ref    phLibNfc_RemoteDev_Send"];
   2250 *P2PInitiatorClient<-InitiatorLibNfc   [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
   2251 *P2PTargetClient<-P2PTargetLibNfc   [label="pSendRspCb",URL="\ref   pphLibNfc_RspCb_t"];
   2252 *\endmsc
   2253 *
   2254 *\note Response callback parameters details for this interface are as listed below.
   2255 *
   2256 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   2257 * \param[in] status     Status of the response  callback.
   2258 *
   2259 *           \param NFCSTATUS_SUCCESS             Send operation  successful.
   2260 *           \param NFCSTATUS_SHUTDOWN       Send operation failed because Shutdown in progress.
   2261 *           \param NFCSTATUS_ABORTED        Aborted due to initiator issued disconnect request.
   2262 *                                           or intiator removed physically from the RF field.
   2263 *                                           This status code reported,to indicate P2P session
   2264 *                                           closed and send and receive requests not allowed
   2265 *                                           any more unless new session is started.
   2266 *           \param  NFCSTATUS_DESELECTED    Receive operation is not possible due to
   2267 *                                           initiator issued disconnect or intiator
   2268 *                                           physically removed from the RF field.
   2269 *
   2270 *
   2271 */
   2272 extern
   2273 NFCSTATUS
   2274 phLibNfc_RemoteDev_Send(phLibNfc_Handle             hRemoteDevice,
   2275                         phNfc_sData_t*              pTransferData,
   2276                         pphLibNfc_RspCb_t           pSendRspCb,
   2277                         void*                       pContext
   2278                         );
   2279 
   2280 /**
   2281 * \ingroup grp_lib_nfc
   2282 * \brief <b>Interface to configure P2P and intiator mode configurations</b>.
   2283 *  The  setting will be typically take effect for the next cycle of the relevant
   2284 *  phase of discovery. For optional configuration internal defaults will be
   2285 *  used in case the configuration is not set.
   2286 *
   2287 *\note Currently general bytes configuration supported.
   2288 *
   2289 *  \param[in] pConfigInfo           Union containing P2P configuration details as
   2290 *                                   in \ref phLibNfc_sNfcIPCfg_t.
   2291 *
   2292 *  \param[in] pConfigRspCb          This callback has to be called once LibNfc
   2293 *                                   completes the Configuration.
   2294 *
   2295 *  \param[in] pContext              Upper layer context to be returned in
   2296 *                                   the callback.
   2297 *
   2298 *
   2299 * \retval NFCSTATUS_PENDING             Config operation is in progress.
   2300 * \retval NFCSTATUS_INVALID_PARAMETER   One or more of the supplied parameters
   2301 *                                       could not be properly interpreted.
   2302 * \retval  NFCSTATUS_NOT_INITIALISED    Indicates stack is not yet initialized.
   2303 * \retval NFCSTATUS_SHUTDOWN            Shutdown in progress.
   2304 * \retval NFCSTATUS_BUSY                Previous request in progress can not accept new request.
   2305 *
   2306 *\msc
   2307 *P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
   2308 *--- [label="stack is intialised and P2P notification handler registered alredy"];
   2309 *P2PTargetClient=>P2PTargetLibNfc   [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref    phLibNfc_Mgt_SetP2P_ConfigParams"];
   2310 *P2PTargetClient<<P2PTargetLibNfc   [label="NFCSTATUS_PENDING"];
   2311 *P2PTargetClient<-P2PTargetLibNfc   [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
   2312 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref    phLibNfc_Mgt_SetP2P_ConfigParams"];
   2313 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2314 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref  phLibNfc_Mgt_ConfigureDiscovery"];
   2315 *P2PTargetClient<<P2PTargetLibNfc   [label="NFCSTATUS_PENDING"];
   2316 *P2PTargetClient<-P2PTargetLibNfc   [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2317 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref    phLibNfc_Mgt_ConfigureDiscovery"];
   2318 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2319 *P2PInitiatorClient<-InitiatorLibNfc    [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
   2320 *--- [label="Place Initiator and target closely"];
   2321 *P2PInitiatorClient<-InitiatorLibNfc    [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   2322 *P2PInitiatorClient=>InitiatorLibNfc    [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
   2323 *P2PInitiatorClient<<InitiatorLibNfc    [label="NFCSTATUS_PENDING"];
   2324 *P2PInitiatorClient<-InitiatorLibNfc    [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
   2325 *P2PTargetClient<-P2PTargetLibNfc   [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
   2326 *--- [label="Now configured params ( Ex : general bytes can been seen in remote device info"];
   2327 *\endmsc
   2328 *
   2329 *\note Response callback parameters details for this interface are as listed below.
   2330 *
   2331 * \param[in] pContext   LibNfc client context   passed in the corresponding request before.
   2332 * \param[in] status     Status of the response  callback.
   2333 *
   2334 *                  \param NFCSTATUS_SUCCESS                  configuration operation is successful.
   2335 *                  \param NFCSTATUS_SHUTDOWN            Shutdown in progress.
   2336 *                  \param NFCSTATUS_FAILED              Request failed.
   2337 *
   2338 */
   2339 extern NFCSTATUS phLibNfc_Mgt_SetP2P_ConfigParams(   phLibNfc_sNfcIPCfg_t*   pConfigInfo,
   2340                                                     pphLibNfc_RspCb_t       pConfigRspCb,
   2341                                                     void*                   pContext
   2342                                                 );
   2343 
   2344 /**
   2345 * \ingroup grp_lib_nfc
   2346 * \brief <b>Interface to stack capabilities</b>.
   2347 *
   2348 *  LibNfc client can query to retrieve stack capabilities.Stack capabilities contains
   2349 *  <br><br>a).Device capabilities which contains details like protocols supported,
   2350 *  Hardware,Firmware  and model-id version details .For details refer to \ref phNfc_sDeviceCapabilities_t.
   2351 * <br><br>b).NDEF mapping related info. This info helps in identifying supported tags for NDEF mapping feature.
   2352 * <br><br>c).NDEF formatting related info. This info helps in identifying supported tags for NDEF formatting feature.
   2353 *
   2354 *  \param[in] phLibNfc_StackCapabilities   Contains device capabilities and NDEF mapping and formatting feature
   2355                                            support for different tag types.
   2356 *
   2357 *  \param[in] pContext                     Upper layer context to be returned in
   2358 *                                          the callback.
   2359 *
   2360 *
   2361 * \retval NFCSTATUS_SUCCESS               Indicates Get stack Capabilities operation successful.
   2362 * \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   2363 *                                         could not be properly interpreted.
   2364 * \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   2365 * \retval NFCSTATUS_SHUTDOWN              Shutdown in progress.
   2366 * \retval NFCSTATUS_FAILED                operation failed.
   2367 * \retval NFCSTATUS_BUSY                  Previous request in progress can not accept new request.
   2368 *
   2369 *
   2370 *\msc
   2371 *LibNfcClient,LibNfc;
   2372 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
   2373 *LibNfcClient<-LibNfc   [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
   2374 *LibNfcClient=>LibNfc   [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
   2375 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   2376 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_GetstackCapabilities()",URL="\ref phLibNfc_Mgt_GetstackCapabilities"];
   2377 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   2378 *--- [label="Now stack capabilities available "];
   2379 *
   2380 *\endmsc*/
   2381 
   2382 
   2383 extern NFCSTATUS phLibNfc_Mgt_GetstackCapabilities(phLibNfc_StackCapabilities_t* phLibNfc_StackCapabilities,
   2384                                                    void*                         pContext
   2385                                                   );
   2386 
   2387 
   2388 /**
   2389 * \ingroup grp_lib_nfcHW_
   2390 * \brief <b>Interface to configure local LLCP peer</b>.
   2391 *
   2392 * This function configures the parameters of the local LLCP peer. This function must be called
   2393 * before any other LLCP-related function from this API.
   2394 *
   2395 * \param[in] pConfigInfo   Contains local LLCP link parameters to be applied
   2396 * \param[in] pConfigRspCb  This callback has to be called once LibNfc
   2397 *                          completes the Configuration.
   2398 * \param[in] pContext      Upper layer context to be returned in
   2399 *                          the callback.
   2400 *
   2401 *
   2402 * \retval NFCSTATUS_SUCCESS               Operation successful.
   2403 * \retval NFCSTATUS_PENDING               Configuration operation is in progress,
   2404                                           pConfigRspCb will be called upon completion.
   2405 * \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   2406 *                                         could not be properly interpreted.
   2407 * \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   2408 * \retval NFCSTATUS_SHUTDOWN              Shutdown in progress.
   2409 * \retval NFCSTATUS_FAILED                Operation failed.
   2410 * \retval NFCSTATUS_BUSY                  Previous request in progress can not accept new request.
   2411 */
   2412 extern NFCSTATUS phLibNfc_Mgt_SetLlcp_ConfigParams( phLibNfc_Llcp_sLinkParameters_t* pConfigInfo,
   2413                                                    pphLibNfc_RspCb_t                pConfigRspCb,
   2414                                                    void*                            pContext
   2415                                                    );
   2416 
   2417 
   2418 /**
   2419 * \ingroup grp_lib_nfc
   2420 * \brief <b>Checks if a remote peer is LLCP compliant</b>.
   2421 *
   2422 * This functions allows to check if a previously detected tag is compliant with the
   2423 * LLCP protocol. This step is needed before calling any other LLCP-related function on
   2424 * this remote peer, except local LLCP peer configurationn, which is more general. Once
   2425 * this checking is done, the caller will be able to receive link status notifications
   2426 * until the peer is disconnected.
   2427 *
   2428 * \param[in] hRemoteDevice       Peer handle obtained during device discovery process.
   2429 * \param[in] pCheckLlcp_RspCb    The callback to be called once LibNfc
   2430 *                                completes the LLCP compliancy check.
   2431 * \param[in] pLink_Cb            The callback to be called each time the
   2432 *                                LLCP link status changes.
   2433 * \param[in] pContext            Upper layer context to be returned in
   2434 *                                the callbacks.
   2435 *
   2436 *
   2437 * \retval NFCSTATUS_SUCCESS               Operation successful.
   2438 * \retval NFCSTATUS_PENDING               Check operation is in progress, pCheckLlcp_RspCb will
   2439 *                                         be called upon completion.
   2440 * \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   2441 *                                         could not be properly interpreted.
   2442 * \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   2443 * \retval NFCSTATUS_SHUTDOWN              Shutdown in progress.
   2444 * \retval NFCSTATUS_FAILED                Operation failed.
   2445 * \retval NFCSTATUS_BUSY                  Previous request in progress can not accept new request.
   2446 */
   2447 extern NFCSTATUS phLibNfc_Llcp_CheckLlcp( phLibNfc_Handle              hRemoteDevice,
   2448                                           pphLibNfc_ChkLlcpRspCb_t     pCheckLlcp_RspCb,
   2449                                           pphLibNfc_LlcpLinkStatusCb_t pLink_Cb,
   2450                                           void*                        pContext
   2451                                           );
   2452 
   2453 
   2454 /**
   2455 * \ingroup grp_lib_nfc
   2456 * \brief <b>Activates a LLCP link with a remote device </b>.
   2457 *
   2458 * This function launches the link activation process on a remote LLCP-compliant peer. The link status
   2459 * notification will be sent by the corresponding callback given in the phLibNfc_Llcp_CheckLlcp function.
   2460 * If the activation fails, the deactivated status will be notified, even if the link is already in a
   2461 * deactivated state.
   2462 *
   2463 * \param[in] hRemoteDevice       Peer handle obtained during device discovery process.
   2464 *
   2465 * \retval NFCSTATUS_SUCCESS               Operation successful.
   2466 * \retval NFCSTATUS_PENDING               Activation operation is in progress,
   2467                                           pLink_Cb will be called upon completion.
   2468 * \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   2469 *                                         could not be properly interpreted.
   2470 * \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   2471 * \retval NFCSTATUS_SHUTDOWN              Shutdown in progress.
   2472 * \retval NFCSTATUS_FAILED                Operation failed.
   2473 * \retval NFCSTATUS_BUSY                  Previous request in progress can not accept new request.
   2474 */
   2475 extern NFCSTATUS phLibNfc_Llcp_Activate( phLibNfc_Handle hRemoteDevice );
   2476 
   2477 
   2478 /**
   2479 * \ingroup grp_lib_nfc
   2480 * \brief <b>Deactivate a previously activated LLCP link with a remote device</b>.
   2481 *
   2482 * This function launches the link deactivation process on a remote LLCP-compliant peer. The link status
   2483 * notification will be sent by the corresponding callback given in the phLibNfc_Llcp_CheckLlcp function.
   2484 *
   2485 * \param[in] hRemoteDevice       Peer handle obtained during device discovery process.
   2486 *
   2487 * \retval NFCSTATUS_SUCCESS               Operation successful.
   2488 * \retval NFCSTATUS_PENDING               Deactivation operation is in progress,
   2489                                           pLink_Cb will be called upon completion.
   2490 * \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   2491 *                                         could not be properly interpreted.
   2492 * \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   2493 * \retval NFCSTATUS_SHUTDOWN              Shutdown in progress.
   2494 * \retval NFCSTATUS_FAILED                Operation failed.
   2495 * \retval NFCSTATUS_BUSY                  Previous request in progress can not accept new request.
   2496 */
   2497 extern NFCSTATUS phLibNfc_Llcp_Deactivate( phLibNfc_Handle  hRemoteDevice );
   2498 
   2499 
   2500 /**
   2501 * \ingroup grp_lib_nfc
   2502 * \brief <b>Get information on the local LLCP peer</b>.
   2503 *
   2504 * This function returns the LLCP link parameters of the local peer that were used
   2505 * during the link activation.
   2506 *
   2507 * \param[in]  hRemoteDevice         Peer handle obtained during device discovery process.
   2508 * \param[out] pConfigInfo           Pointer on the variable to be filled with the configuration
   2509                                     parameters used during activation.
   2510 *
   2511 * \retval NFCSTATUS_SUCCESS               Operation successful.
   2512 * \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   2513 *                                         could not be properly interpreted.
   2514 * \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   2515 * \retval NFCSTATUS_SHUTDOWN              Shutdown in progress.
   2516 * \retval NFCSTATUS_FAILED                Operation failed.
   2517 * \retval NFCSTATUS_BUSY                  Previous request in progress can not accept new request.
   2518 */
   2519 extern NFCSTATUS phLibNfc_Llcp_GetLocalInfo( phLibNfc_Handle                  hRemoteDevice,
   2520                                              phLibNfc_Llcp_sLinkParameters_t* pConfigInfo
   2521                                              );
   2522 
   2523 
   2524 /**
   2525 * \ingroup grp_lib_nfc
   2526 * \brief <b>Get information on the remote LLCP peer</b>.
   2527 *
   2528 * This function returns the LLCP link parameters of the remote peer that were received
   2529 * during the link activation.
   2530 *
   2531 * \param[in]  hRemoteDevice         Peer handle obtained during device discovery process.
   2532 * \param[out] pConfigInfo           Pointer on the variable to be filled with the configuration
   2533                                     parameters used during activation.
   2534 *
   2535 * \retval NFCSTATUS_SUCCESS               Operation successful.
   2536 * \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   2537 *                                         could not be properly interpreted.
   2538 * \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   2539 * \retval NFCSTATUS_SHUTDOWN              Shutdown in progress.
   2540 * \retval NFCSTATUS_FAILED                Operation failed.
   2541 * \retval NFCSTATUS_BUSY                  Previous request in progress can not accept new request.
   2542 */
   2543 extern NFCSTATUS phLibNfc_Llcp_GetRemoteInfo( phLibNfc_Handle                    hRemoteDevice,
   2544                                               phLibNfc_Llcp_sLinkParameters_t*   pConfigInfo
   2545                                               );
   2546 
   2547 
   2548 /**
   2549 * \ingroup grp_lib_nfc
   2550 * \brief <b>Create a socket on a LLCP-connected device</b>.
   2551 *
   2552 * This function creates a socket for a given LLCP link. Sockets can be of two types :
   2553 * connection-oriented and connectionless. If the socket is connection-oriented, the caller
   2554 * must provide a working buffer to the socket in order to handle incoming data. This buffer
   2555 * must be large enough to fit the receive window (RW * MIU), the remaining space being
   2556 * used as a linear buffer to store incoming data as a stream. Data will be readable later
   2557 * using the phLibNfc_Llcp_Recv function.
   2558 * The options and working buffer are not required if the socket is used as a listening socket,
   2559 * since it cannot be directly used for communication.
   2560 *
   2561 * \param[in]  eType                 The socket type.
   2562 * \param[in]  psOptions             The options to be used with the socket.
   2563 * \param[in]  psWorkingBuffer       A working buffer to be used by the library.
   2564 * \param[out] phSocket              A pointer on the variable to be filled with the handle
   2565 *                                   on the created socket.
   2566 * \param[in]  pErr_Cb               The callback to be called each time the socket
   2567 *                                   is in error.
   2568 * \param[in]  pContext              Upper layer context to be returned in the callback.
   2569 *
   2570 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2571 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2572 *                                            could not be properly interpreted.
   2573 * \retval NFCSTATUS_BUFFER_TOO_SMALL         The working buffer is too small for the MIU and RW
   2574 *                                            declared in the options.
   2575 * \retval NFCSTATUS_INSUFFICIENT_RESOURCES   No more socket handle available.
   2576 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2577 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2578 * \retval NFCSTATUS_FAILED                   Operation failed.
   2579 */
   2580 extern NFCSTATUS phLibNfc_Llcp_Socket( phLibNfc_Llcp_eSocketType_t      eType,
   2581                                        phLibNfc_Llcp_sSocketOptions_t*  psOptions,
   2582                                        phNfc_sData_t*                   psWorkingBuffer,
   2583                                        phLibNfc_Handle*                 phSocket,
   2584                                        pphLibNfc_LlcpSocketErrCb_t      pErr_Cb,
   2585                                        void*                            pContext
   2586                                        );
   2587 
   2588 
   2589 /**
   2590 * \ingroup grp_lib_nfc
   2591 * \brief <b>Close a socket on a LLCP-connected device</b>.
   2592 *
   2593 * This function closes a LLCP socket previously created using phLibNfc_Llcp_Socket.
   2594 * If the socket was connected, it is first disconnected, and then closed.
   2595 *
   2596 * \param[in]  hSocket               Socket handle obtained during socket creation.
   2597 *
   2598 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2599 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2600 *                                            could not be properly interpreted.
   2601 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2602 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2603 * \retval NFCSTATUS_FAILED                   Operation failed.
   2604 */
   2605 extern NFCSTATUS phLibNfc_Llcp_Close( phLibNfc_Handle hSocket );
   2606 
   2607 
   2608 /**
   2609 * \ingroup grp_lib_nfc
   2610 * \brief <b>Get the local options of a socket</b>.
   2611 *
   2612 * This function returns the local options (maximum packet size and receive window size) used
   2613 * for a given connection-oriented socket. This function shall not be used with connectionless
   2614 * sockets.
   2615 *
   2616 * \param[in]  hSocket               Socket handle obtained during socket creation.
   2617 * \param[in]  psLocalOptions        A pointer to be filled with the local options of the socket.
   2618 *
   2619 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2620 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2621 *                                            could not be properly interpreted.
   2622 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2623 *                                            a valid type to perform the requsted operation.
   2624 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2625 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2626 * \retval NFCSTATUS_FAILED                   Operation failed.
   2627 */
   2628 extern NFCSTATUS phLibNfc_Llcp_SocketGetLocalOptions( phLibNfc_Handle                  hSocket,
   2629                                                       phLibNfc_Llcp_sSocketOptions_t*  psLocalOptions
   2630                                                       );
   2631 
   2632 
   2633 /**
   2634 * \ingroup grp_lib_nfc
   2635 * \brief <b>Get the local options of a socket</b>.
   2636 *
   2637 * This function returns the remote options (maximum packet size and receive window size) used
   2638 * for a given connection-oriented socket. This function shall not be used with connectionless
   2639 * sockets.
   2640 *
   2641 * \param[in]  hSocket               Socket handle obtained during socket creation.
   2642 * \param[in]  psRemoteOptions       A pointer to be filled with the remote options of the socket.
   2643 *
   2644 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2645 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2646 *                                            could not be properly interpreted.
   2647 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2648 *                                            a valid type to perform the requsted operation.
   2649 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2650 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2651 * \retval NFCSTATUS_FAILED                   Operation failed.
   2652 */
   2653 extern NFCSTATUS phLibNfc_Llcp_SocketGetRemoteOptions( phLibNfc_Handle                  hRemoteDevice,
   2654                                                        phLibNfc_Handle                  hSocket,
   2655                                                        phLibNfc_Llcp_sSocketOptions_t*  psRemoteOptions
   2656                                                        );
   2657 
   2658 
   2659 /**
   2660 * \ingroup grp_lib_nfc
   2661 * \brief <b>Bind a socket to a local SAP</b>.
   2662 *
   2663 * This function binds the socket to a local Service Access Point.
   2664 *
   2665 * \param[in]  hSocket               Peer handle obtained during device discovery process.
   2666 * \param[out] pConfigInfo           Pointer on the variable to be filled with the configuration
   2667 *                                   parameters used during activation.
   2668 *
   2669 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2670 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2671 *                                            could not be properly interpreted.
   2672 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2673 *                                            a valid type to perform the requsted operation.
   2674 * \retval NFCSTATUS_ALREADY_REGISTERED       The selected SAP is already bound to another
   2675                                              socket.
   2676 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2677 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2678 * \retval NFCSTATUS_FAILED                   Operation failed.
   2679 */
   2680 extern NFCSTATUS phLibNfc_Llcp_Bind( phLibNfc_Handle hSocket,
   2681                                      uint8_t         nSap
   2682                                      );
   2683 
   2684 
   2685 /**
   2686 * \ingroup grp_lib_nfc
   2687 * \brief <b>Listen for incoming connection requests on a socket</b>.
   2688 *
   2689 * This function switches a socket into a listening state and registers a callback on
   2690 * incoming connection requests. In this state, the socket is not able to communicate
   2691 * directly. The listening state is only available for connection-oriented sockets
   2692 * which are still not connected. The socket keeps listening until it is closed, and
   2693 * thus can trigger several times the pListen_Cb callback. The caller can adverise the
   2694 * service through SDP by providing a service name.
   2695 *
   2696 *
   2697 * \param[in]  hSocket            Socket handle obtained during socket creation.
   2698 * \param[in]  psServiceName      A buffer containing the name of the service for SDP. No SDP
   2699 *                                advertising if set to NULL.
   2700 * \param[in]  pListen_Cb         The callback to be called each time the
   2701 *                                socket receive a connection request.
   2702 * \param[in]  pContext           Upper layer context to be returned in
   2703 *                                the callback.
   2704 *
   2705 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2706 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2707 *                                            could not be properly interpreted.
   2708 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state to switch
   2709 *                                            to listening state.
   2710 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2711 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2712 * \retval NFCSTATUS_FAILED                   Operation failed.
   2713 */
   2714 extern NFCSTATUS phLibNfc_Llcp_Listen( phLibNfc_Handle                  hSocket,
   2715                                        phNfc_sData_t                    *psServiceName,
   2716                                        pphLibNfc_LlcpSocketListenCb_t   pListen_Cb,
   2717                                        void*                            pContext
   2718                                        );
   2719 
   2720 
   2721 /**
   2722 * \ingroup grp_lib_nfc
   2723 * \brief <b>Accept an incoming connection request for a socket</b>.
   2724 *
   2725 * This functions allows the client to accept an incoming connection request.
   2726 * It must be used with the socket provided within the listen callback. The socket
   2727 * is implicitly switched to the connected state when the function is called.
   2728 *
   2729 * \param[in]  hSocket               Socket handle obtained in the listening callback.
   2730 * \param[in]  psOptions             The options to be used with the socket.
   2731 * \param[in]  psWorkingBuffer       A working buffer to be used by the library.
   2732 * \param[in]  pErr_Cb               The callback to be called each time the accepted socket
   2733 *                                   is in error.
   2734 * \param[in]  pAccept_RspCb         The callback to be called when the Accept operation
   2735 *                                   is completed.
   2736 * \param[in]  pContext              Upper layer context to be returned in the callback.
   2737 *
   2738 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2739 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2740 *                                            could not be properly interpreted.
   2741 * \retval NFCSTATUS_BUFFER_TOO_SMALL         The working buffer is too small for the MIU and RW
   2742 *                                            declared in the options.
   2743 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2744 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2745 * \retval NFCSTATUS_FAILED                   Operation failed.
   2746 */
   2747 extern NFCSTATUS phLibNfc_Llcp_Accept( phLibNfc_Handle                  hSocket,
   2748                                        phLibNfc_Llcp_sSocketOptions_t*  psOptions,
   2749                                        phNfc_sData_t*                   psWorkingBuffer,
   2750                                        pphLibNfc_LlcpSocketErrCb_t      pErr_Cb,
   2751                                        pphLibNfc_LlcpSocketAcceptCb_t   pAccept_RspCb,
   2752                                        void*                            pContext
   2753                                        );
   2754 
   2755 
   2756 /**
   2757 * \ingroup grp_lib_nfc
   2758 * \brief <b>Reject an incoming connection request for a socket</b>.
   2759 *
   2760 * This functions allows the client to reject an incoming connection request.
   2761 * It must be used with the socket provided within the listen callback. The socket
   2762 * is implicitly closed when the function is called.
   2763 *
   2764 * \param[in]  hSocket               Socket handle obtained in the listening callback.
   2765 * \param[in]  pReject_RspCb         The callback to be called when the Reject operation
   2766 *                                   is completed.
   2767 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2768 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2769 *                                            could not be properly interpreted.
   2770 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2771 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2772 * \retval NFCSTATUS_FAILED                   Operation failed.
   2773 */
   2774 extern NFCSTATUS phLibNfc_Llcp_Reject( phLibNfc_Handle                  hRemoteDevice,
   2775                                        phLibNfc_Handle                  hSocket,
   2776                                        pphLibNfc_LlcpSocketAcceptCb_t   pReject_RspCb,
   2777                                        void*                            pContext);
   2778 
   2779 
   2780 /**
   2781 * \ingroup grp_lib_nfc
   2782 * \brief <b>Try to establish connection with a socket on a remote SAP</b>.
   2783 *
   2784 * This function tries to connect to a given SAP on the remote peer. If the
   2785 * socket is not bound to a local SAP, it is implicitly bound to a free SAP.
   2786 *
   2787 * \param[in]  hSocket            Socket handle obtained during socket creation.
   2788 * \param[in]  nSap               The destination SAP to connect to.
   2789 * \param[in]  pConnect_RspCb     The callback to be called when the connection
   2790 *                                operation is completed.
   2791 * \param[in]  pContext           Upper layer context to be returned in
   2792 *                                the callback.
   2793 *
   2794 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2795 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2796 *                                            could not be properly interpreted.
   2797 * \retval NFCSTATUS_PENDING                  Connection operation is in progress,
   2798 *                                            pConnect_RspCb will be called upon completion.
   2799 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2800 *                                            a valid type to perform the requsted operation.
   2801 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2802 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2803 * \retval NFCSTATUS_FAILED                   Operation failed.
   2804 */
   2805 extern NFCSTATUS phLibNfc_Llcp_Connect( phLibNfc_Handle                 hRemoteDevice,
   2806                                         phLibNfc_Handle                 hSocket,
   2807                                         uint8_t                         nSap,
   2808                                         pphLibNfc_LlcpSocketConnectCb_t pConnect_RspCb,
   2809                                         void*                           pContext
   2810                                         );
   2811 
   2812 
   2813 /**
   2814 * \ingroup grp_lib_nfc
   2815 * \brief <b>Try to establish connection with a socket on a remote service, given its URI</b>.
   2816 *
   2817 * This function tries to connect to a SAP designated by an URI. If the
   2818 * socket is not bound to a local SAP, it is implicitly bound to a free SAP.
   2819 *
   2820 * \param[in]  hSocket            Socket handle obtained during socket creation.
   2821 * \param[in]  psUri              The URI corresponding to the destination SAP to connect to.
   2822 * \param[in]  pConnect_RspCb     The callback to be called when the connection
   2823 *                                operation is completed.
   2824 * \param[in]  pContext           Upper layer context to be returned in
   2825 *                                the callback.
   2826 *
   2827 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2828 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2829 *                                            could not be properly interpreted.
   2830 * \retval NFCSTATUS_PENDING                  Connection operation is in progress,
   2831 *                                            pConnect_RspCb will be called upon completion.
   2832 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2833 *                                            a valid type to perform the requsted operation.
   2834 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2835 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2836 * \retval NFCSTATUS_FAILED                   Operation failed.
   2837 */
   2838 extern NFCSTATUS phLibNfc_Llcp_ConnectByUri( phLibNfc_Handle                 hRemoteDevice,
   2839                                              phLibNfc_Handle                 hSocket,
   2840                                              phNfc_sData_t*                  psUri,
   2841                                              pphLibNfc_LlcpSocketConnectCb_t pConnect_RspCb,
   2842                                              void*                           pContext
   2843                                              );
   2844 
   2845 
   2846 /**
   2847 * \ingroup grp_lib_nfc
   2848 * \brief <b>Disconnect a currently connected socket</b>.
   2849 *
   2850 * This function initiates the disconnection of a previously connected socket.
   2851 *
   2852 * \param[in]  hSocket            Socket handle obtained during socket creation.
   2853 * \param[in]  pDisconnect_RspCb  The callback to be called when the
   2854 *                                operation is completed.
   2855 * \param[in]  pContext           Upper layer context to be returned in
   2856 *                                the callback.
   2857 *
   2858 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2859 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2860 *                                            could not be properly interpreted.
   2861 * \retval NFCSTATUS_PENDING                  Disconnection operation is in progress,
   2862 *                                            pDisconnect_RspCb will be called upon completion.
   2863 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2864 *                                            a valid type to perform the requsted operation.
   2865 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2866 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2867 * \retval NFCSTATUS_FAILED                   Operation failed.
   2868 */
   2869 extern NFCSTATUS phLibNfc_Llcp_Disconnect( phLibNfc_Handle                    hRemoteDevice,
   2870                                            phLibNfc_Handle                    hSocket,
   2871                                            pphLibNfc_LlcpSocketDisconnectCb_t pDisconnect_RspCb,
   2872                                            void*                              pContext
   2873                                            );
   2874 
   2875 
   2876 /**
   2877 * \ingroup grp_lib_nfc
   2878 * \brief <b>Read data on a socket</b>.
   2879 *
   2880 * This function is used to read data from a socket. It reads at most the
   2881 * size of the reception buffer, but can also return less bytes if less bytes
   2882 * are available. If no data is available, the function will be pending until
   2883 * more data comes, and the response will be sent by the callback. This function
   2884 * can only be called on a connection-oriented socket.
   2885 *
   2886 *
   2887 * \param[in]  hSocket            Socket handle obtained during socket creation.
   2888 * \param[in]  psBuffer           The buffer receiving the data.
   2889 * \param[in]  pRecv_RspCb        The callback to be called when the
   2890 *                                operation is completed.
   2891 * \param[in]  pContext           Upper layer context to be returned in
   2892 *                                the callback.
   2893 *
   2894 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2895 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2896 *                                            could not be properly interpreted.
   2897 * \retval NFCSTATUS_PENDING                  Reception operation is in progress,
   2898 *                                            pRecv_RspCb will be called upon completion.
   2899 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2900 *                                            a valid type to perform the requsted operation.
   2901 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2902 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2903 * \retval NFCSTATUS_FAILED                   Operation failed.
   2904 */
   2905 extern NFCSTATUS phLibNfc_Llcp_Recv( phLibNfc_Handle              hRemoteDevice,
   2906                                      phLibNfc_Handle              hSocket,
   2907                                      phNfc_sData_t*               psBuffer,
   2908                                      pphLibNfc_LlcpSocketRecvCb_t pRecv_RspCb,
   2909                                      void*                        pContext
   2910                                      );
   2911 
   2912 
   2913 /**
   2914 * \ingroup grp_lib_nfc
   2915 * \brief <b>Read data on a socket and get the source SAP</b>.
   2916 *
   2917 * This function is the same as phLibNfc_Llcp_Recv, except that the callback includes
   2918 * the source SAP. This functions can only be called on a connectionless socket.
   2919 *
   2920 *
   2921 * \param[in]  hSocket            Socket handle obtained during socket creation.
   2922 * \param[in]  psBuffer           The buffer receiving the data.
   2923 * \param[in]  pRecv_RspCb        The callback to be called when the
   2924 *                                operation is completed.
   2925 * \param[in]  pContext           Upper layer context to be returned in
   2926 *                                the callback.
   2927 *
   2928 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2929 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2930 *                                            could not be properly interpreted.
   2931 * \retval NFCSTATUS_PENDING                  Reception operation is in progress,
   2932 *                                            pRecv_RspCb will be called upon completion.
   2933 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2934 *                                            a valid type to perform the requsted operation.
   2935 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2936 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2937 * \retval NFCSTATUS_FAILED                   Operation failed.
   2938 */
   2939 extern NFCSTATUS phLibNfc_Llcp_RecvFrom( phLibNfc_Handle                   hRemoteDevice,
   2940                                          phLibNfc_Handle                   hSocket,
   2941                                          phNfc_sData_t*                    psBuffer,
   2942                                          pphLibNfc_LlcpSocketRecvFromCb_t  pRecv_Cb,
   2943                                          void*                             pContext
   2944                                          );
   2945 
   2946 
   2947 /**
   2948 * \ingroup grp_lib_nfc
   2949 * \brief <b>Send data on a socket</b>.
   2950 *
   2951 * This function is used to write data on a socket. This function
   2952 * can only be called on a connection-oriented socket which is already
   2953 * in a connected state.
   2954 *
   2955 *
   2956 * \param[in]  hSocket            Socket handle obtained during socket creation.
   2957 * \param[in]  psBuffer           The buffer containing the data to send.
   2958 * \param[in]  pSend_RspCb        The callback to be called when the
   2959 *                                operation is completed.
   2960 * \param[in]  pContext           Upper layer context to be returned in
   2961 *                                the callback.
   2962 *
   2963 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2964 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   2965 *                                            could not be properly interpreted.
   2966 * \retval NFCSTATUS_PENDING                  Reception operation is in progress,
   2967 *                                            pSend_RspCb will be called upon completion.
   2968 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   2969 *                                            a valid type to perform the requsted operation.
   2970 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   2971 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   2972 * \retval NFCSTATUS_FAILED                   Operation failed.
   2973 */
   2974 extern NFCSTATUS phLibNfc_Llcp_Send( phLibNfc_Handle              hRemoteDevice,
   2975                                      phLibNfc_Handle              hSocket,
   2976                                      phNfc_sData_t*               psBuffer,
   2977                                      pphLibNfc_LlcpSocketSendCb_t pSend_RspCb,
   2978                                      void*                        pContext
   2979                                      );
   2980 
   2981 
   2982 /**
   2983 * \ingroup grp_lib_nfc
   2984 * \brief <b>Send data on a socket to a given destination SAP</b>.
   2985 *
   2986 * This function is used to write data on a socket to a given destination SAP.
   2987 * This function can only be called on a connectionless socket.
   2988 *
   2989 *
   2990 * \param[in]  hSocket            Socket handle obtained during socket creation.
   2991 * \param[in]  nSap               The destination SAP.
   2992 * \param[in]  psBuffer           The buffer containing the data to send.
   2993 * \param[in]  pSend_RspCb        The callback to be called when the
   2994 *                                operation is completed.
   2995 * \param[in]  pContext           Upper layer context to be returned in
   2996 *                                the callback.
   2997 *
   2998 * \retval NFCSTATUS_SUCCESS                  Operation successful.
   2999 * \retval NFCSTATUS_INVALID_PARAMETER        One or more of the supplied parameters
   3000 *                                            could not be properly interpreted.
   3001 * \retval NFCSTATUS_PENDING                  Reception operation is in progress,
   3002 *                                            pSend_RspCb will be called upon completion.
   3003 * \retval NFCSTATUS_INVALID_STATE            The socket is not in a valid state, or not of
   3004 *                                            a valid type to perform the requsted operation.
   3005 * \retval NFCSTATUS_NOT_INITIALISED          Indicates stack is not yet initialized.
   3006 * \retval NFCSTATUS_SHUTDOWN                 Shutdown in progress.
   3007 * \retval NFCSTATUS_FAILED                   Operation failed.
   3008 */
   3009 extern NFCSTATUS phLibNfc_Llcp_SendTo( phLibNfc_Handle               hRemoteDevice,
   3010                                        phLibNfc_Handle               hSocket,
   3011                                        uint8_t                       nSap,
   3012                                        phNfc_sData_t*                psBuffer,
   3013                                        pphLibNfc_LlcpSocketSendCb_t  pSend_RspCb,
   3014                                        void*                         pContext
   3015                                        );
   3016 
   3017 
   3018 /**
   3019 * \ingroup grp_lib_nfc
   3020 *
   3021 * \brief Initializes \ DeInitialize the NFC library for testmode.
   3022 *
   3023 *
   3024 *\brief This function initializes / DeInitialize NFC library and its underlying layers
   3025 * in test mode. As part of this interface underlying layers gets configured.
   3026 * Once phLibNfc_TstMode_On is successful ,NFC library ready in testmode using IOCTL.
   3027 * After using test IOCTLs ,Test mode should be DeInit using phLibNfc_TstMode_Off.
   3028 *\note This API should be used only for test IOCTL codes.
   3029 *
   3030 * \param[in] pDriverHandle         Driver Handle currently application is using.
   3031 * \param[in] pTestModeCb        The init callback is called by the LibNfc when
   3032 *                               Configure test mode completed or there is an error
   3033 *                               in initialization.
   3034 *
   3035 * \param[in] pContext           Client context which will   be included in
   3036 *                               callback when the request is completed.
   3037 *
   3038 * \retval NFCSTATUS_ALREADY_INITIALISED     Stack is already initialized.
   3039 * \retval NFCSTATUS_PENDING                 Init sequence   has been successfully
   3040 *                                           started and result will be  conveyed via
   3041 *                                           callback notification.
   3042 * \retval NFCSTATUS_INVALID_PARAMETER       The parameter could not be  properly
   3043 *                                           interpreted.
   3044 *\retval NFCSTATUS_INSUFFICIENT_RESOURCES   Insufficient resource.(Ex: insufficient memory)
   3045 *
   3046 *\msc
   3047 *LibNfcClient,LibNfc;
   3048 *--- [label="Before initializing Nfc LIB,Setup Driver layer"];
   3049 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
   3050 *LibNfcClient<<LibNfc   [label="NFCSTATUS_SUCCESS"];
   3051 *LibNfcClient=>LibNfc   [label="phLibNfc_Mgt_ConfigureTestMode()",URL="\ref phLibNfc_Mgt_ConfigureTestMode"];
   3052 *LibNfcClient<<LibNfc   [label="NFCSTATUS_PENDING"];
   3053 *LibNfcClient<-LibNfc   [label="pTestModeCb"];
   3054 *\endmsc
   3055 */
   3056 NFCSTATUS phLibNfc_Mgt_ConfigureTestMode(void              *pDriverHandle,
   3057                                  pphLibNfc_RspCb_t         pTestModeCb,
   3058                                  phLibNfc_Cfg_Testmode_t   eTstmode,
   3059                                  void                      *pContext
   3060                                  );
   3061 
   3062 /**
   3063 * \ingroup grp_lib_nfc
   3064 * \brief <b>Interface to LibNfc Reset</b>.
   3065 *
   3066 *  LibNfc client can reset the stack.
   3067 *
   3068 *  \param[in] pContext                     Upper layer context to be returned in
   3069 *                                          the callback.
   3070 *
   3071 *
   3072 * \retval NFCSTATUS_SUCCESS               Indicates Get stack Capabilities operation successful.
   3073 * \retval NFCSTATUS_INVALID_PARAMETER     One or more of the supplied parameters
   3074 *                                         could not be properly interpreted.
   3075 * \retval NFCSTATUS_NOT_INITIALISED       Indicates stack is not yet initialized.
   3076 * \retval NFCSTATUS_SHUTDOWN              Shutdown in progress.
   3077 */
   3078 
   3079 NFCSTATUS phLibNfc_Mgt_Reset(void    *pContext);
   3080 
   3081 #endif  /*  PHLIBNFC_H    */
   3082 
   3083