opensc/doc/api/types/sc_card_t.xml

74 lines
2.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<refentry id="sccardt">
<refentryinfo><title>OpenSC API Reference</title></refentryinfo>
<refmeta>
<refentrytitle>sc_card_t</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>opensc</refmiscinfo>
</refmeta>
<refnamediv>
<refname>sc_card_t</refname>
<refpurpose>OpenSC card structure</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<para>
<programlisting>
#include &lt;opensc.h&gt;
#define SC_MAX_ATR_SIZE 33
#define SC_MAX_CARD_APPS 8
typedef struct sc_card {
struct sc_context *ctx;
struct sc_reader *reader;
struct sc_slot_info *slot;
struct sc_app_info *app[SC_MAX_CARD_APPS];
unsigned char atr[SC_MAX_ATR_SIZE];
size_t atr_len;
} sc_card_t;
</programlisting>
</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>
This structure describes a smart card object. It contains the following
members:
<variablelist>
<varlistentry>
<term><structfield>ctx</structfield></term>
<listitem><para>The context this card is associated with.</para></listitem>
</varlistentry>
<varlistentry>
<term><structfield>reader</structfield></term>
<listitem><para>The reader this card is inserted into.</para></listitem>
</varlistentry>
<varlistentry>
<term><structfield>slot</structfield></term>
<listitem><para>The slot on the reader this card is inserted into.</para></listitem>
</varlistentry>
<varlistentry>
<term><structfield>atr</structfield></term>
<listitem><para>The ATR (Answer To Reset) of the card.</para></listitem>
</varlistentry>
<varlistentry>
<term><structfield>atr_len</structfield></term>
<listitem><para>The length of the <structfield>atr</structfield> field</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
</refentry>