|
|
|
@ -180,7 +180,10 @@ namespace pcsc { |
|
|
|
|
[...] |
|
|
|
|
t.commit(); // commit if we reach this line
|
|
|
|
|
} // cancelled, unless commit reaced
|
|
|
|
|
@endcode */ |
|
|
|
|
@endcode |
|
|
|
|
|
|
|
|
|
@note Micro$oft QinSCard does not know cancel, therefore |
|
|
|
|
on Windoze cancel is replaced by commit. */ |
|
|
|
|
class Transaction { |
|
|
|
|
public: |
|
|
|
|
//! Begins a transaction.
|
|
|
|
@ -356,8 +359,15 @@ namespace pcsc { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//! Use scoped transactions with @ref Transaction
|
|
|
|
|
/*! @note Micro$oft QinSCard does not know cancel, therefore
|
|
|
|
|
on Windoze cancel is replaced by commit. */ |
|
|
|
|
void cancelTransaction() { |
|
|
|
|
#ifdef WIN32 |
|
|
|
|
check(SCardEndTransaction(_id, SCARD_LEAVE_CARD), |
|
|
|
|
"smartcard end transaction"); |
|
|
|
|
#else |
|
|
|
|
check(SCardCancelTransaction(_id), "smartcard cancel transaction"); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*! @throw not_implemented if _protocol is unknown. */ |
|
|
|
|