You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NfcDevice.h 674B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // Created by robin on 6/19/16.
  3. //
  4. #ifndef MIFARE_TOOLS_NFCDEVICEDBO_H
  5. #define MIFARE_TOOLS_NFCDEVICEDBO_H
  6. #include <string>
  7. #include <nfc/nfc-types.h>
  8. #include <DBO/Result.h>
  9. #include "LibNfc.h"
  10. class LibNfc;
  11. class NfcDevice
  12. {
  13. public:
  14. NfcDevice(LibNfc* libNfc, std::string connStr);
  15. ~NfcDevice();
  16. ResultBool open();
  17. void close();
  18. bool isOpened();
  19. const std::string &getConnStr() const
  20. {
  21. return _connStr;
  22. }
  23. void setConnStr(const std::string &connStr)
  24. {
  25. _connStr = connStr;
  26. }
  27. private:
  28. std::string _connStr;
  29. nfc_device* _device;
  30. LibNfc* _libNfc;
  31. };
  32. #endif //MIFARE_TOOLS_NFCDEVICEDBO_H