Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_r_secure_session.html
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 6 43e37759235e
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<!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: RSecureSession 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>RSecureSession Class Reference</h1><!-- doxytag: class="RSecureSession" --><!-- doxytag: inherits="RSessionBase" -->
<p>Inherits RSessionBase.</p>

<p><a href="class_r_secure_session-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_secure_session.html#a691bf1b8993530995a26a65e6c77944e">RSecureSession</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_secure_session.html#aacec76ae20ca1a96380f33b82e85b271">Connect</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TVersion&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_secure_session.html#a79c5e8c60338024c9858e8e9c081be06">Version</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_r_secure_session.html#a5ad87a05e485af49ed9b599d420c81ef">ResourceCountL</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_secure_session.html#a8c3903876a6e715f94bc6d4f762e3fa1">Close</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The client-side handle to a session with the server. The class forms a layer over the Symbian provided RSessionBase class. The main example code calls member functions in the subsession class to make requests to the server. The subsession forwards the requests to the server through the session. A request is identified by a number. This is one of the TSecureServerRequest enum values defined in <a class="el" href="secureclientandserver_8h.html">secureclientandserver.h</a>, The session passes the number and any arguments to the server in a TIpcArgs object. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_r_secure_sub_session.html">RSecureSubSession</a> </dd></dl>

<p>Definition at line <a class="el" href="secureclient_8h_source.html#l00034">34</a> of file <a class="el" href="secureclient_8h_source.html">secureclient.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a691bf1b8993530995a26a65e6c77944e"></a><!-- doxytag: member="RSecureSession::RSecureSession" ref="a691bf1b8993530995a26a65e6c77944e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RSecureSession::RSecureSession </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructor. </p>

<p>Definition at line <a class="el" href="secureclientsession_8cpp_source.html#l00029">29</a> of file <a class="el" href="secureclientsession_8cpp_source.html">secureclientsession.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aacec76ae20ca1a96380f33b82e85b271"></a><!-- doxytag: member="RSecureSession::Connect" ref="aacec76ae20ca1a96380f33b82e85b271" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TInt RSecureSession::Connect </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Connects to the server using 4 message slots. This creates a new session with the server. In this example, the server is implemented as a separate thread. If the server is not running, the function starts the server before it tries to create a session with it. The version information defines the lowest version of the server with which this client is compatible. Version compatibility is checked when the server side session is created. In this example, the version of the server and the version requested by the client are the same. This is because they are defined by constants common to the client source code and the server source code. In a real application, versions would be defined independently. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>KErrNone, if successful; otherwise, the value returned by <a class="el" href="secureclientandserver_8h.html#af110d475e98114c0f2a42b7313af8e67">StartThread()</a> or CreateSession() if they were unsuccessful. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="secureclientandserver_8h.html#af110d475e98114c0f2a42b7313af8e67">StartThread()</a> </dd>
<dd>
<a class="el" href="class_c_secure_server.html#a1f53e7eb732c048d41f7a74069c971bf">CSecureServer::NewSessionL()</a> </dd>
<dd>
<a class="el" href="class_r_secure_session.html#a79c5e8c60338024c9858e8e9c081be06">RSecureSession::Version()</a> </dd></dl>

<p>Definition at line <a class="el" href="secureclientsession_8cpp_source.html#l00044">44</a> of file <a class="el" href="secureclientsession_8cpp_source.html">secureclientsession.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a79c5e8c60338024c9858e8e9c081be06"></a><!-- doxytag: member="RSecureSession::Version" ref="a79c5e8c60338024c9858e8e9c081be06" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TVersion RSecureSession::Version </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets the lowest version of the server with which this client is compatible. This is a client-side definition. If the server version is lower than this value, connection fails. In a real application, this is how a client can make sure that the server can provide the services that the client expects. The design of the client-server framework assumes that newer versions of a server are backward compatible with older versions of the server. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The version of the server that this client requires. </dd></dl>

<p>Definition at line <a class="el" href="secureclientsession_8cpp_source.html#l00059">59</a> of file <a class="el" href="secureclientsession_8cpp_source.html">secureclientsession.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5ad87a05e485af49ed9b599d420c81ef"></a><!-- doxytag: member="RSecureSession::ResourceCountL" ref="a5ad87a05e485af49ed9b599d420c81ef" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TInt RSecureSession::ResourceCountL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets the resource count from the server. The resource count is the number of subsessions attached to the session. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The resource count. </dd></dl>

<p>Definition at line <a class="el" href="secureclientsession_8cpp_source.html#l00079">79</a> of file <a class="el" href="secureclientsession_8cpp_source.html">secureclientsession.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8c3903876a6e715f94bc6d4f762e3fa1"></a><!-- doxytag: member="RSecureSession::Close" ref="a8c3903876a6e715f94bc6d4f762e3fa1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RSecureSession::Close </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Deletes all handles associated with session. </p>

<p>Definition at line <a class="el" href="secureclientsession_8cpp_source.html#l00067">67</a> of file <a class="el" href="secureclientsession_8cpp_source.html">secureclientsession.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>