less structs and defines publicly exposed

- nfc_device is now an opaque type;
 - PN53x specific errors are not public anymore;
 - nfc_device_name() renamed to nfc_device_get_name() for the sake of consistency;
 - examples/*, utils/* uses the new nfc_device_get_name() function instead of access directly to struct's content;
 - new error defined: NFC_ERFTRANS for notifying about RF transmission error, its used by mifare.c to detect permissions error on mifare;
 - drivers initiator_transceive_bytes() function now returns libnfc's error code on failure (<0), and received bytes count on success (>=0);
 - remove some unused errors.
This commit is contained in:
Romuald Conty 2011-12-19 00:23:21 +00:00
parent 9bdc20353c
commit bf7c36d9bb
29 changed files with 162 additions and 178 deletions

View file

@ -125,7 +125,7 @@ main (int argc, char *argv[])
printf ("Hint: tag <---> initiator (relay) <---> target (relay) <---> original reader\n\n");
printf ("Connected to the NFC emulator device: %s\n", pndTag->acName);
printf ("Connected to the NFC emulator device: %s\n", nfc_device_get_name (pndTag));
printf ("[+] Try to break out the auto-emulation, this requires a second reader!\n");
printf ("[+] To do this, please send any command after the anti-collision\n");
printf ("[+] For example, send a RATS command or use the \"nfc-anticol\" tool\n");
@ -162,7 +162,7 @@ main (int argc, char *argv[])
// Try to open the NFC reader
pndReader = nfc_connect (connstrings[1]);
printf ("Connected to the NFC reader device: %s", pndReader->acName);
printf ("Connected to the NFC reader device: %s", nfc_device_get_name (pndReader));
printf ("%s", "Configuring NFC reader settings...");
nfc_initiator_init (pndReader);
if ((nfc_device_set_property_bool (pndReader, NP_HANDLE_CRC, false) < 0) ||