Allow on-demand file loading and unloading.

This commit is contained in:
2019-09-10 21:42:04 +01:00
parent 3cc7032cf4
commit 4dac7dd014
3 changed files with 161 additions and 64 deletions

View File

@@ -21,13 +21,18 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <cstdio>
#include <memory>
std::shared_ptr<int> getHostDescriptor();
std::shared_ptr<int>& getHostDescriptor();
#ifdef MANUAL_LIFETIME
void initStreams();
void closeStreams();
#endif
#ifdef DEBUG_STREAMS
std::shared_ptr<FILE> getComHostStream();
std::shared_ptr<FILE> getHostPacketStream();
std::shared_ptr<FILE> getHostAPDUStream();
std::shared_ptr<FILE> getComDevStream();
std::shared_ptr<FILE> getDevPacketStream();
std::shared_ptr<FILE> getDevAPDUStream();
std::shared_ptr<FILE>& getComHostStream();
std::shared_ptr<FILE>& getHostPacketStream();
std::shared_ptr<FILE>& getHostAPDUStream();
std::shared_ptr<FILE>& getComDevStream();
std::shared_ptr<FILE>& getDevPacketStream();
std::shared_ptr<FILE>& getDevAPDUStream();
#endif