--- configure.ac (revision 24) +++ configure.ac (working copy) @@ -30,7 +30,7 @@ fi # Checks for libraries. -AC_CHECK_LIB(nfc, nfc_connect,,AC_MSG_ERROR(Install libnfc)) +AC_CHECK_LIB(nfc, nfc_version,,AC_MSG_ERROR(Install libnfc)) AC_CHECK_LIB(freefare, mifare_classic_connect,,AC_MSG_ERROR(Install libfreefare)) AC_CHECK_LIB(gthread-2.0, g_thread_init) --- src/Nfc.cpp (revision 24) +++ src/Nfc.cpp (working copy) @@ -31,22 +31,24 @@ }; Nfc::Nfc() : dev(NULL), tags(NULL) { + nfc_init(NULL); selectedTag = -1; connect(); } Nfc::~Nfc() { disconnect(); + nfc_exit(NULL); } void Nfc::connect() { if(dev) return; - dev = nfc_connect(NULL); + dev = nfc_open(NULL, NULL); } void Nfc::disconnect() { if (!dev) return; - nfc_disconnect(dev); + nfc_close(dev); dev = NULL; } --- src/Nfc.h (revision 24) +++ src/Nfc.h (working copy) @@ -83,7 +80,7 @@ Nfc::Tag* findTag(); protected: - nfc_device_t* dev; + nfc_device* dev; int selectedTag; MifareTag* tags; --- src/Utils.h (revision 24) +++ src/Utils.h (working copy) @@ -30,7 +30,7 @@ return ss.str().c_str(); } - static std::string pByteToStrHex(byte_t* bytes, unsigned int len) { + static std::string pByteToStrHex(uint8_t* bytes, unsigned int len) { std::stringstream ss; for(unsigned int i = 0; i < len; i++) ss << std::hex << (unsigned int)bytes[i];