Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_response.html
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 16:16:55 +0100
changeset 6 43e37759235e
permissions -rw-r--r--
Week 12 contribution of example code"

<!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>TB9.2 Example Applications: CResponse 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 -->
<div class="contents">
<h1>CResponse Class Reference</h1><!-- doxytag: class="CResponse" -->
<p><a href="class_c_response-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">TResponseState</a> { <b>ENotComplete</b>, 
<b>EComplete</b>, 
<b>EError</b>
 }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">TResponseType</a> { <b>ELoadTasks</b> =  0, 
<b>ETaskComplete</b>
 }</td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a6f1fbd7e819a3f55a84d3e3ea757faa7">~CResponse</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a5eea58b909203d7f9e5731eb1f7a7243">ParseDataL</a> (TDesC &amp;aData)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TBool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#aa2c211eba8208a0659bbecc31929a607">HasError</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TBuf&lt; KMaxError &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#abcd4ed6c6427bfe23a51989db29bd85e">Error</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a7f13737551cb7c1a5dce6b901f1892b6">TaskCount</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TBuf&lt; KMaxTaskLength &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a4bd26f70c829e7f88367457b445c2ce2">TaskDescription</a> (const TInt &amp;aIndex) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a95771f9a7090029b7ff675553432adcf">TaskId</a> (const TInt &amp;aIndex) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">TResponseType</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a886806fe15bd7b490be051f258aa1c6b">ResponseType</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#abbd142a6b537780d136cb9b12e3d6572">InputDataL</a> (const TDesC8 &amp;aData)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">TResponseState</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a118506616c44d373a0a924f6fd4dea0b">GetState</a> () const </td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_c_response.html">CResponse</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a2a6a27395f054e6912d4491f98ca3c54">NewL</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_c_response.html">CResponse</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a78c01ecd70d8477731923b4bc12f9628">NewLC</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A wrapper class for handling responses from the server. </p>

<p>Definition at line <a class="el" href="_response_8h_source.html#l00025">25</a> of file <a class="el" href="_response_8h_source.html">Response.h</a>.</p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a797ea6210eadf0408870a77f242b333d"></a><!-- doxytag: member="CResponse::TResponseState" ref="a797ea6210eadf0408870a77f242b333d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">CResponse::TResponseState</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Enum for following the class' state. </p>

<p>Definition at line <a class="el" href="_response_8h_source.html#l00032">32</a> of file <a class="el" href="_response_8h_source.html">Response.h</a>.</p>

</div>
</div>
<a class="anchor" id="a66d7d28d83f038b1f1fbd4421376bbfd"></a><!-- doxytag: member="CResponse::TResponseType" ref="a66d7d28d83f038b1f1fbd4421376bbfd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">CResponse::TResponseType</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Determines what type of response is in question. </p>

