Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_count_session.html
Week 12 contribution of SDK documentation_content. See release notes for details. Fixes Bug 1892, Bug 1522, Bug 1520, Bug 394, Bug 1319, Bug 344, Bug 1897
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>TB10.1 Example Applications: CCountSession Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<h1>CCountSession Class Reference</h1><!-- doxytag: class="CCountSession" -->
<p>
<a href="class_c_count_session-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#239d9501701b0004d1fc0efb344020b4">CCountSession</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#2dbd5404a911d552cef714ccd7380a4b">CreateL</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#351934a6cd722819a7b1dfa0230b7753">ServiceL</a> (const RMessage2 &aMessage)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#c71fdc2ad63cba964435f1558b489675">DispatchMessageL</a> (const RMessage2 &aMessage)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#9cd299c533497b661f822eb634d43af6">NewCounterL</a> (const RMessage2 &aMessage)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#378bdf2448c2b74bad7a6466a4da015d">CloseSession</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#054b27fceb1e30d58c959ea26c920cac">NumResourcesL</a> (const RMessage2 &aMessage)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_c_count_sub_session.html">CCountSubSession</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#5c0ec9614dcc638ffd4007c981858e8a">CounterFromHandle</a> (const RMessage2 &aMessage, TInt aHandle)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#dd6e6fefce82bc969a1d09df0d0ada22">DeleteCounter</a> (TInt aHandle)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dc08334824f979821d50d345169e065a"></a><!-- doxytag: member="CCountSession::CountResources" ref="dc08334824f979821d50d345169e065a" args="()" -->
TInt </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#dc08334824f979821d50d345169e065a">CountResources</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_count_session.html#d644b9c1a23a7002f774d0ceb017bfb8">PanicClient</a> (const RMessage2 &aMessage, TInt aPanic) const </td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c56335978062335dae85878eb330ba7"></a><!-- doxytag: member="CCountSession::NewL" ref="1c56335978062335dae85878eb330ba7" args="()" -->
static <a class="el" href="class_c_count_session.html">CCountSession</a> * </td><td class="memItemRight" valign="bottom"><b>NewL</b> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<p>Definition at line <a class="el" href="_complex_server_8h-source.html#l00105">105</a> of file <a class="el" href="_complex_server_8h-source.html">ComplexServer.h</a>.</p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="239d9501701b0004d1fc0efb344020b4"></a><!-- doxytag: member="CCountSession::CCountSession" ref="239d9501701b0004d1fc0efb344020b4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CCountSession::CCountSession </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Constructor
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00030">30</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="2dbd5404a911d552cef714ccd7380a4b"></a><!-- doxytag: member="CCountSession::CreateL" ref="2dbd5404a911d552cef714ccd7380a4b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CCountSession::CreateL </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Called by client/server framework after session has been successfully created.<p>
In effect, a second-phase constructor.<p>
Creates:<p>
1. the object index 2. the object container for this session.<p>
We are then ready for subsessions.
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00048">48</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="351934a6cd722819a7b1dfa0230b7753"></a><!-- doxytag: member="CCountSession::ServiceL" ref="351934a6cd722819a7b1dfa0230b7753" args="(const RMessage2 &aMessage)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CCountSession::ServiceL </td>
<td>(</td>
<td class="paramtype">const RMessage2 & </td>
<td class="paramname"> <em>aMessage</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
First line servicing of a client request.<p>
This function dispatches requests to the appropriate handler. Some messages are handled by the session itself, and are implemented as <a class="el" href="class_c_count_session.html">CCountSession</a> member functions, while other messages are handled by the subsession, and are implemented as <a class="el" href="class_c_count_sub_session.html">CCountSubSession</a> member functions.
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00104">104</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="c71fdc2ad63cba964435f1558b489675"></a><!-- doxytag: member="CCountSession::DispatchMessageL" ref="c71fdc2ad63cba964435f1558b489675" args="(const RMessage2 &aMessage)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CCountSession::DispatchMessageL </td>
<td>(</td>
<td class="paramtype">const RMessage2 & </td>
<td class="paramname"> <em>aMessage</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Called by <a class="el" href="class_c_count_session.html#351934a6cd722819a7b1dfa0230b7753">ServiceL()</a><p>
It tests the function code and then delegates to the appropriate function.
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00117">117</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="9cd299c533497b661f822eb634d43af6"></a><!-- doxytag: member="CCountSession::NewCounterL" ref="9cd299c533497b661f822eb634d43af6" args="(const RMessage2 &aMessage)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CCountSession::NewCounterL </td>
<td>(</td>
<td class="paramtype">const RMessage2 & </td>
<td class="paramname"> <em>aMessage</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a new counter object, and passes its handle back via the message.<p>
The counter object is the server side "partner" to the client side subsession.
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00178">178</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="378bdf2448c2b74bad7a6466a4da015d"></a><!-- doxytag: member="CCountSession::CloseSession" ref="378bdf2448c2b74bad7a6466a4da015d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CCountSession::CloseSession </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Closes the session.<p>
It deletes the object index and object container.<p>
This could be done in the destructor, but it seems neater to do it here.
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00066">66</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="054b27fceb1e30d58c959ea26c920cac"></a><!-- doxytag: member="CCountSession::NumResourcesL" ref="054b27fceb1e30d58c959ea26c920cac" args="(const RMessage2 &aMessage)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CCountSession::NumResourcesL </td>
<td>(</td>
<td class="paramtype">const RMessage2 & </td>
<td class="paramname"> <em>aMessage</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets the number of resources, i.e. the number of CCount objects that exist on the server side.
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00248">248</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="5c0ec9614dcc638ffd4007c981858e8a"></a><!-- doxytag: member="CCountSession::CounterFromHandle" ref="5c0ec9614dcc638ffd4007c981858e8a" args="(const RMessage2 &aMessage, TInt aHandle)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_c_count_sub_session.html">CCountSubSession</a> * CCountSession::CounterFromHandle </td>
<td>(</td>
<td class="paramtype">const RMessage2 & </td>
<td class="paramname"> <em>aMessage</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TInt </td>
<td class="paramname"> <em>aHandle</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
A simple utility function to return the appropriate <a class="el" href="class_c_count_sub_session.html">CCountSubSession</a> object given a client's subsession handle. Panics client if the handle cannot be found.
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00083">83</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="dd6e6fefce82bc969a1d09df0d0ada22"></a><!-- doxytag: member="CCountSession::DeleteCounter" ref="dd6e6fefce82bc969a1d09df0d0ada22" args="(TInt aHandle)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CCountSession::DeleteCounter </td>
<td>(</td>
<td class="paramtype">TInt </td>
<td class="paramname"> <em>aHandle</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Delete a subsession (counter) object through its handle.
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00222">222</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="d644b9c1a23a7002f774d0ceb017bfb8"></a><!-- doxytag: member="CCountSession::PanicClient" ref="d644b9c1a23a7002f774d0ceb017bfb8" args="(const RMessage2 &aMessage, TInt aPanic) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CCountSession::PanicClient </td>
<td>(</td>
<td class="paramtype">const RMessage2 & </td>
<td class="paramname"> <em>aMessage</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TInt </td>
<td class="paramname"> <em>aPanic</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Panics the client
<p>Definition at line <a class="el" href="_complex_server_c_count_session_8cpp-source.html#l00258">258</a> of file <a class="el" href="_complex_server_c_count_session_8cpp-source.html">ComplexServerCCountSession.cpp</a>.</p>
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 21 10:33:04 2010 for TB10.1 Example Applications by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>