<!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.h 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.6.2-20100208 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data 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 class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_c68a5dfdca54003c765e303a18006edb.html">src</a> </div> </div> <div class="contents"> <h1>prothandler.h File Reference</h1> <p>This handles protocol defaults, PTS, etc. <a href="#_details">More...</a></p> <div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dynsection"> </div> <p><a href="prothandler_8h_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a719a4cc70475733ac04ade1a4f92e845"></a><!-- doxytag: member="prothandler.h::SET_PROTOCOL_WRONG_ARGUMENT" ref="a719a4cc70475733ac04ade1a4f92e845" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>SET_PROTOCOL_WRONG_ARGUMENT</b> -1</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a50b3b4819bdc3aeba53ff8b005c7a407"></a><!-- doxytag: member="prothandler.h::SET_PROTOCOL_PPS_FAILED" ref="a50b3b4819bdc3aeba53ff8b005c7a407" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>SET_PROTOCOL_PPS_FAILED</b> -2</td></tr> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">UCHAR </td><td class="memItemRight" valign="bottom"><a class="el" href="prothandler_8h.html#ab90a8ce8ccece0e82beb131d99e42724">PHGetDefaultProtocol</a> (PUCHAR, DWORD)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the default protocol used immediately after reset. <a href="#ab90a8ce8ccece0e82beb131d99e42724"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">UCHAR </td><td class="memItemRight" valign="bottom"><a class="el" href="prothandler_8h.html#ae1bf5f71af644725f12dcdb2e26e4111">PHGetAvailableProtocols</a> (PUCHAR, DWORD)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the protocols supported by the card. <a href="#ae1bf5f71af644725f12dcdb2e26e4111"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">DWORD </td><td class="memItemRight" valign="bottom"><a class="el" href="prothandler_8h.html#a3f27bce2e5c3ba9e7d97240d6c01a746">PHSetProtocol</a> (struct <a class="el" href="structReaderContext.html">ReaderContext</a> *, DWORD, UCHAR, UCHAR)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Determine which protocol to use. <a href="#a3f27bce2e5c3ba9e7d97240d6c01a746"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This handles protocol defaults, PTS, etc. </p> <p>Definition in file <a class="el" href="prothandler_8h_source.html">prothandler.h</a>.</p> <hr/><h2>Function Documentation</h2> <a class="anchor" id="ae1bf5f71af644725f12dcdb2e26e4111"></a><!-- doxytag: member="prothandler.h::PHGetAvailableProtocols" ref="ae1bf5f71af644725f12dcdb2e26e4111" args="(PUCHAR, DWORD)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">UCHAR PHGetAvailableProtocols </td> <td>(</td> <td class="paramtype">PUCHAR </td> <td class="paramname"> <em>pucAtr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">DWORD </td> <td class="paramname"> <em>dwLength</em></td><td> </td> </tr> <tr> <td></td> <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#l00055">55</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#l00043">ATRDecodeAtr()</a>.</p> <p>Referenced by <a class="el" href="winscard_8c_source.html#l00271">SCardConnect()</a>, and <a class="el" href="winscard_8c_source.html#l00527">SCardReconnect()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ab90a8ce8ccece0e82beb131d99e42724"></a><!-- doxytag: member="prothandler.h::PHGetDefaultProtocol" ref="ab90a8ce8ccece0e82beb131d99e42724" args="(PUCHAR, DWORD)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">UCHAR PHGetDefaultProtocol </td> <td>(</td> <td class="paramtype">PUCHAR </td> <td class="paramname"> <em>pucAtr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">DWORD </td> <td class="paramname"> <em>dwLength</em></td><td> </td> </tr> <tr> <td></td> <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#l00035">35</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#l00043">ATRDecodeAtr()</a>.</p> <p>Referenced by <a class="el" href="winscard_8c_source.html#l00271">SCardConnect()</a>, and <a class="el" href="winscard_8c_source.html#l00527">SCardReconnect()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a3f27bce2e5c3ba9e7d97240d6c01a746"></a><!-- doxytag: member="prothandler.h::PHSetProtocol" ref="a3f27bce2e5c3ba9e7d97240d6c01a746" args="(struct ReaderContext *, DWORD, UCHAR, UCHAR)" --> <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> * </td> <td class="paramname"> <em>rContext</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">DWORD </td> <td class="paramname"> <em>dwPreferred</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">UCHAR </td> <td class="paramname"> <em>ucAvailable</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">UCHAR </td> <td class="paramname"> <em>ucDefault</em></td><td> </td> </tr> <tr> <td></td> <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#a1f2d9c683aa5360f8576ef2c09ed4f21" 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#l00080">80</a> of file <a class="el" href="prothandler_8c_source.html">prothandler.c</a>.</p> <p>References <a class="el" href="ifdwrapper_8c_source.html#l00036">IFDSetPTS()</a>, <a class="el" href="pcsclite_8h_source.html#l00141">SCARD_PROTOCOL_T0</a>, and <a class="el" href="pcsclite_8h_source.html#l00142">SCARD_PROTOCOL_T1</a>.</p> <p>Referenced by <a class="el" href="winscard_8c_source.html#l00271">SCardConnect()</a>, and <a class="el" href="winscard_8c_source.html#l00527">SCardReconnect()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address> </body> </html>