Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_secure_server.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: CSecureServer 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>CSecureServer Class Reference</h1><!-- doxytag: class="CSecureServer" -->
<p><a href="class_c_secure_server-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">CSession2 *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_secure_server.html#a1f53e7eb732c048d41f7a74069c971bf">NewSessionL</a> (const TVersion &amp;aVersion, const RMessage2 &amp;aMessage) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CPolicyServer::TCustomResult&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_secure_server.html#acf179b4c14ae84701779f659c9e4488f">CustomSecurityCheckL</a> (const RMessage2 &amp;aMsg, TInt &amp;aAction, TSecurityInfo &amp;aMissing)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CObjectCon *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_secure_server.html#a65a88f3753c16940867d3b277608bdac">NewContainerL</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_secure_server.html#ae6b5aba2bd5e4b8bffaa4febbe874e37">RemoveContainer</a> (CObjectCon *aCon)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_secure_server.html#a42202b0478075c59aa39dca27b1cb48d">~CSecureServer</a> ()</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_secure_server.html">CSecureServer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_secure_server.html#a3d4524a4e4accf80a32364780ae43e91">NewL</a> (CActive::TPriority aActiveObjectPriority)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_secure_server.html#a97b0ca5c5966bba8c0cee269d1909b75">ThreadFunction</a> (TAny *aStarted)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_secure_server.html#ac8c14996a41c6d897efaee0fa7d12cd2">PanicServer</a> (<a class="el" href="secureserver_8h.html#a091a5ad2956fb84c4470a59010a0d4ef">TSecureServerPanic</a> aPanic)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The class that represents the secure server.</p>
<p>The server starts when the first client connects. When the server starts, it prepares:</p>
<ul>
<li>the active scheduler</li>
<li>the server active object</li>
<li>the object container index which produces object containers for each session.</li>
</ul>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_secure_server.html">CSecureServer</a> </dd></dl>

