Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 2aa62c5bbb658df1fece777472a7bcf2 > files > 693

barry-devel-docs-0.17-0.3.20100730git.fc14.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>Barry: Barry::Mode::Mode Class 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&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><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="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceBarry.html">Barry</a>::<b>Mode</b>::<a class="el" href="classBarry_1_1Mode_1_1Mode.html">Mode</a>
  </div>
</div>
<div class="contents">
<h1>Barry::Mode::Mode Class Reference</h1><!-- doxytag: class="Barry::Mode::Mode" -->
<p>Base class for simple mode classes.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="m__mode__base_8h_source.html">m_mode_base.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Barry::Mode::Mode:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Mode_1_1Mode__inherit__graph.png" border="0" usemap="#Barry_1_1Mode_1_1Mode_inherit__map" alt="Inheritance graph"/></div>
<map name="Barry_1_1Mode_1_1Mode_inherit__map" id="Barry_1_1Mode_1_1Mode_inherit__map">
<area shape="rect" id="node3" href="classBarry_1_1Mode_1_1Desktop.html" title="The main interface class to the device databases." alt="" coords="5,86,160,117"/><area shape="rect" id="node5" href="classBarry_1_1Mode_1_1JavaLoader.html" title="The main interface class to the java program loader protocol." alt="" coords="184,86,363,117"/><area shape="rect" id="node7" href="classBarry_1_1Mode_1_1JVMDebug.html" title="The main interface class to the java program debugger protocol." alt="" coords="387,86,557,117"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for Barry::Mode::Mode:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Mode_1_1Mode__coll__graph.png" border="0" usemap="#Barry_1_1Mode_1_1Mode_coll__map" alt="Collaboration graph"/></div>
<map name="Barry_1_1Mode_1_1Mode_coll__map" id="Barry_1_1Mode_1_1Mode_coll__map">
<area shape="rect" id="node2" href="classBarry_1_1Controller.html" title="The main interface class." alt="" coords="1443,265,1563,295"/><area shape="rect" id="node4" href="classBarry_1_1Pin.html" title="Barry::Pin" alt="" coords="908,5,988,35"/><area shape="rect" id="node8" href="structBarry_1_1ProbeResult.html" title="Barry::ProbeResult" alt="" coords="1209,110,1343,141"/><area shape="rect" id="node6" href="classUsb_1_1Device.html" title="Usb::Device" alt="" coords="529,287,625,318"/><area shape="rect" id="node17" href="classBarry_1_1SocketZero.html" title="Barry::SocketZero" alt="" coords="1211,334,1341,365"/><area shape="rect" id="node20" href="classBarry_1_1SocketRoutingQueue.html" title="Barry::SocketRoutingQueue" alt="" coords="853,398,1043,429"/><area shape="rect" id="node31" href="classUsb_1_1Interface.html" title="Usb::Interface" alt="" coords="1073,262,1177,293"/><area shape="rect" id="node10" href="structUsb_1_1EndpointPair.html" title="Usb::EndpointPair" alt="" coords="885,91,1011,122"/><area shape="rect" id="node13" title="STL class." alt="" coords="908,157,988,187"/><area shape="rect" id="node15" title="STL class." alt="" coords="493,157,661,187"/><area shape="rect" id="node37" href="classBarry_1_1Socket.html" title="Encapsulates a &quot;logical socket&quot; in the Blackberry USB protocol." alt="" coords="1451,350,1555,381"/><area shape="rect" id="node25" href="classBarry_1_1DataQueue.html" title="This class provides a thread aware fifo queue for Data objects, providing memory..." alt="" coords="512,419,643,450"/><area shape="rect" id="node29" href="classBarry_1_1Data.html" title="Barry::Data" alt="" coords="5,419,96,450"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classBarry_1_1Mode_1_1Mode-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Mode_1_1Mode.html#a1110243f16be2b647ed9810da27abe11">Open</a> (const char *password=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Select device mode.  <a href="#a1110243f16be2b647ed9810da27abe11"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Mode_1_1Mode.html#acc4f959c1a8473562219bd0a265b004c">RetryPassword</a> (const char *password)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retry a failed password attempt from the first call to <a class="el" href="classBarry_1_1Mode_1_1Mode.html#a1110243f16be2b647ed9810da27abe11" title="Select device mode.">Open()</a>.  <a href="#acc4f959c1a8473562219bd0a265b004c"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Base class for simple mode classes. </p>
<p>Put common code here. </p>

