LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
storagecardservice.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_STORAGECARDSERVICE_HPP
8#define LOGICALACCESS_STORAGECARDSERVICE_HPP
9
14
15namespace logicalaccess
16{
20typedef enum {
21 CB_DEFAULT = 0x0000,
23 0x0001
25
29class LLA_CORE_API StorageCardService : public CardService
30{
31 public:
32 constexpr static const CardServiceType service_type_ = CST_STORAGE;
33
38 explicit StorageCardService(std::shared_ptr<Chip> chip);
39
40 virtual ~StorageCardService();
41
47 virtual void erase(std::shared_ptr<Location> location,
48 std::shared_ptr<AccessInfo> aiToUse) = 0;
49
58 virtual void writeData(std::shared_ptr<Location> location,
59 std::shared_ptr<AccessInfo> aiToUse,
60 std::shared_ptr<AccessInfo> aiToWrite, const ByteVector &data,
61 CardBehavior behaviorFlags) = 0;
62
71 virtual ByteVector readData(std::shared_ptr<Location> location,
72 std::shared_ptr<AccessInfo> aiToUse, size_t length,
73 CardBehavior behaviorFlags) = 0;
74
83 virtual ByteVector readDataHeader(std::shared_ptr<Location> location,
84 std::shared_ptr<AccessInfo> aiToUse) = 0;
85
91 {
92 return last_read_signature_;
93 }
94
95 protected:
97};
98}
99
100#endif
AccessInfo.
Card service.
The base card service class for all services.
Definition: cardservice.hpp:50
The base storage card service class for all storage services.
Definition: storagecardservice.hpp:30
SignatureResult last_read_signature_
Definition: storagecardservice.hpp:96
SignatureResult IKS_getLastReadSignature()
Definition: storagecardservice.hpp:90
virtual void erase(std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse)=0
Erase a specific location on the card.
virtual void writeData(std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse, std::shared_ptr< AccessInfo > aiToWrite, const ByteVector &data, CardBehavior behaviorFlags)=0
Write data on a specific location, using given keys.
virtual ByteVector readData(std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse, size_t length, CardBehavior behaviorFlags)=0
Read data on a specific location, using given keys.
virtual ByteVector readDataHeader(std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse)=0
Read data header on a specific location, using given keys.
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Location.
Definition: asn1.hpp:9
CardServiceType
The card services.
Definition: cardservice.hpp:35
@ CST_STORAGE
Definition: cardservice.hpp:39
CardBehavior
The card behaviors.
Definition: storagecardservice.hpp:20
@ CB_AUTOSWITCHAREA
Definition: storagecardservice.hpp:22
@ CB_DEFAULT
Definition: storagecardservice.hpp:21
Definition: RemoteCrypto.hpp:9