File: sc_detect_card_presence.xml

package info (click to toggle)
opensc 0.11.1-2etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,284 kB
  • ctags: 7,257
  • sloc: ansic: 69,499; sh: 9,480; xml: 4,191; makefile: 346; lex: 92; perl: 25
file content (43 lines) | stat: -rw-r--r-- 1,226 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0" encoding="UTF-8"?>
<refentry id="scdetectcardpresence">
	<refentryinfo><title>OpenSC API Reference</title></refentryinfo>
	<refmeta>
		<refentrytitle>sc_detect_card_presence</refentrytitle>
		<manvolnum>3</manvolnum>
		<refmiscinfo>opensc</refmiscinfo>
	</refmeta>

	<refnamediv>
		<refname>sc_detect_card_presence</refname>
		<refpurpose>Detect presence of smart card in a reader</refpurpose>
	</refnamediv>

	<refsect1>
		<title>Synopsis</title>
		<para>
		<programlisting>
#include &lt;opensc.h&gt;

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>