LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
librarymanager.hpp
Go to the documentation of this file.
1#ifndef LIBRARYMANAGER_HPP__
2#define LIBRARYMANAGER_HPP__
3
4#include <string>
5#include <list>
6#include <mutex>
7
10
11namespace logicalaccess
12{
13class AccessControlCardService;
14
15class LLA_CORE_API LibraryManager
16{
17 public:
19 {
20 READERS_TYPE = 0,
21 CARDS_TYPE = 1,
22 UNIFIED_TYPE = 2
23 };
24
25 private:
26 LibraryManager() = default;
27
28 ~LibraryManager() = default;
29
30 static bool hasEnding(std::string const &fullString, std::string ending);
31
32 public:
33 static LibraryManager *getInstance();
34
35 void *getFctFromName(const std::string &fctname, LibraryType libraryType);
36
37 std::shared_ptr<ReaderProvider> getReaderProvider(const std::string &readertype);
38
45 std::shared_ptr<ReaderUnit> getReader(const std::string &readerName);
46
47 std::shared_ptr<Chip> getCard(const std::string &cardtype);
48
49 std::shared_ptr<Commands> getCommands(const std::string &extendedtype);
50
57 std::shared_ptr<RemoteCrypto>
59
60 std::shared_ptr<RemoteCrypto> getRemoteCrypto();
61
70 std::shared_ptr<IAESCryptoService>
71 getPKCSAESCrypto(const std::string &env_PROTECCIO_CONF_DIR,
72 const std::string &pkcs_library_shared_object_path);
73
74 static std::shared_ptr<DataTransport>
75 getDataTransport(const std::string &transporttype);
76 std::shared_ptr<KeyDiversification>
77 getKeyDiversification(const std::string &keydivtype);
78
88 std::shared_ptr<CardService> getCardService(std::shared_ptr<Chip> chip,
89 CardServiceType type);
90
98 ReaderServicePtr getReaderService(ReaderUnitPtr reader, ReaderServiceType type);
99
100 std::vector<std::string> getAvailableCards();
101
102 std::vector<std::string> getAvailableReaders();
103
104 static std::vector<std::string> getAvailableDataTransports();
105
106 void scanPlugins();
107
108 protected:
109 std::vector<std::string> getAvailablePlugins(LibraryType libraryType);
110 static void getAvailablePlugins(std::vector<std::string> &plugins,
111 getobjectinfoat objectinfoptr);
112
113 private:
114 mutable std::recursive_mutex mutex_;
115 std::map<std::string, IDynLibrary *> libLoaded;
116 static const std::string enumType[3];
117};
118}
119
120#endif
Definition: librarymanager.hpp:16
LibraryType
Definition: librarymanager.hpp:19
std::map< std::string, IDynLibrary * > libLoaded
Definition: librarymanager.hpp:115
std::recursive_mutex mutex_
Definition: librarymanager.hpp:114
LLA_IKS_API void getRemoteCrypto(const logicalaccess::iks::IslogKeyServer::IKSConfig &cfg, logicalaccess::RemoteCryptoPtr &remoteCrypto)
Definition: libraryentry.cpp:14
Definition: asn1.hpp:9
std::shared_ptr< ReaderUnit > ReaderUnitPtr
Definition: lla_fwd.hpp:33
ReaderServiceType
Definition: reader_service.hpp:10
CardServiceType
The card services.
Definition: cardservice.hpp:35
std::shared_ptr< ReaderService > ReaderServicePtr
Definition: lla_fwd.hpp:67
bool hasEnding(std::string const &fullString, std::string ending)
void getPKCSAESCrypto(std::shared_ptr< logicalaccess::IAESCryptoService > &aes_crypto, const std::string &pkcs_shared_object_path)
Definition: libraryentry.cpp:77
Definition: IslogKeyServer.hpp:24