TSDuck Version 3.16-1064 (TSDuck - The MPEG Transport Stream Toolkit)
tsPCSC.h File Reference

PC/SC smartcard API utilities. More...

Classes

struct  ts::pcsc::ReaderState
 State of a smartcard reader. More...
 

Namespaces

 ts
 TSDuck namespace, containing all TSDuck classes and functions.
 
 ts::pcsc
 PC/SC smartcard API utilities.
 

Typedefs

typedef std::vector< ReaderState > ts::pcsc::ReaderStateVector
 Vector of smartcard reader states.
 

Functions

::LONG ts::pcsc::GetStates (::SCARDCONTEXT context, ReaderStateVector &states, uint32_t timeout_ms=INFINITE)
 Get the state of all smartcard readers in the system. More...
 
::LONG ts::pcsc::GetStatesChange (::SCARDCONTEXT context, ReaderStateVector &states, uint32_t timeout_ms=INFINITE)
 Get the state change of all smartcard readers in the system. More...
 
::LONG ts::pcsc::ListReaders (::SCARDCONTEXT context, UStringVector &readers)
 Get the list of all smartcard readers in the system. More...
 
bool ts::pcsc::MatchATR (const uint8_t *atr1, size_t atr1_size, const uint8_t *atr2, size_t atr2_size, const uint8_t *mask=nullptr, size_t mask_size=0)
 Check if an ATR matches an expected one. More...
 
::LONG ts::pcsc::SearchSmartCard (::SCARDCONTEXT context, UString &reader_name, const uint8_t *atr=nullptr, size_t atr_size=0, const uint8_t *atr_mask=nullptr, size_t atr_mask_size=0, const uint8_t *pwr=nullptr, size_t pwr_size=0, const uint8_t *pwr_mask=nullptr, size_t pwr_mask_size=0, uint32_t timeout_ms=INFINITE)
 Search all smartcard readers for a smartcard matching an expected ATR. More...
 
const char * ts::pcsc::StrError (::LONG status)
 Get an error message for a PC/SC error. More...
 
bool ts::pcsc::Success (::LONG status, Report &report=(*ts::CerrReport::Instance()))
 Check a PC/SC status. More...
 
::LONG ts::pcsc::Transmit (::SCARDHANDLE handle, uint32_t protocol, const void *send, size_t send_size, void *resp, size_t resp_size, uint16_t &sw, size_t &resp_length)
 Transmit an APDU to smartcard and read response. More...
 

Detailed Description

PC/SC smartcard API utilities.