LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
mifareplussl1storagecardservice.hpp
Go to the documentation of this file.
1//
2// Created by xaqq on 7/2/15.
3//
4
5#ifndef LIBLOGICALACCESS_MIFAREPLSSTORAGECARDSERVICE_SL1_H
6#define LIBLOGICALACCESS_MIFAREPLSSTORAGECARDSERVICE_SL1_H
7
9#include <logicalaccess/plugins/cards/mifareplus/lla_cards_mifareplus_api.hpp>
10
11namespace logicalaccess
12{
13#define STORAGECARDSERVICE_MIFARE_PLUS "MifarePlusStorageSL1"
14
15class LLA_CARDS_MIFAREPLUS_API MifarePlusSL1StorageCardService
17{
18
19 public:
20 explicit MifarePlusSL1StorageCardService(std::shared_ptr<Chip> chip);
21
22 std::string getCSType() override
23 {
25 }
26
27 void erase(std::shared_ptr<Location> location,
28 std::shared_ptr<AccessInfo> aiToUse) override;
29
30 void writeData(std::shared_ptr<Location> location,
31 std::shared_ptr<AccessInfo> aiToUse,
32 std::shared_ptr<AccessInfo> aiToWrite, const ByteVector &data,
33 CardBehavior behaviorFlags) override;
34
35 ByteVector readData(std::shared_ptr<Location> location,
36 std::shared_ptr<AccessInfo> aiToUse, size_t length,
37 CardBehavior behaviorFlags) override;
38
39 ByteVector readDataHeader(std::shared_ptr<Location> location,
40 std::shared_ptr<AccessInfo> aiToUse) override;
41
42 private:
43 void authenticate_if_needed(std::shared_ptr<AccessInfo>);
44
50};
51}
52
53#endif // LIBLOGICALACCESS_MIFAREPLSSTORAGECARDSERVICE_SL1_H
Definition: mifareplussl1storagecardservice.hpp:17
bool has_been_authenticated_
Definition: mifareplussl1storagecardservice.hpp:49
std::string getCSType() override
Definition: mifareplussl1storagecardservice.hpp:22
The Mifare storage card service base class.
Definition: mifarestoragecardservice.hpp:27
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
#define STORAGECARDSERVICE_MIFARE_PLUS
Definition: mifareplussl1storagecardservice.hpp:13
Mifare storage card service.
Definition: asn1.hpp:9
CardBehavior
The card behaviors.
Definition: storagecardservice.hpp:20