mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-11 10:03:49 +00:00
add nfc_device_name() routine to allow external languages to extract device name
This commit is contained in:
@@ -251,6 +251,14 @@ bool nfc_target_send_dep_bytes(const nfc_device_t* pnd, const byte_t* pbtTx, con
|
|||||||
*/
|
*/
|
||||||
const char* nfc_version(void);
|
const char* nfc_version(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @fn const char*nfc_device_name(nfc_device_t* pnd)
|
||||||
|
* @brief Returns the device name
|
||||||
|
* @return Returns a string with the device name
|
||||||
|
*/
|
||||||
|
|
||||||
|
const char* nfc_device_name(nfc_device_t* pnd);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|||||||
@@ -852,4 +852,11 @@ const char* nfc_version(void)
|
|||||||
#endif // SVN_REVISION
|
#endif // SVN_REVISION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// functions to provide external hooks to python (or other languages) - that cannot
|
||||||
|
// handle structures in return values when used as a DLL
|
||||||
|
|
||||||
|
// function to return device name of device that has already been configured/claimed
|
||||||
|
const char* nfc_device_name(nfc_device_t* pnd)
|
||||||
|
{
|
||||||
|
return pnd->acName;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user