Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 6c21d55247420ace69cad1d05267fc34 > files > 174

pcsc-lite-doc-1.7.2-4.fc15.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>pcsc-lite: prothandler.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">pcsc-lite&#160;<span id="projectnumber">1.7.2</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_7a4553ee0c3b13d0e595a5d1659110a6.html">src</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">prothandler.c File Reference</div>  </div>
</div>
<div class="contents">

<p>This handles protocol defaults, PTS, etc.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;config.h&quot;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;misc.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="pcscd_8h_source.html">pcscd.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="debuglog_8h_source.html">debuglog.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="readerfactory_8h_source.html">readerfactory.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="prothandler_8h_source.html">prothandler.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="atrhandler_8h_source.html">atrhandler.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ifdwrapper_8h_source.html">ifdwrapper.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="eventhandler_8h_source.html">eventhandler.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for prothandler.c:</div>
<div class="dyncontent">
<div class="center"><img src="prothandler_8c__incl.png" border="0" usemap="#prothandler_8c" alt=""/></div>
<map name="prothandler_8c" id="prothandler_8c">
<area shape="rect" id="node7" href="misc_8h_source.html" title="misc.h" alt="" coords="184,83,245,112"/><area shape="rect" id="node9" href="pcscd_8h.html" title="This keeps a list of defines for pcsc&#45;lite." alt="" coords="245,160,312,189"/><area shape="rect" id="node11" href="debuglog_8h.html" title="This handles debugging." alt="" coords="320,83,405,112"/><area shape="rect" id="node13" href="readerfactory_8h.html" title="This keeps track of a list of currently available reader structures." alt="" coords="429,83,539,112"/><area shape="rect" id="node33" href="prothandler_8h.html" title="This handles protocol defaults, PTS, etc." alt="" coords="563,83,659,112"/><area shape="rect" id="node35" href="atrhandler_8h.html" title="This keeps track of smartcard protocols, timing issues and Answer to Reset ATR handling." alt="" coords="683,83,773,112"/><area shape="rect" id="node37" href="ifdwrapper_8h.html" title="This wraps the dynamic ifdhandler functions." alt="" coords="797,83,891,112"/><area shape="rect" id="node39" href="eventhandler_8h.html" title="This handles card insertion/removal events, updates ATR, protocol, and status information." alt="" coords="915,83,1021,112"/><area shape="rect" id="node19" href="ifdhandler_8h.html" title="ifdhandler.h" alt="" coords="336,160,424,189"/><area shape="rect" id="node26" href="simclist_8h_source.html" title="simclist.h" alt="" coords="448,160,525,189"/><area shape="rect" id="node21" href="pcsclite_8h.html" title="This keeps a list of defines for pcsc&#45;lite." alt="" coords="240,237,317,267"/><area shape="rect" id="node23" href="wintypes_8h.html" title="This keeps a list of Windows(R) types." alt="" coords="236,315,321,344"/></map>
</div>
</div>
<p><a href="prothandler_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">UCHAR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prothandler_8c.html#a30e7c843c2a5a626a1df5abe4a116e99">PHGetDefaultProtocol</a> (PUCHAR pucAtr, DWORD dwLength)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the default protocol used immediately after reset.  <a href="#a30e7c843c2a5a626a1df5abe4a116e99"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">UCHAR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prothandler_8c.html#a028195440f572393f25e2daf6d4df05b">PHGetAvailableProtocols</a> (PUCHAR pucAtr, DWORD dwLength)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the protocols supported by the card.  <a href="#a028195440f572393f25e2daf6d4df05b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">DWORD&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prothandler_8c.html#a4522f0d45b2ab13cf3d264a605eec02d">PHSetProtocol</a> (struct <a class="el" href="structReaderContext.html">ReaderContext</a> *rContext, DWORD dwPreferred, UCHAR ucAvailable, UCHAR ucDefault)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine which protocol to use.  <a href="#a4522f0d45b2ab13cf3d264a605eec02d"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This handles protocol defaults, PTS, etc. </p>

