Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > abb2634846290d27f545cecded067e1f > files > 697

barry-devel-docs-0.17.1-4.fc14.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Barry: Barry::Mode::Mode Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<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="classes.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="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
      <li><a href="annotated.html"><span>Class&nbsp;List</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" --><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">
<p><center><img src="classBarry_1_1Mode_1_1Mode__inherit__graph.png" border="0" usemap="#Barry_1_1Mode_1_1Mode__inherit__map" alt="Inheritance graph"></center>
<map name="Barry_1_1Mode_1_1Mode__inherit__map">
<area shape="rect" href="classBarry_1_1Mode_1_1Desktop.html" title="The main interface class to the device databases." alt="" coords="200,5,347,32"><area shape="rect" href="classBarry_1_1Mode_1_1JavaLoader.html" title="The main interface class to the java program loader protocol." alt="" coords="189,56,357,83"><area shape="rect" href="classBarry_1_1Mode_1_1JVMDebug.html" title="The main interface class to the java program debugger protocol." alt="" coords="192,107,355,133"><area shape="rect" href="classBarry_1_1Mode_1_1RawChannel.html" title="The main class for creating a raw channel session." alt="" coords="188,157,359,184"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<div class="dynheader">
Collaboration diagram for Barry::Mode::Mode:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1Mode_1_1Mode__coll__graph.png" border="0" usemap="#Barry_1_1Mode_1_1Mode__coll__map" alt="Collaboration graph"></center>
<map name="Barry_1_1Mode_1_1Mode__coll__map">
<area shape="rect" href="classBarry_1_1Controller.html" title="The main interface class." alt="" coords="857,216,972,243"><area shape="rect" title="STL class." alt="" coords="332,85,412,112"><area shape="rect" title="STL class." alt="" coords="7,85,172,112"><area shape="rect" href="classBarry_1_1DataQueue.html" title="This class provides a thread aware fifo queue for Data objects, providing memory..." alt="" coords="27,399,152,425"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classBarry_1_1Mode_1_1Mode-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Base class for simple mode classes. 
<p>
Put common code here. 
<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>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Mode_1_1Mode.html#1110243f16be2b647ed9810da27abe11">Open</a> (const char *password=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Select device mode.  <a href="#1110243f16be2b647ed9810da27abe11"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Mode_1_1Mode.html#210ebafa97831da0cacac24bd01299ac">Open</a> (const char *password, const char *name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Select device mode.  <a href="#210ebafa97831da0cacac24bd01299ac"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Mode_1_1Mode.html#cc4f959c1a8473562219bd0a265b004c">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#1110243f16be2b647ed9810da27abe11" title="Select device mode.">Open()</a>.  <a href="#cc4f959c1a8473562219bd0a265b004c"></a><br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="1110243f16be2b647ed9810da27abe11"></a><!-- doxytag: member="Barry::Mode::Mode::Open" ref="1110243f16be2b647ed9810da27abe11" 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>
This is required before using any other mode-based operations, such as GetDBDB() and LoadDatabase().<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>
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#cc4f959c1a8473562219bd0a265b004c" title="Retry a failed password attempt from the first call to Open().">RetryPassword()</a> with the new password.<p>
<dl compact><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>
</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#l00138">RetryPassword()</a>, and <a class="el" href="controller_8cc-source.html#l00164">Barry::Controller::SelectMode()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1Mode_1_1Mode_1110243f16be2b647ed9810da27abe11_cgraph.png" border="0" usemap="#classBarry_1_1Mode_1_1Mode_1110243f16be2b647ed9810da27abe11_cgraph_map" alt=""></center>
<map name="classBarry_1_1Mode_1_1Mode_1110243f16be2b647ed9810da27abe11_cgraph_map">
<area shape="rect" href="classBarry_1_1Mode_1_1Mode.html#cc4f959c1a8473562219bd0a265b004c" title="Retry a failed password attempt from the first call to Open()." alt="" coords="228,5,455,32"><area shape="rect" href="classBarry_1_1Controller.html#13ec1c4f03ed7bbff8f25ef2259b3836" title="Barry::Controller::SelectMode" alt="" coords="245,56,437,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="210ebafa97831da0cacac24bd01299ac"></a><!-- doxytag: member="Barry::Mode::Mode::Open" ref="210ebafa97831da0cacac24bd01299ac" args="(const char *password, const char *name)" -->
<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>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Select device mode. 
<p>
This is required before using any other mode-based operations, such as GetDBDB() and LoadDatabase().<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>
It uses the provided name as the name for the socket used in this mode. Usually this shouldn't be needed unless using the raw channel mode.<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#cc4f959c1a8473562219bd0a265b004c" title="Retry a failed password attempt from the first call to Open().">RetryPassword()</a> with the new password.<p>
<dl compact><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>
</dl>

<p>Definition at line <a class="el" href="m__mode__base_8cc-source.html#l00109">109</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#l00138">RetryPassword()</a>, and <a class="el" href="controller_8cc-source.html#l00164">Barry::Controller::SelectMode()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1Mode_1_1Mode_210ebafa97831da0cacac24bd01299ac_cgraph.png" border="0" usemap="#classBarry_1_1Mode_1_1Mode_210ebafa97831da0cacac24bd01299ac_cgraph_map" alt=""></center>
<map name="classBarry_1_1Mode_1_1Mode_210ebafa97831da0cacac24bd01299ac_cgraph_map">
<area shape="rect" href="classBarry_1_1Mode_1_1Mode.html#cc4f959c1a8473562219bd0a265b004c" title="Retry a failed password attempt from the first call to Open()." alt="" coords="228,5,455,32"><area shape="rect" href="classBarry_1_1Controller.html#13ec1c4f03ed7bbff8f25ef2259b3836" title="Barry::Controller::SelectMode" alt="" coords="245,56,437,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="cc4f959c1a8473562219bd0a265b004c"></a><!-- doxytag: member="Barry::Mode::Mode::RetryPassword" ref="cc4f959c1a8473562219bd0a265b004c" 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#1110243f16be2b647ed9810da27abe11" title="Select device mode.">Open()</a>. 
<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#1110243f16be2b647ed9810da27abe11" title="Select device mode.">Open()</a>.<p>
<dl compact><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>
</dl>

<p>Definition at line <a class="el" href="m__mode__base_8cc-source.html#l00138">138</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="controller_8h-source.html#l00100">Barry::Controller::m_zero</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 caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1Mode_1_1Mode_cc4f959c1a8473562219bd0a265b004c_icgraph.png" border="0" usemap="#classBarry_1_1Mode_1_1Mode_cc4f959c1a8473562219bd0a265b004c_icgraph_map" alt=""></center>
<map name="classBarry_1_1Mode_1_1Mode_cc4f959c1a8473562219bd0a265b004c_icgraph_map">
<area shape="rect" href="classBarry_1_1Mode_1_1Mode.html#1110243f16be2b647ed9810da27abe11" title="Select device mode." alt="" coords="284,5,455,32"></map>
</div>

</div>
</div><p>
<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><a class="el" href="m__mode__base_8cc-source.html">m_mode_base.cc</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Mar 1 17:51:06 2011 for Barry by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>