<p>Definition at line <a class="el" href="_response_8h_source.html#l00057">57</a> of file <a class="el" href="_response_8h_source.html">Response.h</a>.</p>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6f1fbd7e819a3f55a84d3e3ea757faa7"></a><!-- doxytag: member="CResponse::~CResponse" ref="a6f1fbd7e819a3f55a84d3e3ea757faa7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CResponse::~CResponse </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor </p>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00030">30</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a2a6a27395f054e6912d4491f98ca3c54"></a><!-- doxytag: member="CResponse::NewL" ref="a2a6a27395f054e6912d4491f98ca3c54" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_response.html">CResponse</a> * CResponse::NewL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Two-phased constructor. </p>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00042">42</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a78c01ecd70d8477731923b4bc12f9628"></a><!-- doxytag: member="CResponse::NewLC" ref="a78c01ecd70d8477731923b4bc12f9628" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_response.html">CResponse</a> * CResponse::NewLC </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Two-phased constructor. </p>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00054">54</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5eea58b909203d7f9e5731eb1f7a7243"></a><!-- doxytag: member="CResponse::ParseDataL" ref="a5eea58b909203d7f9e5731eb1f7a7243" args="(TDesC &amp;aData)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CResponse::ParseDataL </td>
          <td>(</td>
          <td class="paramtype">TDesC &amp;&nbsp;</td>
          <td class="paramname"> <em>aData</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs this response object from the data received from the server. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aData</em>&nbsp;</td><td>the data that was received from the server </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00081">81</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa2c211eba8208a0659bbecc31929a607"></a><!-- doxytag: member="CResponse::HasError" ref="aa2c211eba8208a0659bbecc31929a607" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TBool CResponse::HasError </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns whether errors occurred in the server side. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>ETrue if response consist errors, EFalse if not. </dd></dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00150">150</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="abcd4ed6c6427bfe23a51989db29bd85e"></a><!-- doxytag: member="CResponse::Error" ref="abcd4ed6c6427bfe23a51989db29bd85e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TBuf&lt; KMaxError &gt; CResponse::Error </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the error description. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the error description. </dd></dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00165">165</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a7f13737551cb7c1a5dce6b901f1892b6"></a><!-- doxytag: member="CResponse::TaskCount" ref="a7f13737551cb7c1a5dce6b901f1892b6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TInt CResponse::TaskCount </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the number of tasks received from the server. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of tasks received from the server. </dd></dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00175">175</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a4bd26f70c829e7f88367457b445c2ce2"></a><!-- doxytag: member="CResponse::TaskDescription" ref="a4bd26f70c829e7f88367457b445c2ce2" args="(const TInt &amp;aIndex) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TBuf&lt; KMaxTaskLength &gt; CResponse::TaskDescription </td>
          <td>(</td>
          <td class="paramtype">const TInt &amp;&nbsp;</td>
          <td class="paramname"> <em>aIndex</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the task description. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aIndex</em>&nbsp;</td><td>the index of the description. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the task description. </dd></dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00185">185</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a95771f9a7090029b7ff675553432adcf"></a><!-- doxytag: member="CResponse::TaskId" ref="a95771f9a7090029b7ff675553432adcf" args="(const TInt &amp;aIndex) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TInt CResponse::TaskId </td>
          <td>(</td>
          <td class="paramtype">const TInt &amp;&nbsp;</td>
          <td class="paramname"> <em>aIndex</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the task id. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the task id. </dd></dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00200">200</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a886806fe15bd7b490be051f258aa1c6b"></a><!-- doxytag: member="CResponse::ResponseType" ref="a886806fe15bd7b490be051f258aa1c6b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">CResponse::TResponseType</a> CResponse::ResponseType </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the type of this response. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the type of this response. </dd></dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00215">215</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="abbd142a6b537780d136cb9b12e3d6572"></a><!-- doxytag: member="CResponse::InputDataL" ref="abbd142a6b537780d136cb9b12e3d6572" args="(const TDesC8 &amp;aData)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CResponse::InputDataL </td>
          <td>(</td>
          <td class="paramtype">const TDesC8 &amp;&nbsp;</td>
          <td class="paramname"> <em>aData</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Takes in a part of the server message. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aData</em>&nbsp;</td><td>part of the message </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00226">226</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a118506616c44d373a0a924f6fd4dea0b"></a><!-- doxytag: member="CResponse::GetState" ref="a118506616c44d373a0a924f6fd4dea0b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">CResponse::TResponseState</a> CResponse::GetState </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns whether the entire message has been given to <a class="el" href="class_c_response.html">CResponse</a>. This function is used specifically by the engine to determine whether or not continue reading from the socket. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>ETrue if message is complete, EFalse if not. </dd></dl>

<p>Definition at line <a class="el" href="_response_8cpp_source.html#l00294">294</a> of file <a class="el" href="_response_8cpp_source.html">Response.cpp</a>.</p>

</div>
</div>
</div>
<hr size="1"/><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 </small></address>
</body>
</html>