<p>Definition in file <a class="el" href="prothandler_8c_source.html">prothandler.c</a>.</p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a028195440f572393f25e2daf6d4df05b"></a><!-- doxytag: member="prothandler.c::PHGetAvailableProtocols" ref="a028195440f572393f25e2daf6d4df05b" args="(PUCHAR pucAtr, DWORD dwLength)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UCHAR PHGetAvailableProtocols </td>
          <td>(</td>
          <td class="paramtype">PUCHAR&#160;</td>
          <td class="paramname"><em>pucAtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DWORD&#160;</td>
          <td class="paramname"><em>dwLength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the protocols supported by the card. </p>
<p>These protocols are returned from the function as bit masks. </p>

<p>Definition at line <a class="el" href="prothandler_8c_source.html#l00054">54</a> of file <a class="el" href="prothandler_8c_source.html">prothandler.c</a>.</p>

<p>References <a class="el" href="atrhandler_8c_source.html#l00044">ATRDecodeAtr()</a>.</p>

<p>Referenced by <a class="el" href="winscard_8c_source.html#l00209">SCardConnect()</a>, and <a class="el" href="winscard_8c_source.html#l00491">SCardReconnect()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="prothandler_8c_a028195440f572393f25e2daf6d4df05b_cgraph.png" border="0" usemap="#prothandler_8c_a028195440f572393f25e2daf6d4df05b_cgraph" alt=""/></div>
<map name="prothandler_8c_a028195440f572393f25e2daf6d4df05b_cgraph" id="prothandler_8c_a028195440f572393f25e2daf6d4df05b_cgraph">
<area shape="rect" id="node3" href="atrhandler_8c.html#a76bf3383cc11cc95499325c987d6f193" title="Uncomment the following for ATR debugging or use ." alt="" coords="225,5,335,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a30e7c843c2a5a626a1df5abe4a116e99"></a><!-- doxytag: member="prothandler.c::PHGetDefaultProtocol" ref="a30e7c843c2a5a626a1df5abe4a116e99" args="(PUCHAR pucAtr, DWORD dwLength)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UCHAR PHGetDefaultProtocol </td>
          <td>(</td>
          <td class="paramtype">PUCHAR&#160;</td>
          <td class="paramname"><em>pucAtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DWORD&#160;</td>
          <td class="paramname"><em>dwLength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the default protocol used immediately after reset. </p>
<p>This protocol is returned from the function. </p>

<p>Definition at line <a class="el" href="prothandler_8c_source.html#l00034">34</a> of file <a class="el" href="prothandler_8c_source.html">prothandler.c</a>.</p>

<p>References <a class="el" href="atrhandler_8c_source.html#l00044">ATRDecodeAtr()</a>.</p>

<p>Referenced by <a class="el" href="winscard_8c_source.html#l00209">SCardConnect()</a>, and <a class="el" href="winscard_8c_source.html#l00491">SCardReconnect()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="prothandler_8c_a30e7c843c2a5a626a1df5abe4a116e99_cgraph.png" border="0" usemap="#prothandler_8c_a30e7c843c2a5a626a1df5abe4a116e99_cgraph" alt=""/></div>
<map name="prothandler_8c_a30e7c843c2a5a626a1df5abe4a116e99_cgraph" id="prothandler_8c_a30e7c843c2a5a626a1df5abe4a116e99_cgraph">
<area shape="rect" id="node3" href="atrhandler_8c.html#a76bf3383cc11cc95499325c987d6f193" title="Uncomment the following for ATR debugging or use ." alt="" coords="207,5,316,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a4522f0d45b2ab13cf3d264a605eec02d"></a><!-- doxytag: member="prothandler.c::PHSetProtocol" ref="a4522f0d45b2ab13cf3d264a605eec02d" args="(struct ReaderContext *rContext, DWORD dwPreferred, UCHAR ucAvailable, UCHAR ucDefault)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DWORD PHSetProtocol </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structReaderContext.html">ReaderContext</a> *&#160;</td>
          <td class="paramname"><em>rContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DWORD&#160;</td>
          <td class="paramname"><em>dwPreferred</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UCHAR&#160;</td>
          <td class="paramname"><em>ucAvailable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UCHAR&#160;</td>
          <td class="paramname"><em>ucDefault</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Determine which protocol to use. </p>
<p>SCardConnect has a DWORD dwPreferredProtocols that is a bitmask of what protocols to use. Basically, if T=N where N is not zero will be used first if it is available in ucAvailable. Otherwise it will always default to T=0.</p>
<p><a class="el" href="ifdwrapper_8c.html#ad794bea544918757cd2fbbae218fa458" title="Set the protocol type selection (PTS).">IFDSetPTS()</a> is _always_ called so that the driver can initialise its data </p>

<p>Definition at line <a class="el" href="prothandler_8c_source.html#l00079">79</a> of file <a class="el" href="prothandler_8c_source.html">prothandler.c</a>.</p>

<p>References <a class="el" href="ifdhandler_8h_source.html#l00341">IFD_NOT_SUPPORTED</a>, <a class="el" href="ifdhandler_8h_source.html#l00334">IFD_PROTOCOL_NOT_SUPPORTED</a>, <a class="el" href="ifdhandler_8h_source.html#l00328">IFD_SUCCESS</a>, <a class="el" href="ifdwrapper_8c_source.html#l00046">IFDSetPTS()</a>, <a class="el" href="pcsclite_8h_source.html#l00152">SCARD_PROTOCOL_T0</a>, and <a class="el" href="pcsclite_8h_source.html#l00153">SCARD_PROTOCOL_T1</a>.</p>

<p>Referenced by <a class="el" href="winscard_8c_source.html#l00209">SCardConnect()</a>, and <a class="el" href="winscard_8c_source.html#l00491">SCardReconnect()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="prothandler_8c_a4522f0d45b2ab13cf3d264a605eec02d_cgraph.png" border="0" usemap="#prothandler_8c_a4522f0d45b2ab13cf3d264a605eec02d_cgraph" alt=""/></div>
<map name="prothandler_8c_a4522f0d45b2ab13cf3d264a605eec02d_cgraph" id="prothandler_8c_a4522f0d45b2ab13cf3d264a605eec02d_cgraph">
<area shape="rect" id="node3" href="ifdwrapper_8c.html#ad794bea544918757cd2fbbae218fa458" title="Set the protocol type selection (PTS)." alt="" coords="163,5,253,35"/><area shape="rect" id="node5" href="group__IFDHandler.html#gaa6fc195cb450a147550f4671492257ad" title="This function should set the Protocol Type Selection (PTS) of a particular card/slot using the three ..." alt="" coords="301,5,491,35"/></map>
</div>
</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Sep 15 2011 for pcsc-lite by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>