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