functions to scan specific cards; refs #28
This commit is contained in:
13
src/pcsc.hxx
13
src/pcsc.hxx
@@ -547,6 +547,19 @@ namespace pcsc {
|
||||
void close(const std::string& s) {
|
||||
|
||||
}
|
||||
|
||||
//! Find all readers with a given ATR.
|
||||
/*! @param atr full or partial ATR to match to the reader's ATR
|
||||
@returns list of readers that contain @c atr in their ATR */
|
||||
Strings getReadersWithAtr(const std::string& atr) {
|
||||
Strings res;
|
||||
pcsc::Connection::Strings readers(scan());
|
||||
for (pcsc::Connection::Strings::const_iterator it(readers.begin());
|
||||
it!=readers.end(); ++it)
|
||||
if (_reader[*it].status().atr.find(atr)!=string::npos)
|
||||
res.push_back(*it);
|
||||
return res;
|
||||
}
|
||||
|
||||
//! @c false if last operation was not successful
|
||||
operator bool() const {
|
||||
|
Reference in New Issue
Block a user