<p>Definition at line <a class="el" href="m__mode__base_8h_source.html#l00037">37</a> of file <a class="el" href="m__mode__base_8h_source.html">m_mode_base.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a1110243f16be2b647ed9810da27abe11"></a><!-- doxytag: member="Barry::Mode::Mode::Open" ref="a1110243f16be2b647ed9810da27abe11" args="(const char *password=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Barry::Mode::Mode::Open </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em> = <code>0</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Select device mode. </p>
<p>This is required before using any other mode-based operations, such as GetDBDB() and LoadDatabase().</p>
<p>This function opens a socket to the device for communicating in <a class="el" href="classBarry_1_1Mode_1_1Desktop.html" title="The main interface class to the device databases.">Desktop</a> mode. If the device requires it, specify the password with a const char* string in password. The password will not be stored in memory inside this class, only a hash will be generated from it. After using the hash, the hash memory will be set to 0. The application is responsible for safely handling the raw password data.</p>
<p>You can retry the password by catching <a class="el" href="classBarry_1_1BadPassword.html" title="A bad or unknown password when talking to the device.">Barry::BadPassword</a> and calling <a class="el" href="classBarry_1_1Mode_1_1Mode.html#acc4f959c1a8473562219bd0a265b004c" title="Retry a failed password attempt from the first call to Open().">RetryPassword()</a> with the new password.</p>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classBarry_1_1Error.html" title="The base class for any future derived exceptions.">Barry::Error</a></em>&nbsp;</td><td>Thrown on protocol error.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>std::logic_error()</em>&nbsp;</td><td>Thrown if unsupported mode is requested, or if socket already open.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classBarry_1_1BadPassword.html" title="A bad or unknown password when talking to the device.">Barry::BadPassword</a></em>&nbsp;</td><td>Thrown when password is invalid or if not enough retries left in the device. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="m__mode__base_8cc_source.html#l00067">67</a> of file <a class="el" href="m__mode__base_8cc_source.html">m_mode_base.cc</a>.</p>

<p>References <a class="el" href="m__mode__base_8cc_source.html#l00096">RetryPassword()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Mode_1_1Mode_a1110243f16be2b647ed9810da27abe11_cgraph.png" border="0" usemap="#classBarry_1_1Mode_1_1Mode_a1110243f16be2b647ed9810da27abe11_cgraph_map" alt=""></div>
<map name="classBarry_1_1Mode_1_1Mode_a1110243f16be2b647ed9810da27abe11_cgraph_map" id="classBarry_1_1Mode_1_1Mode_a1110243f16be2b647ed9810da27abe11_cgraph">
<area shape="rect" id="node3" href="classBarry_1_1Mode_1_1Mode.html#acc4f959c1a8473562219bd0a265b004c" title="Retry a failed password attempt from the first call to Open()." alt="" coords="236,5,473,35"/><area shape="rect" id="node5" href="classBarry_1_1SocketZero.html#a0b69a799052f54bd18522270fb4ce11a" title="Open a logical socket on the device." alt="" coords="524,5,695,35"/><area shape="rect" id="node7" href="classBarry_1_1Packet.html#a764cefd38c2dc1970fccabc01044687d" title="Returns the command value of the receive packet." alt="" coords="745,5,919,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="acc4f959c1a8473562219bd0a265b004c"></a><!-- doxytag: member="Barry::Mode::Mode::RetryPassword" ref="acc4f959c1a8473562219bd0a265b004c" args="(const char *password)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Barry::Mode::Mode::RetryPassword </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retry a failed password attempt from the first call to <a class="el" href="classBarry_1_1Mode_1_1Mode.html#a1110243f16be2b647ed9810da27abe11" title="Select device mode.">Open()</a>. </p>
<p>Only call this function in response to <a class="el" href="classBarry_1_1BadPassword.html" title="A bad or unknown password when talking to the device.">Barry::BadPassword</a> exceptions that are thrown from <a class="el" href="classBarry_1_1Mode_1_1Mode.html#a1110243f16be2b647ed9810da27abe11" title="Select device mode.">Open()</a>.</p>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classBarry_1_1Error.html" title="The base class for any future derived exceptions.">Barry::Error</a></em>&nbsp;</td><td>Thrown on protocol error.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>std::logic_error()</em>&nbsp;</td><td>Thrown if in unsupported mode, or if socket already open.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classBarry_1_1BadPassword.html" title="A bad or unknown password when talking to the device.">Barry::BadPassword</a></em>&nbsp;</td><td>Thrown when password is invalid or if not enough retries left in the device. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="m__mode__base_8cc_source.html#l00096">96</a> of file <a class="el" href="m__mode__base_8cc_source.html">m_mode_base.cc</a>.</p>

<p>References <a class="el" href="socket_8cc_source.html#l00439">Barry::SocketZero::Open()</a>.</p>

<p>Referenced by <a class="el" href="m__mode__base_8cc_source.html#l00067">Open()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Mode_1_1Mode_acc4f959c1a8473562219bd0a265b004c_cgraph.png" border="0" usemap="#classBarry_1_1Mode_1_1Mode_acc4f959c1a8473562219bd0a265b004c_cgraph_map" alt=""></div>
<map name="classBarry_1_1Mode_1_1Mode_acc4f959c1a8473562219bd0a265b004c_cgraph_map" id="classBarry_1_1Mode_1_1Mode_acc4f959c1a8473562219bd0a265b004c_cgraph">
<area shape="rect" id="node3" href="classBarry_1_1SocketZero.html#a0b69a799052f54bd18522270fb4ce11a" title="Open a logical socket on the device." alt="" coords="295,5,465,35"/><area shape="rect" id="node5" href="classBarry_1_1Packet.html#a764cefd38c2dc1970fccabc01044687d" title="Returns the command value of the receive packet." alt="" coords="516,5,689,35"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Mode_1_1Mode_acc4f959c1a8473562219bd0a265b004c_icgraph.png" border="0" usemap="#classBarry_1_1Mode_1_1Mode_acc4f959c1a8473562219bd0a265b004c_icgraph_map" alt=""></div>
<map name="classBarry_1_1Mode_1_1Mode_acc4f959c1a8473562219bd0a265b004c_icgraph_map" id="classBarry_1_1Mode_1_1Mode_acc4f959c1a8473562219bd0a265b004c_icgraph">
<area shape="rect" id="node3" href="classBarry_1_1Mode_1_1Mode.html#a1110243f16be2b647ed9810da27abe11" title="Select device mode." alt="" coords="295,5,473,35"/></map>
</div>
</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="m__mode__base_8h_source.html">m_mode_base.h</a></li>
<li><a class="el" href="m__mode__base_8cc_source.html">m_mode_base.cc</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<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>