2005-03-01 23:18:24 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2005-02-23 02:52:20 +00:00
|
|
|
<refentry id="scdetectcardpresence">
|
2005-03-01 23:18:24 +00:00
|
|
|
<refentryinfo><title>OpenSC API Reference</title></refentryinfo>
|
2005-02-23 02:52:20 +00:00
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>sc_detect_card_presence</refentrytitle>
|
|
|
|
<manvolnum>3</manvolnum>
|
|
|
|
<refmiscinfo>opensc</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>sc_detect_card_presence</refname>
|
2005-06-16 19:35:31 +00:00
|
|
|
<refpurpose>Detect presence of smart card in a reader</refpurpose>
|
2005-02-23 02:52:20 +00:00
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Synopsis</title>
|
|
|
|
<para>
|
|
|
|
<programlisting>
|
2005-03-01 23:18:24 +00:00
|
|
|
#include <opensc.h>
|
2005-02-23 02:52:20 +00:00
|
|
|
|
|
|
|
int sc_detect_card_presence(sc_reader_t *reader, int slot_id);
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<para>
|
|
|
|
This function checks whether <emphasis>reader</emphasis> has a card present in
|
|
|
|
<emphasis>slot_id</emphasis>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Return value</title>
|
|
|
|
<para>
|
|
|
|
If an error occurred, the return value is a a negative OpenSC error code. If no card is present, 0
|
|
|
|
is returned. Otherwise, a positive value is returned, which is a combination of flags. The flag
|
|
|
|
SC_SLOT_CARD_PRESENT is always set. In addition, if the card was exchanged, the
|
|
|
|
SC_SLOT_CARD_CHANGED flag is set.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|