1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // Created by robin on 6/19/16.
- //
-
- #ifndef MIFARE_TOOLS_FREEFARETAG_H
- #define MIFARE_TOOLS_FREEFARETAG_H
-
- #include <freefare.h>
- #include <string>
- #include "libnfc_cpptools/Result.h"
-
- namespace LibNfc
- {
- namespace FreeFare
- {
-
- class FreeFareTagInternal
- {
- public:
-
- FreeFareTagInternal(FreefareTag tag);
- ~FreeFareTagInternal();
-
- LibNfc::Utils::ResultBool authenticate(int sector, std::string key, int keyType);
-
- LibNfc::Utils::ResultString readBlock(int sector, int block, std::string key, int keyType);
-
- LibNfc::Utils::ResultBool writeBlock(int sector, int block, std::string key, int keyType, const std::string& data);
-
- int getFirstBlock(int sector) const;
-
- int getLastBlock(int sector) const;
-
- int getSectorBlockCount(int sector);
-
- const freefare_tag * getTag() const;
-
- freefare_tag_type getType() const;
-
- const std::string & getUid() const;
-
- private:
- FreefareTag _tag;
-
- freefare_tag_type _type;
-
- std::string _uid;
- };
-
- }; // FreeFare
- }; // LibNfc
-
- #endif //MIFARE_TOOLS_FREEFARETAG_H
|