40
www.ubisys.de
9.
ubisys RFID/Smart Card API
ubisys provides a C++ RFID/Smart Card API library, which provides an easy and convenient way of
dealing with the Smart Card API. It can be used on Windows, MacOS X and Linux, as all operating
systems use the same underlying Smart Card API.
9.1.
Overview
9.2.
Basic RFID/Smart Card API
The classes CSmartCardContext and CSmartCard encapsulate handles to opaque Smart Card API
objects, which are established in the constructors and released in the destructors.
Copying of and assigning to class instances is not supported. To enforce correct usage, the classes
provide private copy constructors and assignment operators (operator=), to prevent objects from being
copied in inappropriate ways. Class instances shall always be passed by reference.
The same applies to CSmartCardTransaction, which does not encapsulate a handle, but manipulates
the state of an object associated with a handle.
9.2.1.
CSmartCardContext
Manages automatic context establishment and release and provides utility functions.
9.2.1.1.
Local Type Definitions
An alias tstring is defined for std::basic_string<TCHAR>. Similar to TCHAR, for non-Unicode builds,
tstring will map to std::string, for Unicode builds, it will map to std::wstring.
typedef
std::basic_string<TCHAR> tstring;
9.2.1.2.
Constructor
explicit
CSmartCardContext(
const
DWORD dwScope = SCARD_SCOPE_USER);
The constructor establishes the context by calling SCardEstablishContext(). The default scope is
SCARD_SCOPE_USER, which can be overridden.
The destructor will release the context by calling SCardReleaseContext().
9.2.1.3.
Methods
SCARDCONTEXT GetHandle()
The method GetHandle() obtains the underlying handle and is used to directly call API Smart Card
Summary of Contents for 7047
Page 1: ...13 56 MHz RFID USB READER REFERENCE MANUAL...
Page 28: ...28 www ubisys de...
Page 34: ...34 www ubisys de...