Keypop Reader C++ API 2.0.0
Reference Reader API for C++
ObservableCardReader.hpp
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2024 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * This program and the accompanying materials are made available under the *
5 * terms of the MIT License which is available at https://opensource.org/licenses/MIT. *
6 * *
7 * SPDX-License-Identifier: MIT *
8 **************************************************************************************************/
9
10#pragma once
11
12#include <memory>
13
17
18namespace keypop {
19namespace reader {
20
23
29class ObservableCardReader : virtual public CardReader {
30public:
43
50 };
51
72 };
73
86 std::shared_ptr<CardReaderObservationExceptionHandlerSpi> exceptionHandler)
87 = 0;
88
99 virtual void addObserver(std::shared_ptr<CardReaderObserverSpi> observer) = 0;
100
110 virtual void removeObserver(const std::shared_ptr<CardReaderObserverSpi> observer) = 0;
111
117 virtual void clearObservers() = 0;
118
125 virtual int countObservers() const = 0;
126
137 virtual void startCardDetection(const DetectionMode detectionMode) = 0;
138
144 virtual void stopCardDetection() = 0;
145
163 virtual void finalizeCardProcessing() = 0;
164};
165
166} /* namespace reader */
167} /* namespace keypop */
virtual void startCardDetection(const DetectionMode detectionMode)=0
virtual void removeObserver(const std::shared_ptr< CardReaderObserverSpi > observer)=0
virtual int countObservers() const =0
virtual void setReaderObservationExceptionHandler(std::shared_ptr< CardReaderObservationExceptionHandlerSpi > exceptionHandler)=0
virtual void addObserver(std::shared_ptr< CardReaderObserverSpi > observer)=0