<p>Definition at line <a class="el" href="secureserver_8h_source.html#l00190">190</a> of file <a class="el" href="secureserver_8h_source.html">secureserver.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a42202b0478075c59aa39dca27b1cb48d"></a><!-- doxytag: member="CSecureServer::~CSecureServer" ref="a42202b0478075c59aa39dca27b1cb48d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CSecureServer::~CSecureServer </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="secureserverccountserver_8cpp_source.html#l00098">98</a> of file <a class="el" href="secureserverccountserver_8cpp_source.html">secureserverccountserver.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a1f53e7eb732c048d41f7a74069c971bf"></a><!-- doxytag: member="CSecureServer::NewSessionL" ref="a1f53e7eb732c048d41f7a74069c971bf" args="(const TVersion &amp;aVersion, const RMessage2 &amp;aMessage) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CSession2 * CSecureServer::NewSessionL </td>
          <td>(</td>
          <td class="paramtype">const TVersion &amp;&nbsp;</td>
          <td class="paramname"> <em>aVersion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const RMessage2 &amp;&nbsp;</td>
          <td class="paramname"> <em>aMessage</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a server-side session object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aVersion</em>&nbsp;</td><td>The version information supplied by the client. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aMessage</em>&nbsp;</td><td>Represents the details of the client request that is requesting the creation of the session. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="secureserverccountserver_8cpp_source.html#l00108">108</a> of file <a class="el" href="secureserverccountserver_8cpp_source.html">secureserverccountserver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3d4524a4e4accf80a32364780ae43e91"></a><!-- doxytag: member="CSecureServer::NewL" ref="a3d4524a4e4accf80a32364780ae43e91" args="(CActive::TPriority aActiveObjectPriority)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_secure_server.html">CSecureServer</a> * CSecureServer::NewL </td>
          <td>(</td>
          <td class="paramtype">CActive::TPriority&nbsp;</td>
          <td class="paramname"> <em>aActiveObjectPriority</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new server object and returns the handle to it. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aActiveObjectPriority</em>&nbsp;</td><td>The priority of the secure server. The secure server is an active object. It is derived from CActive and the priority value is the priority of the active object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd>CActive </dd></dl>

<p>Definition at line <a class="el" href="secureserverccountserver_8cpp_source.html#l00040">40</a> of file <a class="el" href="secureserverccountserver_8cpp_source.html">secureserverccountserver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a97b0ca5c5966bba8c0cee269d1909b75"></a><!-- doxytag: member="CSecureServer::ThreadFunction" ref="a97b0ca5c5966bba8c0cee269d1909b75" args="(TAny *aStarted)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TInt CSecureServer::ThreadFunction </td>
          <td>(</td>
          <td class="paramtype">TAny *&nbsp;</td>
          <td class="paramname"> <em>aStarted</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The thread function that makes the server ready for use. The Symbian platform calls the function when the server thread starts to run. This is a static function, and it</p>
<ul>
<li>creates the server object</li>
<li>creates the server’s active scheduler</li>
<li>starts the server’s active scheduler <dl class="return"><dt><b>Returns:</b></dt><dd>KErrNone. </dd></dl>
</li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aStarted</em>&nbsp;</td><td>aStarted </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="secureserver_8cpp_source.html#l00034">34</a> of file <a class="el" href="secureserver_8cpp_source.html">secureserver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ac8c14996a41c6d897efaee0fa7d12cd2"></a><!-- doxytag: member="CSecureServer::PanicServer" ref="ac8c14996a41c6d897efaee0fa7d12cd2" args="(TSecureServerPanic aPanic)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSecureServer::PanicServer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="secureserver_8h.html#a091a5ad2956fb84c4470a59010a0d4ef">TSecureServerPanic</a>&nbsp;</td>
          <td class="paramname"> <em>aPanic</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Panics 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>aPanic</em>&nbsp;</td><td>The reason for the panic. </td></tr>
  </table>
  </dd>
</dl>

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

</div>
</div>
<a class="anchor" id="acf179b4c14ae84701779f659c9e4488f"></a><!-- doxytag: member="CSecureServer::CustomSecurityCheckL" ref="acf179b4c14ae84701779f659c9e4488f" args="(const RMessage2 &amp;aMsg, TInt &amp;aAction, TSecurityInfo &amp;aMissing)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CPolicyServer::TCustomResult CSecureServer::CustomSecurityCheckL </td>
          <td>(</td>
          <td class="paramtype">const RMessage2 &amp;&nbsp;</td>
          <td class="paramname"> <em>aMsg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TInt &amp;&nbsp;</td>
          <td class="paramname"> <em>aAction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TSecurityInfo &amp;&nbsp;</td>
          <td class="paramname"> <em>aMissing</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Performs a custom security check.</p>
<p>The policy server framework calls this function when a client sends requests to the server that are identified by the five enum values <a class="el" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a1b3935c0f5f79f45a27de1fa32654e17">TSecureServerRequest::ESecureServerIncrease</a> to <a class="el" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2aa9d1e980d9ed0a23782b98761d7e57d7">TSecureServerRequest::ESecureServerReset</a>. The request numbers match the client-side requests identified by the functions:</p>
<ul>
<li><a class="el" href="class_r_secure_sub_session.html#aa33648763c953202fb21f037b2d413e9">RSecureSubSession::Increase()</a>;</li>
<li><a class="el" href="class_r_secure_sub_session.html#a398e6146ebf438ee1f0b24c77b5b767c">RSecureSubSession::Decrease()</a>;</li>
<li>RSecureSubSession::IncreaseBy(TInt anInt);</li>
<li>RSecureSubSession::DecreaseBy(TInt anInt);</li>
<li><a class="el" href="class_r_secure_sub_session.html#a9ce8394ea263eaba7f462bc2fdc62127">RSecureSubSession::Reset()</a>;</li>
</ul>
<p>See the const arrays defined in <a class="el" href="secureserver_8h.html">secureserver.h</a>. See the use of CPolicyServer::ECustomCheck in the third element in the array KSecureServerElementsIndex in <a class="el" href="secureserver_8h.html">secureserver.h</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aMsg</em>&nbsp;</td><td>The message to check. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aAction</em>&nbsp;</td><td>A reference to the action to take if the security check fails. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aMissing</em>&nbsp;</td><td>A reference to the list of security attributes missing from the checked process. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A value from TCustomResult. </dd></dl>

<p>Definition at line <a class="el" href="secureserverccountserver_8cpp_source.html#l00136">136</a> of file <a class="el" href="secureserverccountserver_8cpp_source.html">secureserverccountserver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a65a88f3753c16940867d3b277608bdac"></a><!-- doxytag: member="CSecureServer::NewContainerL" ref="a65a88f3753c16940867d3b277608bdac" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CObjectCon * CSecureServer::NewContainerL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new object container when creating sub sessions. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An object container. </dd></dl>

<p>Definition at line <a class="el" href="secureserverccountserver_8cpp_source.html#l00053">53</a> of file <a class="el" href="secureserverccountserver_8cpp_source.html">secureserverccountserver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae6b5aba2bd5e4b8bffaa4febbe874e37"></a><!-- doxytag: member="CSecureServer::RemoveContainer" ref="ae6b5aba2bd5e4b8bffaa4febbe874e37" args="(CObjectCon *aCon)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSecureServer::RemoveContainer </td>
          <td>(</td>
          <td class="paramtype">CObjectCon *&nbsp;</td>
          <td class="paramname"> <em>aCon</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Removes an object from the object container. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aCon</em>&nbsp;</td><td>A pointer to the object to be removed from the container. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="secureserverccountserver_8cpp_source.html#l00062">62</a> of file <a class="el" href="secureserverccountserver_8cpp_source.html">secureserverccountserver.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>