mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-27 12:16:34 +00:00
Add nfc_register_driver. Issue 137.
The nfc_register_driver allows users of the library to write their own device drivers without needing to resort to hacking libnfc itself.
This commit is contained in:
@@ -42,6 +42,11 @@ typedef struct nfc_context nfc_context;
|
||||
*/
|
||||
typedef struct nfc_device nfc_device;
|
||||
|
||||
/**
|
||||
* NFC device driver
|
||||
*/
|
||||
typedef struct nfc_driver nfc_driver;
|
||||
|
||||
/**
|
||||
* Connection string
|
||||
*/
|
||||
|
||||
@@ -79,6 +79,7 @@ extern "C" {
|
||||
/* Library initialization/deinitialization */
|
||||
NFC_EXPORT void nfc_init(nfc_context **context) ATTRIBUTE_NONNULL(1);
|
||||
NFC_EXPORT void nfc_exit(nfc_context *context) ATTRIBUTE_NONNULL(1);
|
||||
NFC_EXPORT int nfc_register_driver(const nfc_driver *driver);
|
||||
|
||||
/* NFC Device/Hardware manipulation */
|
||||
NFC_EXPORT nfc_device *nfc_open(nfc_context *context, const nfc_connstring connstring) ATTRIBUTE_NONNULL(1);
|
||||
|
||||
Reference in New Issue
Block a user