examples/S60CppExamples/ClientServerAsync/doc/class_c_time_server.html

00001 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
00002 <html>
00003 
00004 <head>
00005 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
00006 <title>CTimeServer Class Reference</title>
00007 <link href="style.css" rel="stylesheet" type="text/css">
00008 </head>
00009 
00010 <table border="0" width="100%" height="8" bgcolor="#eeeeee">
00011 <tr> <td width="100%" height="1"><b><font size="2" color="#000000" face="Arial, Helvetica, sans-serif"><strong><a name=Top></a>
00012 S60 5th Edition SDK </strong></font></b><br><i>Example Applications Guide</i></td></tr> </table>
00013 <!-- Generated by Doxygen 1.4.5 -->
00014 <div class="tabs">
00015   <ul>
00016     <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
00017     <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
00018     <li><a href="files.html"><span>Files</span></a></li>
00019   </ul></div>
00020 <div class="tabs">
00021   <ul>
00022     <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
00023     <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
00024     <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
00025   </ul></div>
00026 <h1>CTimeServer Class Reference</h1><!-- doxytag: class="CTimeServer" --><!-- doxytag: inherits="CServer2,MBeating" --><code>#include &lt;<a class="el" href="timeserver_8h-source.html">timeserver.h</a>&gt;</code>
00027 <p>
00028 <p>Inheritance diagram for CTimeServer:
00029 <p><center><img src="class_c_time_server.png" usemap="#CTimeServer_map" border="0" alt=""></center>
00030 <map name="CTimeServer_map">
00031 </map>
00032 <a href="class_c_time_server-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
00033 CTimeServer. An instance of class CTimeServer is the main server class for the ClientServerAsync example application. 
00034 <p>
00035 
00036 <p>
00037 Definition at line <a class="el" href="timeserver_8h-source.html#l00030">30</a> of file <a class="el" href="timeserver_8h-source.html">timeserver.h</a>.<table border="0" cellpadding="0" cellspacing="0">
00038 <tr><td></td></tr>
00039 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
00040 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#ab523c20e96ddd5e1413d525bad59fdd">~CTimeServer</a> ()</td></tr>
00041 
00042 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#a3afdfcfbf3d8aa45b7f96b5a1c7119e">IncrementSessions</a> ()</td></tr>
00043 
00044 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#982e65810ad50ce20759fd26fad488dc">DecrementSessions</a> ()</td></tr>
00045 
00046 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#a8205372b5d379fa4b803e98b0726473">WaitForTickL</a> ()</td></tr>
00047 
00048 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#8bc39d8613772fe04fa5d6a845ede8cd">Beat</a> ()</td></tr>
00049 
00050 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#a6043d9cad7048bb64b0d0d125ddc875">Synchronize</a> ()</td></tr>
00051 
00052 <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
00053 <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_c_time_server.html">CTimeServer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#990716240ccf3341f7fdbf289ec927ad">NewL</a> ()</td></tr>
00054 
00055 <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_c_time_server.html">CTimeServer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#94389c6729b439332fc74a54ac683740">NewLC</a> ()</td></tr>
00056 
00057 <tr><td class="memItemLeft" nowrap align="right" valign="top">static TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#61b4b595801bf9fedbb0df14ed44332c">ThreadFunction</a> (TAny *aStarted)</td></tr>
00058 
00059 <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
00060 <tr><td class="memItemLeft" nowrap align="right" valign="top">TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#0f788de08f5d216c674e6eaeaea1c67a">RunError</a> (TInt aError)</td></tr>
00061 
00062 <tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
00063 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#95423dd47aaf3240e1e4b42baa280c39">CTimeServer</a> (TInt aPriority)</td></tr>
00064 
00065 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#9ce34ba0b947863222da3c63d0481044">ConstructL</a> ()</td></tr>
00066 
00067 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#993249bd000d59f1d0437eea0ab25fc3">SendTimeToSessions</a> ()</td></tr>
00068 
00069 <tr><td class="memItemLeft" nowrap align="right" valign="top">CSession2 *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#e8cc7a175c8a6ec0a2b0ee8bf27badb9">NewSessionL</a> (const TVersion &amp;aVersion, const RMessage2 &amp;aMessage) const </td></tr>
00070 
00071 <tr><td colspan="2"><br><h2>Static Private Member Functions</h2></td></tr>
00072 <tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#5486029c4d68e3db4b0cbbbd2c4c711e">PanicClient</a> (const RMessage2 &amp;aMessage, TTimeServPanic aReason)</td></tr>
00073 
00074 <tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#57317bfd7bbf407064d8f0b845a16d46">PanicServer</a> (TTimeServPanic aPanic)</td></tr>
00075 
00076 <tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#be5e4a4628587739b7c76951f9577e8e">ThreadFunctionL</a> ()</td></tr>
00077 
00078 <tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
00079 <tr><td class="memItemLeft" nowrap align="right" valign="top">TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#40ac9219e4400c125719d767d564fc3e">iSessionCount</a></td></tr>
00080 
00081 <tr><td class="memItemLeft" nowrap align="right" valign="top">CHeartbeat *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_time_server.html#bd20aae428bf045cb28f7958102a14e1">iHeartbeat</a></td></tr>
00082 
00083 </table>
00084 <hr><h2>Constructor &amp; Destructor Documentation</h2>
00085 <a class="anchor" name="ab523c20e96ddd5e1413d525bad59fdd"></a><!-- doxytag: member="CTimeServer::~CTimeServer" ref="ab523c20e96ddd5e1413d525bad59fdd" args="()" --><p>
00086 <table class="mdTable" cellpadding="2" cellspacing="0">
00087   <tr>
00088     <td class="mdRow">
00089       <table cellpadding="0" cellspacing="0" border="0">
00090         <tr>
00091           <td class="md" nowrap valign="top">CTimeServer::~CTimeServer           </td>
00092           <td class="md" valign="top">(&nbsp;</td>
00093           <td class="mdname1" valign="top" nowrap>          </td>
00094           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00095           <td class="md" nowrap><code> [virtual]</code></td>
00096         </tr>
00097       </table>
00098     </td>
00099   </tr>
00100 </table>
00101 <table cellspacing="5" cellpadding="0" border="0">
00102   <tr>
00103     <td>
00104       &nbsp;
00105     </td>
00106     <td>
00107 
00108 <p>
00109 ~CTimeServer. Destructor. 
00110 <p>
00111 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00078">78</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00112 <p>
00113 References <a class="el" href="timeserver_8h-source.html#l00176">iHeartbeat</a>.<div class="fragment"><pre class="fragment"><a name="l00079"></a>00079     {
00114 <a name="l00080"></a>00080     <span class="keyword">delete</span> <a class="code" href="class_c_time_server.html#bd20aae428bf045cb28f7958102a14e1">iHeartbeat</a>;
00115 <a name="l00081"></a>00081     <a class="code" href="class_c_time_server.html#bd20aae428bf045cb28f7958102a14e1">iHeartbeat</a> = NULL;
00116 <a name="l00082"></a>00082     }
00117 </pre></div>
00118 <p>
00119     </td>
00120   </tr>
00121 </table>
00122 <a class="anchor" name="95423dd47aaf3240e1e4b42baa280c39"></a><!-- doxytag: member="CTimeServer::CTimeServer" ref="95423dd47aaf3240e1e4b42baa280c39" args="(TInt aPriority)" --><p>
00123 <table class="mdTable" cellpadding="2" cellspacing="0">
00124   <tr>
00125     <td class="mdRow">
00126       <table cellpadding="0" cellspacing="0" border="0">
00127         <tr>
00128           <td class="md" nowrap valign="top">CTimeServer::CTimeServer           </td>
00129           <td class="md" valign="top">(&nbsp;</td>
00130           <td class="md" nowrap valign="top">TInt&nbsp;</td>
00131           <td class="mdname1" valign="top" nowrap> <em>aPriority</em>          </td>
00132           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00133           <td class="md" nowrap><code> [private]</code></td>
00134         </tr>
00135       </table>
00136     </td>
00137   </tr>
00138 </table>
00139 <table cellspacing="5" cellpadding="0" border="0">
00140   <tr>
00141     <td>
00142       &nbsp;
00143     </td>
00144     <td>
00145 
00146 <p>
00147 CTimeServer. C++ default constructor. <dl compact><dt><b>Parameters:</b></dt><dd>
00148   <table border="0" cellspacing="2" cellpadding="0">
00149     <tr><td valign="top"></td><td valign="top"><em>aPriority</em>&nbsp;</td><td>priority for this thread. </td></tr>
00150   </table>
00151 </dl>
00152 
00153 <p>
00154 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00067">67</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00155 <p>
00156 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00044">NewLC()</a>.<div class="fragment"><pre class="fragment"><a name="l00068"></a>00068 : CServer2( aPriority )
00157 <a name="l00069"></a>00069     {
00158 <a name="l00070"></a>00070     <span class="comment">// Implementation not required</span>
00159 <a name="l00071"></a>00071     }
00160 </pre></div>
00161 <p>
00162     </td>
00163   </tr>
00164 </table>
00165 <hr><h2>Member Function Documentation</h2>
00166 <a class="anchor" name="990716240ccf3341f7fdbf289ec927ad"></a><!-- doxytag: member="CTimeServer::NewL" ref="990716240ccf3341f7fdbf289ec927ad" args="()" --><p>
00167 <table class="mdTable" cellpadding="2" cellspacing="0">
00168   <tr>
00169     <td class="mdRow">
00170       <table cellpadding="0" cellspacing="0" border="0">
00171         <tr>
00172           <td class="md" nowrap valign="top"><a class="el" href="class_c_time_server.html">CTimeServer</a> * CTimeServer::NewL           </td>
00173           <td class="md" valign="top">(&nbsp;</td>
00174           <td class="mdname1" valign="top" nowrap>          </td>
00175           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00176           <td class="md" nowrap><code> [static]</code></td>
00177         </tr>
00178       </table>
00179     </td>
00180   </tr>
00181 </table>
00182 <table cellspacing="5" cellpadding="0" border="0">
00183   <tr>
00184     <td>
00185       &nbsp;
00186     </td>
00187     <td>
00188 
00189 <p>
00190 NewL. Two-phased constructor. <dl compact><dt><b>Returns:</b></dt><dd>Pointer to created CTimeServer object. </dd></dl>
00191 
00192 <p>
00193 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00032">32</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00194 <p>
00195 References <a class="el" href="timeserver_8cpp-source.html#l00044">NewLC()</a>.<div class="fragment"><pre class="fragment"><a name="l00033"></a>00033     {
00196 <a name="l00034"></a>00034     <a class="code" href="class_c_time_server.html">CTimeServer</a>* timeServer = <a class="code" href="class_c_time_server.html#94389c6729b439332fc74a54ac683740">CTimeServer::NewLC</a>();
00197 <a name="l00035"></a>00035     CleanupStack::Pop( timeServer );
00198 <a name="l00036"></a>00036     <span class="keywordflow">return</span> timeServer;
00199 <a name="l00037"></a>00037     }
00200 </pre></div>
00201 <p>
00202     </td>
00203   </tr>
00204 </table>
00205 <a class="anchor" name="94389c6729b439332fc74a54ac683740"></a><!-- doxytag: member="CTimeServer::NewLC" ref="94389c6729b439332fc74a54ac683740" args="()" --><p>
00206 <table class="mdTable" cellpadding="2" cellspacing="0">
00207   <tr>
00208     <td class="mdRow">
00209       <table cellpadding="0" cellspacing="0" border="0">
00210         <tr>
00211           <td class="md" nowrap valign="top"><a class="el" href="class_c_time_server.html">CTimeServer</a> * CTimeServer::NewLC           </td>
00212           <td class="md" valign="top">(&nbsp;</td>
00213           <td class="mdname1" valign="top" nowrap>          </td>
00214           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00215           <td class="md" nowrap><code> [static]</code></td>
00216         </tr>
00217       </table>
00218     </td>
00219   </tr>
00220 </table>
00221 <table cellspacing="5" cellpadding="0" border="0">
00222   <tr>
00223     <td>
00224       &nbsp;
00225     </td>
00226     <td>
00227 
00228 <p>
00229 NewLC. Two-phased constructor. <dl compact><dt><b>Returns:</b></dt><dd>Pointer to created CTimeServer object. </dd></dl>
00230 
00231 <p>
00232 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00044">44</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00233 <p>
00234 References <a class="el" href="timeserver_8cpp-source.html#l00057">ConstructL()</a>, and <a class="el" href="timeserver_8cpp-source.html#l00067">CTimeServer()</a>.
00235 <p>
00236 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00032">NewL()</a>, and <a class="el" href="timeserver_8cpp-source.html#l00232">ThreadFunctionL()</a>.<div class="fragment"><pre class="fragment"><a name="l00045"></a>00045     {
00237 <a name="l00046"></a>00046     <a class="code" href="class_c_time_server.html">CTimeServer</a>* timeServer = <span class="keyword">new</span> ( ELeave ) <a class="code" href="class_c_time_server.html#95423dd47aaf3240e1e4b42baa280c39">CTimeServer</a>( EPriorityNormal );
00238 <a name="l00047"></a>00047     CleanupStack::PushL( timeServer );
00239 <a name="l00048"></a>00048     timeServer-&gt;<a class="code" href="class_c_time_server.html#9ce34ba0b947863222da3c63d0481044">ConstructL</a>();
00240 <a name="l00049"></a>00049     <span class="keywordflow">return</span> timeServer;
00241 <a name="l00050"></a>00050     }
00242 </pre></div>
00243 <p>
00244     </td>
00245   </tr>
00246 </table>
00247 <a class="anchor" name="61b4b595801bf9fedbb0df14ed44332c"></a><!-- doxytag: member="CTimeServer::ThreadFunction" ref="61b4b595801bf9fedbb0df14ed44332c" args="(TAny *aStarted)" --><p>
00248 <table class="mdTable" cellpadding="2" cellspacing="0">
00249   <tr>
00250     <td class="mdRow">
00251       <table cellpadding="0" cellspacing="0" border="0">
00252         <tr>
00253           <td class="md" nowrap valign="top">TInt CTimeServer::ThreadFunction           </td>
00254           <td class="md" valign="top">(&nbsp;</td>
00255           <td class="md" nowrap valign="top">TAny *&nbsp;</td>
00256           <td class="mdname1" valign="top" nowrap> <em>aStarted</em>          </td>
00257           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00258           <td class="md" nowrap><code> [static]</code></td>
00259         </tr>
00260       </table>
00261     </td>
00262   </tr>
00263 </table>
00264 <table cellspacing="5" cellpadding="0" border="0">
00265   <tr>
00266     <td>
00267       &nbsp;
00268     </td>
00269     <td>
00270 
00271 <p>
00272 ThreadFunction. Main function for the server thread. <dl compact><dt><b>Parameters:</b></dt><dd>
00273   <table border="0" cellspacing="2" cellpadding="0">
00274     <tr><td valign="top"></td><td valign="top"><em>aStarted</em>&nbsp;</td><td>A semaphore to be flagged when server has been started. </td></tr>
00275   </table>
00276 </dl>
00277 <dl compact><dt><b>Returns:</b></dt><dd>Error code. </dd></dl>
00278 
00279 <p>
00280 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00264">264</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00281 <p>
00282 References <a class="el" href="timeserver_8cpp-source.html#l00171">PanicServer()</a>, and <a class="el" href="timeserver_8cpp-source.html#l00232">ThreadFunctionL()</a>.<div class="fragment"><pre class="fragment"><a name="l00265"></a>00265     {
00283 <a name="l00266"></a>00266     CTrapCleanup* cleanupStack = CTrapCleanup::New();
00284 <a name="l00267"></a>00267     <span class="keywordflow">if</span> ( !( cleanupStack ) )
00285 <a name="l00268"></a>00268         {
00286 <a name="l00269"></a>00269         <a class="code" href="class_c_time_server.html#57317bfd7bbf407064d8f0b845a16d46">PanicServer</a>( ECreateTrapCleanup );
00287 <a name="l00270"></a>00270         }
00288 <a name="l00271"></a>00271 
00289 <a name="l00272"></a>00272     TRAPD( err, <a class="code" href="class_c_time_server.html#be5e4a4628587739b7c76951f9577e8e">ThreadFunctionL</a>() );
00290 <a name="l00273"></a>00273     <span class="keywordflow">if</span> ( err != KErrNone )
00291 <a name="l00274"></a>00274         {
00292 <a name="l00275"></a>00275         <a class="code" href="class_c_time_server.html#57317bfd7bbf407064d8f0b845a16d46">PanicServer</a>( ESrvCreateServer );
00293 <a name="l00276"></a>00276         }
00294 <a name="l00277"></a>00277 
00295 <a name="l00278"></a>00278     <span class="keyword">delete</span> cleanupStack;
00296 <a name="l00279"></a>00279     cleanupStack = NULL;
00297 <a name="l00280"></a>00280 
00298 <a name="l00281"></a>00281     <span class="keywordflow">return</span> KErrNone;
00299 <a name="l00282"></a>00282     }
00300 </pre></div>
00301 <p>
00302     </td>
00303   </tr>
00304 </table>
00305 <a class="anchor" name="a3afdfcfbf3d8aa45b7f96b5a1c7119e"></a><!-- doxytag: member="CTimeServer::IncrementSessions" ref="a3afdfcfbf3d8aa45b7f96b5a1c7119e" args="()" --><p>
00306 <table class="mdTable" cellpadding="2" cellspacing="0">
00307   <tr>
00308     <td class="mdRow">
00309       <table cellpadding="0" cellspacing="0" border="0">
00310         <tr>
00311           <td class="md" nowrap valign="top">void CTimeServer::IncrementSessions           </td>
00312           <td class="md" valign="top">(&nbsp;</td>
00313           <td class="mdname1" valign="top" nowrap>          </td>
00314           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00315           <td class="md" nowrap></td>
00316         </tr>
00317       </table>
00318     </td>
00319   </tr>
00320 </table>
00321 <table cellspacing="5" cellpadding="0" border="0">
00322   <tr>
00323     <td>
00324       &nbsp;
00325     </td>
00326     <td>
00327 
00328 <p>
00329 IncrementSessions. Increments the count of the active sessions for this server. 
00330 <p>
00331 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00111">111</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00332 <p>
00333 References <a class="el" href="timeserver_8h-source.html#l00170">iSessionCount</a>.
00334 <p>
00335 Referenced by <a class="el" href="timesession_8cpp-source.html#l00056">CTimeServerSession::ConstructL()</a>.<div class="fragment"><pre class="fragment"><a name="l00112"></a>00112     {
00336 <a name="l00113"></a>00113     <a class="code" href="class_c_time_server.html#40ac9219e4400c125719d767d564fc3e">iSessionCount</a>++;
00337 <a name="l00114"></a>00114     }
00338 </pre></div>
00339 <p>
00340     </td>
00341   </tr>
00342 </table>
00343 <a class="anchor" name="982e65810ad50ce20759fd26fad488dc"></a><!-- doxytag: member="CTimeServer::DecrementSessions" ref="982e65810ad50ce20759fd26fad488dc" args="()" --><p>
00344 <table class="mdTable" cellpadding="2" cellspacing="0">
00345   <tr>
00346     <td class="mdRow">
00347       <table cellpadding="0" cellspacing="0" border="0">
00348         <tr>
00349           <td class="md" nowrap valign="top">void CTimeServer::DecrementSessions           </td>
00350           <td class="md" valign="top">(&nbsp;</td>
00351           <td class="mdname1" valign="top" nowrap>          </td>
00352           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00353           <td class="md" nowrap></td>
00354         </tr>
00355       </table>
00356     </td>
00357   </tr>
00358 </table>
00359 <table cellspacing="5" cellpadding="0" border="0">
00360   <tr>
00361     <td>
00362       &nbsp;
00363     </td>
00364     <td>
00365 
00366 <p>
00367 DecrementSessions. Decrements the count of the active sessions for this server. If no more sessions are in use the server terminates. 
00368 <p>
00369 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00121">121</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00370 <p>
00371 References <a class="el" href="timeserver_8h-source.html#l00170">iSessionCount</a>.
00372 <p>
00373 Referenced by <a class="el" href="timesession_8cpp-source.html#l00077">CTimeServerSession::~CTimeServerSession()</a>.<div class="fragment"><pre class="fragment"><a name="l00122"></a>00122     {
00374 <a name="l00123"></a>00123     <a class="code" href="class_c_time_server.html#40ac9219e4400c125719d767d564fc3e">iSessionCount</a>--;
00375 <a name="l00124"></a>00124     <span class="keywordflow">if</span> ( <a class="code" href="class_c_time_server.html#40ac9219e4400c125719d767d564fc3e">iSessionCount</a> &lt;= 0 )
00376 <a name="l00125"></a>00125         {
00377 <a name="l00126"></a>00126         CActiveScheduler::Stop();
00378 <a name="l00127"></a>00127         }
00379 <a name="l00128"></a>00128     }
00380 </pre></div>
00381 <p>
00382     </td>
00383   </tr>
00384 </table>
00385 <a class="anchor" name="a8205372b5d379fa4b803e98b0726473"></a><!-- doxytag: member="CTimeServer::WaitForTickL" ref="a8205372b5d379fa4b803e98b0726473" args="()" --><p>
00386 <table class="mdTable" cellpadding="2" cellspacing="0">
00387   <tr>
00388     <td class="mdRow">
00389       <table cellpadding="0" cellspacing="0" border="0">
00390         <tr>
00391           <td class="md" nowrap valign="top">void CTimeServer::WaitForTickL           </td>
00392           <td class="md" valign="top">(&nbsp;</td>
00393           <td class="mdname1" valign="top" nowrap>          </td>
00394           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00395           <td class="md" nowrap></td>
00396         </tr>
00397       </table>
00398     </td>
00399   </tr>
00400 </table>
00401 <table cellspacing="5" cellpadding="0" border="0">
00402   <tr>
00403     <td>
00404       &nbsp;
00405     </td>
00406     <td>
00407 
00408 <p>
00409 WaitForTickL. Activates the heartbeat. 
00410 <p>
00411 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00181">181</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00412 <p>
00413 References <a class="el" href="timeserver_8h-source.html#l00176">iHeartbeat</a>.
00414 <p>
00415 Referenced by <a class="el" href="timesession_8cpp-source.html#l00114">CTimeServerSession::RequestTimeL()</a>.<div class="fragment"><pre class="fragment"><a name="l00182"></a>00182     {
00416 <a name="l00183"></a>00183     <span class="keywordflow">if</span> ( !<a class="code" href="class_c_time_server.html#bd20aae428bf045cb28f7958102a14e1">iHeartbeat</a> )
00417 <a name="l00184"></a>00184         {
00418 <a name="l00185"></a>00185         <a class="code" href="class_c_time_server.html#bd20aae428bf045cb28f7958102a14e1">iHeartbeat</a> = CHeartbeat::NewL( EPriorityHigh );
00419 <a name="l00186"></a>00186         <a class="code" href="class_c_time_server.html#bd20aae428bf045cb28f7958102a14e1">iHeartbeat</a>-&gt;Start( ETwelveOClock, <span class="keyword">this</span> );
00420 <a name="l00187"></a>00187         }
00421 <a name="l00188"></a>00188     }
00422 </pre></div>
00423 <p>
00424     </td>
00425   </tr>
00426 </table>
00427 <a class="anchor" name="8bc39d8613772fe04fa5d6a845ede8cd"></a><!-- doxytag: member="CTimeServer::Beat" ref="8bc39d8613772fe04fa5d6a845ede8cd" args="()" --><p>
00428 <table class="mdTable" cellpadding="2" cellspacing="0">
00429   <tr>
00430     <td class="mdRow">
00431       <table cellpadding="0" cellspacing="0" border="0">
00432         <tr>
00433           <td class="md" nowrap valign="top">void CTimeServer::Beat           </td>
00434           <td class="md" valign="top">(&nbsp;</td>
00435           <td class="mdname1" valign="top" nowrap>          </td>
00436           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00437           <td class="md" nowrap></td>
00438         </tr>
00439       </table>
00440     </td>
00441   </tr>
00442 </table>
00443 <table cellspacing="5" cellpadding="0" border="0">
00444   <tr>
00445     <td>
00446       &nbsp;
00447     </td>
00448     <td>
00449 
00450 <p>
00451 From MBeating, Beat. A clock tick has occured. 
00452 <p>
00453 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00195">195</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00454 <p>
00455 References <a class="el" href="timeserver_8cpp-source.html#l00215">SendTimeToSessions()</a>.<div class="fragment"><pre class="fragment"><a name="l00196"></a>00196     {
00456 <a name="l00197"></a>00197     <a class="code" href="class_c_time_server.html#993249bd000d59f1d0437eea0ab25fc3">SendTimeToSessions</a>();
00457 <a name="l00198"></a>00198     }
00458 </pre></div>
00459 <p>
00460     </td>
00461   </tr>
00462 </table>
00463 <a class="anchor" name="a6043d9cad7048bb64b0d0d125ddc875"></a><!-- doxytag: member="CTimeServer::Synchronize" ref="a6043d9cad7048bb64b0d0d125ddc875" args="()" --><p>
00464 <table class="mdTable" cellpadding="2" cellspacing="0">
00465   <tr>
00466     <td class="mdRow">
00467       <table cellpadding="0" cellspacing="0" border="0">
00468         <tr>
00469           <td class="md" nowrap valign="top">void CTimeServer::Synchronize           </td>
00470           <td class="md" valign="top">(&nbsp;</td>
00471           <td class="mdname1" valign="top" nowrap>          </td>
00472           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00473           <td class="md" nowrap></td>
00474         </tr>
00475       </table>
00476     </td>
00477   </tr>
00478 </table>
00479 <table cellspacing="5" cellpadding="0" border="0">
00480   <tr>
00481     <td>
00482       &nbsp;
00483     </td>
00484     <td>
00485 
00486 <p>
00487 From MBeating, Synchronize. Several clock ticks have occured. 
00488 <p>
00489 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00205">205</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00490 <p>
00491 References <a class="el" href="timeserver_8cpp-source.html#l00215">SendTimeToSessions()</a>.<div class="fragment"><pre class="fragment"><a name="l00206"></a>00206     {
00492 <a name="l00207"></a>00207     <a class="code" href="class_c_time_server.html#993249bd000d59f1d0437eea0ab25fc3">SendTimeToSessions</a>();
00493 <a name="l00208"></a>00208     }
00494 </pre></div>
00495 <p>
00496     </td>
00497   </tr>
00498 </table>
00499 <a class="anchor" name="0f788de08f5d216c674e6eaeaea1c67a"></a><!-- doxytag: member="CTimeServer::RunError" ref="0f788de08f5d216c674e6eaeaea1c67a" args="(TInt aError)" --><p>
00500 <table class="mdTable" cellpadding="2" cellspacing="0">
00501   <tr>
00502     <td class="mdRow">
00503       <table cellpadding="0" cellspacing="0" border="0">
00504         <tr>
00505           <td class="md" nowrap valign="top">TInt CTimeServer::RunError           </td>
00506           <td class="md" valign="top">(&nbsp;</td>
00507           <td class="md" nowrap valign="top">TInt&nbsp;</td>
00508           <td class="mdname1" valign="top" nowrap> <em>aError</em>          </td>
00509           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00510           <td class="md" nowrap><code> [protected]</code></td>
00511         </tr>
00512       </table>
00513     </td>
00514   </tr>
00515 </table>
00516 <table cellspacing="5" cellpadding="0" border="0">
00517   <tr>
00518     <td>
00519       &nbsp;
00520     </td>
00521     <td>
00522 
00523 <p>
00524 From CActive, RunError. Processes any errors. <dl compact><dt><b>Parameters:</b></dt><dd>
00525   <table border="0" cellspacing="2" cellpadding="0">
00526     <tr><td valign="top"></td><td valign="top"><em>aError</em>&nbsp;</td><td>The leave code reported. </td></tr>
00527   </table>
00528 </dl>
00529 <dl compact><dt><b>Returns:</b></dt><dd>return KErrNone if leave is handled. </dd></dl>
00530 
00531 <p>
00532 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00135">135</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00533 <p>
00534 References <a class="el" href="timeserver_8cpp-source.html#l00161">PanicClient()</a>.<div class="fragment"><pre class="fragment"><a name="l00136"></a>00136     {
00535 <a name="l00137"></a>00137     <span class="keywordflow">if</span> ( aError == KErrBadDescriptor )
00536 <a name="l00138"></a>00138         {
00537 <a name="l00139"></a>00139         <span class="comment">// A bad descriptor error implies a badly programmed client,</span>
00538 <a name="l00140"></a>00140         <span class="comment">// so panic it; otherwise report the error to the client</span>
00539 <a name="l00141"></a>00141         <a class="code" href="class_c_time_server.html#5486029c4d68e3db4b0cbbbd2c4c711e">PanicClient</a>( Message(), EBadDescriptor );
00540 <a name="l00142"></a>00142         }
00541 <a name="l00143"></a>00143     <span class="keywordflow">else</span>
00542 <a name="l00144"></a>00144         {
00543 <a name="l00145"></a>00145         Message().Complete( aError );
00544 <a name="l00146"></a>00146         }
00545 <a name="l00147"></a>00147 
00546 <a name="l00148"></a>00148     <span class="comment">// The leave will result in an early return from CServer::RunL(), skipping</span>
00547 <a name="l00149"></a>00149     <span class="comment">// the call to request another message. So do that now in order to keep the</span>
00548 <a name="l00150"></a>00150     <span class="comment">// server running.</span>
00549 <a name="l00151"></a>00151     ReStart();
00550 <a name="l00152"></a>00152 
00551 <a name="l00153"></a>00153     <span class="keywordflow">return</span> KErrNone;    <span class="comment">// Handled the error fully</span>
00552 <a name="l00154"></a>00154     }
00553 </pre></div>
00554 <p>
00555     </td>
00556   </tr>
00557 </table>
00558 <a class="anchor" name="9ce34ba0b947863222da3c63d0481044"></a><!-- doxytag: member="CTimeServer::ConstructL" ref="9ce34ba0b947863222da3c63d0481044" args="()" --><p>
00559 <table class="mdTable" cellpadding="2" cellspacing="0">
00560   <tr>
00561     <td class="mdRow">
00562       <table cellpadding="0" cellspacing="0" border="0">
00563         <tr>
00564           <td class="md" nowrap valign="top">void CTimeServer::ConstructL           </td>
00565           <td class="md" valign="top">(&nbsp;</td>
00566           <td class="mdname1" valign="top" nowrap>          </td>
00567           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00568           <td class="md" nowrap><code> [private]</code></td>
00569         </tr>
00570       </table>
00571     </td>
00572   </tr>
00573 </table>
00574 <table cellspacing="5" cellpadding="0" border="0">
00575   <tr>
00576     <td>
00577       &nbsp;
00578     </td>
00579     <td>
00580 
00581 <p>
00582 ConstructL. 2nd phase constructor. 
00583 <p>
00584 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00057">57</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00585 <p>
00586 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00044">NewLC()</a>.<div class="fragment"><pre class="fragment"><a name="l00058"></a>00058     {
00587 <a name="l00059"></a>00059     StartL( KTimeServerName );
00588 <a name="l00060"></a>00060     }
00589 </pre></div>
00590 <p>
00591     </td>
00592   </tr>
00593 </table>
00594 <a class="anchor" name="5486029c4d68e3db4b0cbbbd2c4c711e"></a><!-- doxytag: member="CTimeServer::PanicClient" ref="5486029c4d68e3db4b0cbbbd2c4c711e" args="(const RMessage2 &amp;aMessage, TTimeServPanic aReason)" --><p>
00595 <table class="mdTable" cellpadding="2" cellspacing="0">
00596   <tr>
00597     <td class="mdRow">
00598       <table cellpadding="0" cellspacing="0" border="0">
00599         <tr>
00600           <td class="md" nowrap valign="top">void CTimeServer::PanicClient           </td>
00601           <td class="md" valign="top">(&nbsp;</td>
00602           <td class="md" nowrap valign="top">const RMessage2 &amp;&nbsp;</td>
00603           <td class="mdname" nowrap> <em>aMessage</em>, </td>
00604         </tr>
00605         <tr>
00606           <td class="md" nowrap align="right"></td>
00607           <td class="md"></td>
00608           <td class="md" nowrap>TTimeServPanic&nbsp;</td>
00609           <td class="mdname" nowrap> <em>aReason</em></td>
00610         </tr>
00611         <tr>
00612           <td class="md"></td>
00613           <td class="md">)&nbsp;</td>
00614           <td class="md" colspan="2"><code> [static, private]</code></td>
00615         </tr>
00616       </table>
00617     </td>
00618   </tr>
00619 </table>
00620 <table cellspacing="5" cellpadding="0" border="0">
00621   <tr>
00622     <td>
00623       &nbsp;
00624     </td>
00625     <td>
00626 
00627 <p>
00628 PanicClient. Panics the client. <dl compact><dt><b>Parameters:</b></dt><dd>
00629   <table border="0" cellspacing="2" cellpadding="0">
00630     <tr><td valign="top"></td><td valign="top"><em>aMessage</em>&nbsp;</td><td>The message channel to the client. </td></tr>
00631     <tr><td valign="top"></td><td valign="top"><em>aReason</em>&nbsp;</td><td>The reason code for the panic. </td></tr>
00632   </table>
00633 </dl>
00634 
00635 <p>
00636 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00161">161</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00637 <p>
00638 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00135">RunError()</a>.<div class="fragment"><pre class="fragment"><a name="l00162"></a>00162     {
00639 <a name="l00163"></a>00163     aMessage.Panic( KCSAsyncServer, aPanic );
00640 <a name="l00164"></a>00164     }
00641 </pre></div>
00642 <p>
00643     </td>
00644   </tr>
00645 </table>
00646 <a class="anchor" name="57317bfd7bbf407064d8f0b845a16d46"></a><!-- doxytag: member="CTimeServer::PanicServer" ref="57317bfd7bbf407064d8f0b845a16d46" args="(TTimeServPanic aPanic)" --><p>
00647 <table class="mdTable" cellpadding="2" cellspacing="0">
00648   <tr>
00649     <td class="mdRow">
00650       <table cellpadding="0" cellspacing="0" border="0">
00651         <tr>
00652           <td class="md" nowrap valign="top">void CTimeServer::PanicServer           </td>
00653           <td class="md" valign="top">(&nbsp;</td>
00654           <td class="md" nowrap valign="top">TTimeServPanic&nbsp;</td>
00655           <td class="mdname1" valign="top" nowrap> <em>aPanic</em>          </td>
00656           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00657           <td class="md" nowrap><code> [static, private]</code></td>
00658         </tr>
00659       </table>
00660     </td>
00661   </tr>
00662 </table>
00663 <table cellspacing="5" cellpadding="0" border="0">
00664   <tr>
00665     <td>
00666       &nbsp;
00667     </td>
00668     <td>
00669 
00670 <p>
00671 PanicServer. Panics the server. <dl compact><dt><b>Parameters:</b></dt><dd>
00672   <table border="0" cellspacing="2" cellpadding="0">
00673     <tr><td valign="top"></td><td valign="top"><em>aPanic</em>&nbsp;</td><td>The panic code. </td></tr>
00674   </table>
00675 </dl>
00676 
00677 <p>
00678 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00171">171</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00679 <p>
00680 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00264">ThreadFunction()</a>.<div class="fragment"><pre class="fragment"><a name="l00172"></a>00172     {
00681 <a name="l00173"></a>00173     User::Panic( KCSAsyncServer, aPanic );
00682 <a name="l00174"></a>00174     }
00683 </pre></div>
00684 <p>
00685     </td>
00686   </tr>
00687 </table>
00688 <a class="anchor" name="be5e4a4628587739b7c76951f9577e8e"></a><!-- doxytag: member="CTimeServer::ThreadFunctionL" ref="be5e4a4628587739b7c76951f9577e8e" args="()" --><p>
00689 <table class="mdTable" cellpadding="2" cellspacing="0">
00690   <tr>
00691     <td class="mdRow">
00692       <table cellpadding="0" cellspacing="0" border="0">
00693         <tr>
00694           <td class="md" nowrap valign="top">void CTimeServer::ThreadFunctionL           </td>
00695           <td class="md" valign="top">(&nbsp;</td>
00696           <td class="mdname1" valign="top" nowrap>          </td>
00697           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00698           <td class="md" nowrap><code> [static, private]</code></td>
00699         </tr>
00700       </table>
00701     </td>
00702   </tr>
00703 </table>
00704 <table cellspacing="5" cellpadding="0" border="0">
00705   <tr>
00706     <td>
00707       &nbsp;
00708     </td>
00709     <td>
00710 
00711 <p>
00712 ThreadFunctionL. Second stage startup for the server thread. 
00713 <p>
00714 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00232">232</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00715 <p>
00716 References <a class="el" href="timeserver_8cpp-source.html#l00044">NewLC()</a>.
00717 <p>
00718 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00264">ThreadFunction()</a>.<div class="fragment"><pre class="fragment"><a name="l00233"></a>00233     {
00719 <a name="l00234"></a>00234     <span class="comment">// Construct active scheduler</span>
00720 <a name="l00235"></a>00235     CActiveScheduler* activeScheduler = <span class="keyword">new</span> ( ELeave ) CActiveScheduler;
00721 <a name="l00236"></a>00236     CleanupStack::PushL( activeScheduler );
00722 <a name="l00237"></a>00237 
00723 <a name="l00238"></a>00238     <span class="comment">// Install active scheduler</span>
00724 <a name="l00239"></a>00239     <span class="comment">// We don't need to check whether an active scheduler is already installed</span>
00725 <a name="l00240"></a>00240     <span class="comment">// as this is a new thread, so there won't be one</span>
00726 <a name="l00241"></a>00241     CActiveScheduler::Install( activeScheduler );
00727 <a name="l00242"></a>00242 
00728 <a name="l00243"></a>00243     <span class="comment">// Construct our server</span>
00729 <a name="l00244"></a>00244     <a class="code" href="class_c_time_server.html#94389c6729b439332fc74a54ac683740">CTimeServer::NewLC</a>();    <span class="comment">// Anonymous</span>
00730 <a name="l00245"></a>00245 
00731 <a name="l00246"></a>00246     RSemaphore semaphore;
00732 <a name="l00247"></a>00247     User::LeaveIfError( semaphore.OpenGlobal( KTimeServerSemaphoreName ) );
00733 <a name="l00248"></a>00248 
00734 <a name="l00249"></a>00249     <span class="comment">// Semaphore opened ok</span>
00735 <a name="l00250"></a>00250     semaphore.Signal();
00736 <a name="l00251"></a>00251     semaphore.Close();
00737 <a name="l00252"></a>00252 
00738 <a name="l00253"></a>00253     <span class="comment">// Start handling requests</span>
00739 <a name="l00254"></a>00254     CActiveScheduler::Start();
00740 <a name="l00255"></a>00255 
00741 <a name="l00256"></a>00256     CleanupStack::PopAndDestroy( 2, activeScheduler ); <span class="comment">//Anonymous CTimeServer</span>
00742 <a name="l00257"></a>00257     }
00743 </pre></div>
00744 <p>
00745     </td>
00746   </tr>
00747 </table>
00748 <a class="anchor" name="993249bd000d59f1d0437eea0ab25fc3"></a><!-- doxytag: member="CTimeServer::SendTimeToSessions" ref="993249bd000d59f1d0437eea0ab25fc3" args="()" --><p>
00749 <table class="mdTable" cellpadding="2" cellspacing="0">
00750   <tr>
00751     <td class="mdRow">
00752       <table cellpadding="0" cellspacing="0" border="0">
00753         <tr>
00754           <td class="md" nowrap valign="top">void CTimeServer::SendTimeToSessions           </td>
00755           <td class="md" valign="top">(&nbsp;</td>
00756           <td class="mdname1" valign="top" nowrap>          </td>
00757           <td class="md" valign="top">&nbsp;)&nbsp;</td>
00758           <td class="md" nowrap><code> [private]</code></td>
00759         </tr>
00760       </table>
00761     </td>
00762   </tr>
00763 </table>
00764 <table cellspacing="5" cellpadding="0" border="0">
00765   <tr>
00766     <td>
00767       &nbsp;
00768     </td>
00769     <td>
00770 
00771 <p>
00772 SendTimeToSessions. Informs all the clients that a time change has occured. 
00773 <p>
00774 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00215">215</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00775 <p>
00776 References <a class="el" href="timesession_8cpp-source.html#l00138">CTimeServerSession::SendTimeToClient()</a>.
00777 <p>
00778 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00195">Beat()</a>, and <a class="el" href="timeserver_8cpp-source.html#l00205">Synchronize()</a>.<div class="fragment"><pre class="fragment"><a name="l00216"></a>00216     {
00779 <a name="l00217"></a>00217     iSessionIter.SetToFirst();
00780 <a name="l00218"></a>00218     <a class="code" href="class_c_time_server_session.html">CTimeServerSession</a>* session;
00781 <a name="l00219"></a>00219     session = reinterpret_cast&lt;CTimeServerSession*&gt;( iSessionIter++ );
00782 <a name="l00220"></a>00220     <span class="keywordflow">while</span> ( session )
00783 <a name="l00221"></a>00221         {
00784 <a name="l00222"></a>00222         session-&gt;<a class="code" href="class_c_time_server_session.html#ecff8e289d914777ae0c503db937cf33">SendTimeToClient</a>();
00785 <a name="l00223"></a>00223         session = reinterpret_cast&lt;CTimeServerSession*&gt;( iSessionIter++ );
00786 <a name="l00224"></a>00224         }
00787 <a name="l00225"></a>00225     }
00788 </pre></div>
00789 <p>
00790     </td>
00791   </tr>
00792 </table>
00793 <a class="anchor" name="e8cc7a175c8a6ec0a2b0ee8bf27badb9"></a><!-- doxytag: member="CTimeServer::NewSessionL" ref="e8cc7a175c8a6ec0a2b0ee8bf27badb9" args="(const TVersion &amp;aVersion, const RMessage2 &amp;aMessage) const " --><p>
00794 <table class="mdTable" cellpadding="2" cellspacing="0">
00795   <tr>
00796     <td class="mdRow">
00797       <table cellpadding="0" cellspacing="0" border="0">
00798         <tr>
00799           <td class="md" nowrap valign="top">CSession2 * CTimeServer::NewSessionL           </td>
00800           <td class="md" valign="top">(&nbsp;</td>
00801           <td class="md" nowrap valign="top">const TVersion &amp;&nbsp;</td>
00802           <td class="mdname" nowrap> <em>aVersion</em>, </td>
00803         </tr>
00804         <tr>
00805           <td class="md" nowrap align="right"></td>
00806           <td class="md"></td>
00807           <td class="md" nowrap>const RMessage2 &amp;&nbsp;</td>
00808           <td class="mdname" nowrap> <em>aMessage</em></td>
00809         </tr>
00810         <tr>
00811           <td class="md"></td>
00812           <td class="md">)&nbsp;</td>
00813           <td class="md" colspan="2"> const<code> [private]</code></td>
00814         </tr>
00815       </table>
00816     </td>
00817   </tr>
00818 </table>
00819 <table cellspacing="5" cellpadding="0" border="0">
00820   <tr>
00821     <td>
00822       &nbsp;
00823     </td>
00824     <td>
00825 
00826 <p>
00827 From CServer, NewSessionL. Creates a time server session. <dl compact><dt><b>Parameters:</b></dt><dd>
00828   <table border="0" cellspacing="2" cellpadding="0">
00829     <tr><td valign="top"></td><td valign="top"><em>aVersion</em>&nbsp;</td><td>The client version. </td></tr>
00830     <tr><td valign="top"></td><td valign="top"><em>aMessage</em>&nbsp;</td><td>Message from client. </td></tr>
00831   </table>
00832 </dl>
00833 <dl compact><dt><b>Returns:</b></dt><dd>Pointer to new session. </dd></dl>
00834 
00835 <p>
00836 Definition at line <a class="el" href="timeserver_8cpp-source.html#l00089">89</a> of file <a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a>.
00837 <p>
00838 References <a class="el" href="timesession_8cpp-source.html#l00031">CTimeServerSession::NewL()</a>.<div class="fragment"><pre class="fragment"><a name="l00091"></a>00091     {
00839 <a name="l00092"></a>00092     <span class="comment">// Check we are the right version</span>
00840 <a name="l00093"></a>00093     <span class="keywordflow">if</span> ( !User::QueryVersionSupported( TVersion( KTimeServMajorVersionNumber,
00841 <a name="l00094"></a>00094                                                  KTimeServMinorVersionNumber,
00842 <a name="l00095"></a>00095                                                  KTimeServBuildVersionNumber ),
00843 <a name="l00096"></a>00096                                        aVersion ) )
00844 <a name="l00097"></a>00097         {
00845 <a name="l00098"></a>00098         User::Leave( KErrNotSupported );
00846 <a name="l00099"></a>00099         }
00847 <a name="l00100"></a>00100 
00848 <a name="l00101"></a>00101     <span class="comment">// Make new session</span>
00849 <a name="l00102"></a>00102     <span class="comment">//RThread client = Message().Client();</span>
00850 <a name="l00103"></a>00103     <span class="keywordflow">return</span> <a class="code" href="class_c_time_server_session.html#73d44aed371951fd548af4329b779411">CTimeServerSession::NewL</a>( *const_cast&lt;CTimeServer*&gt; ( <span class="keyword">this</span> ) );
00851 <a name="l00104"></a>00104     }
00852 </pre></div>
00853 <p>
00854     </td>
00855   </tr>
00856 </table>
00857 <hr><h2>Member Data Documentation</h2>
00858 <a class="anchor" name="40ac9219e4400c125719d767d564fc3e"></a><!-- doxytag: member="CTimeServer::iSessionCount" ref="40ac9219e4400c125719d767d564fc3e" args="" --><p>
00859 <table class="mdTable" cellpadding="2" cellspacing="0">
00860   <tr>
00861     <td class="mdRow">
00862       <table cellpadding="0" cellspacing="0" border="0">
00863         <tr>
00864           <td class="md" nowrap valign="top">TInt <a class="el" href="class_c_time_server.html#40ac9219e4400c125719d767d564fc3e">CTimeServer::iSessionCount</a><code> [private]</code>          </td>
00865         </tr>
00866       </table>
00867     </td>
00868   </tr>
00869 </table>
00870 <table cellspacing="5" cellpadding="0" border="0">
00871   <tr>
00872     <td>
00873       &nbsp;
00874     </td>
00875     <td>
00876 
00877 <p>
00878 iSessionCount, the number of session owned by this server. 
00879 <p>
00880 Definition at line <a class="el" href="timeserver_8h-source.html#l00170">170</a> of file <a class="el" href="timeserver_8h-source.html">timeserver.h</a>.
00881 <p>
00882 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00121">DecrementSessions()</a>, and <a class="el" href="timeserver_8cpp-source.html#l00111">IncrementSessions()</a>.    </td>
00883   </tr>
00884 </table>
00885 <a class="anchor" name="bd20aae428bf045cb28f7958102a14e1"></a><!-- doxytag: member="CTimeServer::iHeartbeat" ref="bd20aae428bf045cb28f7958102a14e1" args="" --><p>
00886 <table class="mdTable" cellpadding="2" cellspacing="0">
00887   <tr>
00888     <td class="mdRow">
00889       <table cellpadding="0" cellspacing="0" border="0">
00890         <tr>
00891           <td class="md" nowrap valign="top">CHeartbeat* <a class="el" href="class_c_time_server.html#bd20aae428bf045cb28f7958102a14e1">CTimeServer::iHeartbeat</a><code> [private]</code>          </td>
00892         </tr>
00893       </table>
00894     </td>
00895   </tr>
00896 </table>
00897 <table cellspacing="5" cellpadding="0" border="0">
00898   <tr>
00899     <td>
00900       &nbsp;
00901     </td>
00902     <td>
00903 
00904 <p>
00905 iHeartbeat, a periodic timer used to update the client. Owned by CTimeServer object. 
00906 <p>
00907 Definition at line <a class="el" href="timeserver_8h-source.html#l00176">176</a> of file <a class="el" href="timeserver_8h-source.html">timeserver.h</a>.
00908 <p>
00909 Referenced by <a class="el" href="timeserver_8cpp-source.html#l00181">WaitForTickL()</a>, and <a class="el" href="timeserver_8cpp-source.html#l00078">~CTimeServer()</a>.    </td>
00910   </tr>
00911 </table>
00912 <hr>The documentation for this class was generated from the following files:<ul>
00913 <li><a class="el" href="timeserver_8h-source.html">timeserver.h</a><li><a class="el" href="timeserver_8cpp-source.html">timeserver.cpp</a></ul>
00914 <hr>
00915 
00916 <table x-use-null-cells
00917                 style="x-cell-content-align: top;
00918                                 width: 100%;
00919                                 border-spacing: 0px;
00920                                 border-spacing: 0px;"
00921                 cellspacing=0
00922                 width=100%>
00923   <col style="width: 50%;">
00924   <col style="width: 50%;">
00925 
00926   <tr style="x-cell-content-align: top;"
00927         valign=top>
00928   <td style="width: 50%;
00929                         padding-right: 10px;
00930                         padding-left: 10px;
00931                         border-right-style: None;
00932                         border-left-style: None;
00933                         border-top-style: None;
00934                         border-bottom-style: None;"
00935         width=50%>
00936   <p style="font-family: Arial;"><small style="font-size: smaller;">© Nokia 2009</small></td>
00937   <td style="width: 50%;
00938                         padding-right: 10px;
00939                         padding-left: 10px;
00940                         border-top-style: None;
00941                         border-bottom-style: None;
00942                         border-right-style: None;"
00943         width=50%>
00944   <p style="text-align: right; margin-right: -4px;"
00945         align=right><span style="font-weight: bold;"><a href="#Top"
00946                                                                                                         title="Back to top"><img
00947  src="top.gif"
00948         x-maintain-ratio=TRUE
00949         alt="Back to top"
00950         style="border: none;
00951                         width: 18px;
00952                         height: 15px;
00953                         float: none;
00954                         border-style: none;
00955                         border-style: none;"
00956         width=18
00957         height=15
00958         border=0></a></span></td></tr>
00959  </table>
00960 </body>
00961 </html>
00962 

Generated by  doxygen 1.6.2