LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
cardsformatcomposite.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_CARDSFORMATCOMPOSITE_HPP
8#define LOGICALACCESS_CARDSFORMATCOMPOSITE_HPP
9
10#include <map>
14
15namespace logicalaccess
16{
20typedef std::map<std::string, std::shared_ptr<FormatInfos>> FormatInfosList;
21
25typedef std::pair<std::string, std::shared_ptr<FormatInfos>> FormatInfosPair;
26
30typedef std::vector<std::string> CardTypeList;
31
35class LLA_CORE_API CardsFormatComposite : public XmlSerializable
36{
37 public:
38 using XmlSerializable::serialize;
39 using XmlSerializable::unSerialize;
40
45
49 virtual ~CardsFormatComposite();
50
57 std::shared_ptr<Format> createFormatFromXml(const std::string &xmlstring,
58 const std::string &rootNode) const;
59
65 void addFormatForCard(const std::string &type,
66 std::shared_ptr<FormatInfos> formatInfos);
67
76 std::shared_ptr<FormatInfos> retrieveFormatForCard(const std::string &type);
77
82 void removeFormatForCard(const std::string &type);
83
88 CardTypeList getConfiguredCardTypes();
89
94 std::shared_ptr<Format> readFormat();
95
101 std::shared_ptr<Format> readFormat(std::shared_ptr<Chip> chip);
102
107 void serialize(boost::property_tree::ptree &parentNode) override;
108
113 void unSerialize(boost::property_tree::ptree &node) override;
114
119 std::string getDefaultXmlNodeName() const override;
120
125 std::shared_ptr<ReaderUnit> getReaderUnit() const;
126
127 /*
128 * \brief Set the reader unit.
129 * \param unit The reader unit.
130 */
131 void setReaderUnit(std::weak_ptr<ReaderUnit> unit);
132
133 protected:
139 std::weak_ptr<ReaderUnit> d_ReaderUnit;
140};
141}
142
143#endif /* LOGICALACCESS_CARDSFORMATCOMPOSITE_HPP */
Chip descriptor.
A Cards format composite class.
Definition: cardsformatcomposite.hpp:36
std::weak_ptr< ReaderUnit > d_ReaderUnit
The reader unit.
Definition: cardsformatcomposite.hpp:139
FormatInfosList formatsList
The configured formats' list.
Definition: cardsformatcomposite.hpp:134
A Xml Serializable base class. Add Xml serialization to a class.
Definition: xmlserializable.hpp:54
Format information.
Definition: asn1.hpp:9
std::vector< std::string > CardTypeList
A card type list.
Definition: cardsformatcomposite.hpp:30
std::pair< std::string, std::shared_ptr< FormatInfos > > FormatInfosPair
A format infos pair.
Definition: cardsformatcomposite.hpp:25
std::map< std::string, std::shared_ptr< FormatInfos > > FormatInfosList
A format infos map.
Definition: cardsformatcomposite.hpp:20
LLA_READERS_PCSC_API void getReaderUnit(const std::string &readerName, std::shared_ptr< logicalaccess::ReaderUnit > &u)
Definition: libraryentry.cpp:25