|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
2 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 <head> |
|
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
|
5 <title>TB9.2 Example Applications: CResponse Class Reference</title> |
|
6 <link href="tabs.css" rel="stylesheet" type="text/css"/> |
|
7 <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
|
8 </head> |
|
9 <body> |
|
10 <!-- Generated by Doxygen 1.6.2 --> |
|
11 <div class="contents"> |
|
12 <h1>CResponse Class Reference</h1><!-- doxytag: class="CResponse" --> |
|
13 <p><a href="class_c_response-members.html">List of all members.</a></p> |
|
14 <table border="0" cellpadding="0" cellspacing="0"> |
|
15 <tr><td colspan="2"><h2>Public Types</h2></td></tr> |
|
16 <tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">TResponseState</a> { <b>ENotComplete</b>, |
|
17 <b>EComplete</b>, |
|
18 <b>EError</b> |
|
19 }</td></tr> |
|
20 <tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">TResponseType</a> { <b>ELoadTasks</b> = 0, |
|
21 <b>ETaskComplete</b> |
|
22 }</td></tr> |
|
23 <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> |
|
24 <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a6f1fbd7e819a3f55a84d3e3ea757faa7">~CResponse</a> ()</td></tr> |
|
25 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a5eea58b909203d7f9e5731eb1f7a7243">ParseDataL</a> (TDesC &aData)</td></tr> |
|
26 <tr><td class="memItemLeft" align="right" valign="top">TBool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#aa2c211eba8208a0659bbecc31929a607">HasError</a> () const </td></tr> |
|
27 <tr><td class="memItemLeft" align="right" valign="top">TBuf< KMaxError > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#abcd4ed6c6427bfe23a51989db29bd85e">Error</a> () const </td></tr> |
|
28 <tr><td class="memItemLeft" align="right" valign="top">TInt </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a7f13737551cb7c1a5dce6b901f1892b6">TaskCount</a> () const </td></tr> |
|
29 <tr><td class="memItemLeft" align="right" valign="top">TBuf< KMaxTaskLength > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a4bd26f70c829e7f88367457b445c2ce2">TaskDescription</a> (const TInt &aIndex) const </td></tr> |
|
30 <tr><td class="memItemLeft" align="right" valign="top">TInt </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a95771f9a7090029b7ff675553432adcf">TaskId</a> (const TInt &aIndex) const </td></tr> |
|
31 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">TResponseType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a886806fe15bd7b490be051f258aa1c6b">ResponseType</a> () const </td></tr> |
|
32 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#abbd142a6b537780d136cb9b12e3d6572">InputDataL</a> (const TDesC8 &aData)</td></tr> |
|
33 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">TResponseState</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a118506616c44d373a0a924f6fd4dea0b">GetState</a> () const </td></tr> |
|
34 <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> |
|
35 <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_c_response.html">CResponse</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a2a6a27395f054e6912d4491f98ca3c54">NewL</a> ()</td></tr> |
|
36 <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_c_response.html">CResponse</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_response.html#a78c01ecd70d8477731923b4bc12f9628">NewLC</a> ()</td></tr> |
|
37 </table> |
|
38 <hr/><a name="_details"></a><h2>Detailed Description</h2> |
|
39 <p>A wrapper class for handling responses from the server. </p> |
|
40 |
|
41 <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> |
|
42 <hr/><h2>Member Enumeration Documentation</h2> |
|
43 <a class="anchor" id="a797ea6210eadf0408870a77f242b333d"></a><!-- doxytag: member="CResponse::TResponseState" ref="a797ea6210eadf0408870a77f242b333d" args="" --> |
|
44 <div class="memitem"> |
|
45 <div class="memproto"> |
|
46 <table class="memname"> |
|
47 <tr> |
|
48 <td class="memname">enum <a class="el" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">CResponse::TResponseState</a></td> |
|
49 </tr> |
|
50 </table> |
|
51 </div> |
|
52 <div class="memdoc"> |
|
53 <p>Enum for following the class' state. </p> |
|
54 |
|
55 <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> |
|
56 |
|
57 </div> |
|
58 </div> |
|
59 <a class="anchor" id="a66d7d28d83f038b1f1fbd4421376bbfd"></a><!-- doxytag: member="CResponse::TResponseType" ref="a66d7d28d83f038b1f1fbd4421376bbfd" args="" --> |
|
60 <div class="memitem"> |
|
61 <div class="memproto"> |
|
62 <table class="memname"> |
|
63 <tr> |
|
64 <td class="memname">enum <a class="el" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">CResponse::TResponseType</a></td> |
|
65 </tr> |
|
66 </table> |
|
67 </div> |
|
68 <div class="memdoc"> |
|
69 <p>Determines what type of response is in question. </p> |
|
70 |
|
71 <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> |
|
72 |
|
73 </div> |
|
74 </div> |
|
75 <hr/><h2>Constructor & Destructor Documentation</h2> |
|
76 <a class="anchor" id="a6f1fbd7e819a3f55a84d3e3ea757faa7"></a><!-- doxytag: member="CResponse::~CResponse" ref="a6f1fbd7e819a3f55a84d3e3ea757faa7" args="()" --> |
|
77 <div class="memitem"> |
|
78 <div class="memproto"> |
|
79 <table class="memname"> |
|
80 <tr> |
|
81 <td class="memname">CResponse::~CResponse </td> |
|
82 <td>(</td> |
|
83 <td class="paramname"></td> |
|
84 <td> ) </td> |
|
85 <td></td> |
|
86 </tr> |
|
87 </table> |
|
88 </div> |
|
89 <div class="memdoc"> |
|
90 <p>Destructor </p> |
|
91 |
|
92 <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> |
|
93 |
|
94 </div> |
|
95 </div> |
|
96 <hr/><h2>Member Function Documentation</h2> |
|
97 <a class="anchor" id="a2a6a27395f054e6912d4491f98ca3c54"></a><!-- doxytag: member="CResponse::NewL" ref="a2a6a27395f054e6912d4491f98ca3c54" args="()" --> |
|
98 <div class="memitem"> |
|
99 <div class="memproto"> |
|
100 <table class="memname"> |
|
101 <tr> |
|
102 <td class="memname"><a class="el" href="class_c_response.html">CResponse</a> * CResponse::NewL </td> |
|
103 <td>(</td> |
|
104 <td class="paramname"></td> |
|
105 <td> ) </td> |
|
106 <td><code> [static]</code></td> |
|
107 </tr> |
|
108 </table> |
|
109 </div> |
|
110 <div class="memdoc"> |
|
111 <p>Two-phased constructor. </p> |
|
112 |
|
113 <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> |
|
114 |
|
115 </div> |
|
116 </div> |
|
117 <a class="anchor" id="a78c01ecd70d8477731923b4bc12f9628"></a><!-- doxytag: member="CResponse::NewLC" ref="a78c01ecd70d8477731923b4bc12f9628" args="()" --> |
|
118 <div class="memitem"> |
|
119 <div class="memproto"> |
|
120 <table class="memname"> |
|
121 <tr> |
|
122 <td class="memname"><a class="el" href="class_c_response.html">CResponse</a> * CResponse::NewLC </td> |
|
123 <td>(</td> |
|
124 <td class="paramname"></td> |
|
125 <td> ) </td> |
|
126 <td><code> [static]</code></td> |
|
127 </tr> |
|
128 </table> |
|
129 </div> |
|
130 <div class="memdoc"> |
|
131 <p>Two-phased constructor. </p> |
|
132 |
|
133 <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> |
|
134 |
|
135 </div> |
|
136 </div> |
|
137 <a class="anchor" id="a5eea58b909203d7f9e5731eb1f7a7243"></a><!-- doxytag: member="CResponse::ParseDataL" ref="a5eea58b909203d7f9e5731eb1f7a7243" args="(TDesC &aData)" --> |
|
138 <div class="memitem"> |
|
139 <div class="memproto"> |
|
140 <table class="memname"> |
|
141 <tr> |
|
142 <td class="memname">void CResponse::ParseDataL </td> |
|
143 <td>(</td> |
|
144 <td class="paramtype">TDesC & </td> |
|
145 <td class="paramname"> <em>aData</em></td> |
|
146 <td> ) </td> |
|
147 <td></td> |
|
148 </tr> |
|
149 </table> |
|
150 </div> |
|
151 <div class="memdoc"> |
|
152 <p>Constructs this response object from the data received from the server. </p> |
|
153 <dl><dt><b>Parameters:</b></dt><dd> |
|
154 <table border="0" cellspacing="2" cellpadding="0"> |
|
155 <tr><td valign="top"></td><td valign="top"><em>aData</em> </td><td>the data that was received from the server </td></tr> |
|
156 </table> |
|
157 </dd> |
|
158 </dl> |
|
159 |
|
160 <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> |
|
161 |
|
162 </div> |
|
163 </div> |
|
164 <a class="anchor" id="aa2c211eba8208a0659bbecc31929a607"></a><!-- doxytag: member="CResponse::HasError" ref="aa2c211eba8208a0659bbecc31929a607" args="() const " --> |
|
165 <div class="memitem"> |
|
166 <div class="memproto"> |
|
167 <table class="memname"> |
|
168 <tr> |
|
169 <td class="memname">TBool CResponse::HasError </td> |
|
170 <td>(</td> |
|
171 <td class="paramname"></td> |
|
172 <td> ) </td> |
|
173 <td> const</td> |
|
174 </tr> |
|
175 </table> |
|
176 </div> |
|
177 <div class="memdoc"> |
|
178 <p>Returns whether errors occurred in the server side. </p> |
|
179 <dl class="return"><dt><b>Returns:</b></dt><dd>ETrue if response consist errors, EFalse if not. </dd></dl> |
|
180 |
|
181 <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> |
|
182 |
|
183 </div> |
|
184 </div> |
|
185 <a class="anchor" id="abcd4ed6c6427bfe23a51989db29bd85e"></a><!-- doxytag: member="CResponse::Error" ref="abcd4ed6c6427bfe23a51989db29bd85e" args="() const " --> |
|
186 <div class="memitem"> |
|
187 <div class="memproto"> |
|
188 <table class="memname"> |
|
189 <tr> |
|
190 <td class="memname">TBuf< KMaxError > CResponse::Error </td> |
|
191 <td>(</td> |
|
192 <td class="paramname"></td> |
|
193 <td> ) </td> |
|
194 <td> const</td> |
|
195 </tr> |
|
196 </table> |
|
197 </div> |
|
198 <div class="memdoc"> |
|
199 <p>Returns the error description. </p> |
|
200 <dl class="return"><dt><b>Returns:</b></dt><dd>the error description. </dd></dl> |
|
201 |
|
202 <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> |
|
203 |
|
204 </div> |
|
205 </div> |
|
206 <a class="anchor" id="a7f13737551cb7c1a5dce6b901f1892b6"></a><!-- doxytag: member="CResponse::TaskCount" ref="a7f13737551cb7c1a5dce6b901f1892b6" args="() const " --> |
|
207 <div class="memitem"> |
|
208 <div class="memproto"> |
|
209 <table class="memname"> |
|
210 <tr> |
|
211 <td class="memname">TInt CResponse::TaskCount </td> |
|
212 <td>(</td> |
|
213 <td class="paramname"></td> |
|
214 <td> ) </td> |
|
215 <td> const</td> |
|
216 </tr> |
|
217 </table> |
|
218 </div> |
|
219 <div class="memdoc"> |
|
220 <p>Returns the number of tasks received from the server. </p> |
|
221 <dl class="return"><dt><b>Returns:</b></dt><dd>the number of tasks received from the server. </dd></dl> |
|
222 |
|
223 <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> |
|
224 |
|
225 </div> |
|
226 </div> |
|
227 <a class="anchor" id="a4bd26f70c829e7f88367457b445c2ce2"></a><!-- doxytag: member="CResponse::TaskDescription" ref="a4bd26f70c829e7f88367457b445c2ce2" args="(const TInt &aIndex) const " --> |
|
228 <div class="memitem"> |
|
229 <div class="memproto"> |
|
230 <table class="memname"> |
|
231 <tr> |
|
232 <td class="memname">TBuf< KMaxTaskLength > CResponse::TaskDescription </td> |
|
233 <td>(</td> |
|
234 <td class="paramtype">const TInt & </td> |
|
235 <td class="paramname"> <em>aIndex</em></td> |
|
236 <td> ) </td> |
|
237 <td> const</td> |
|
238 </tr> |
|
239 </table> |
|
240 </div> |
|
241 <div class="memdoc"> |
|
242 <p>Returns the task description. </p> |
|
243 <dl><dt><b>Parameters:</b></dt><dd> |
|
244 <table border="0" cellspacing="2" cellpadding="0"> |
|
245 <tr><td valign="top"></td><td valign="top"><em>aIndex</em> </td><td>the index of the description. </td></tr> |
|
246 </table> |
|
247 </dd> |
|
248 </dl> |
|
249 <dl class="return"><dt><b>Returns:</b></dt><dd>the task description. </dd></dl> |
|
250 |
|
251 <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> |
|
252 |
|
253 </div> |
|
254 </div> |
|
255 <a class="anchor" id="a95771f9a7090029b7ff675553432adcf"></a><!-- doxytag: member="CResponse::TaskId" ref="a95771f9a7090029b7ff675553432adcf" args="(const TInt &aIndex) const " --> |
|
256 <div class="memitem"> |
|
257 <div class="memproto"> |
|
258 <table class="memname"> |
|
259 <tr> |
|
260 <td class="memname">TInt CResponse::TaskId </td> |
|
261 <td>(</td> |
|
262 <td class="paramtype">const TInt & </td> |
|
263 <td class="paramname"> <em>aIndex</em></td> |
|
264 <td> ) </td> |
|
265 <td> const</td> |
|
266 </tr> |
|
267 </table> |
|
268 </div> |
|
269 <div class="memdoc"> |
|
270 <p>Returns the task id. </p> |
|
271 <dl class="return"><dt><b>Returns:</b></dt><dd>the task id. </dd></dl> |
|
272 |
|
273 <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> |
|
274 |
|
275 </div> |
|
276 </div> |
|
277 <a class="anchor" id="a886806fe15bd7b490be051f258aa1c6b"></a><!-- doxytag: member="CResponse::ResponseType" ref="a886806fe15bd7b490be051f258aa1c6b" args="() const " --> |
|
278 <div class="memitem"> |
|
279 <div class="memproto"> |
|
280 <table class="memname"> |
|
281 <tr> |
|
282 <td class="memname"><a class="el" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">CResponse::TResponseType</a> CResponse::ResponseType </td> |
|
283 <td>(</td> |
|
284 <td class="paramname"></td> |
|
285 <td> ) </td> |
|
286 <td> const</td> |
|
287 </tr> |
|
288 </table> |
|
289 </div> |
|
290 <div class="memdoc"> |
|
291 <p>Returns the type of this response. </p> |
|
292 <dl class="return"><dt><b>Returns:</b></dt><dd>the type of this response. </dd></dl> |
|
293 |
|
294 <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> |
|
295 |
|
296 </div> |
|
297 </div> |
|
298 <a class="anchor" id="abbd142a6b537780d136cb9b12e3d6572"></a><!-- doxytag: member="CResponse::InputDataL" ref="abbd142a6b537780d136cb9b12e3d6572" args="(const TDesC8 &aData)" --> |
|
299 <div class="memitem"> |
|
300 <div class="memproto"> |
|
301 <table class="memname"> |
|
302 <tr> |
|
303 <td class="memname">void CResponse::InputDataL </td> |
|
304 <td>(</td> |
|
305 <td class="paramtype">const TDesC8 & </td> |
|
306 <td class="paramname"> <em>aData</em></td> |
|
307 <td> ) </td> |
|
308 <td></td> |
|
309 </tr> |
|
310 </table> |
|
311 </div> |
|
312 <div class="memdoc"> |
|
313 <p>Takes in a part of the server message. </p> |
|
314 <dl><dt><b>Parameters:</b></dt><dd> |
|
315 <table border="0" cellspacing="2" cellpadding="0"> |
|
316 <tr><td valign="top"></td><td valign="top"><em>aData</em> </td><td>part of the message </td></tr> |
|
317 </table> |
|
318 </dd> |
|
319 </dl> |
|
320 |
|
321 <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> |
|
322 |
|
323 </div> |
|
324 </div> |
|
325 <a class="anchor" id="a118506616c44d373a0a924f6fd4dea0b"></a><!-- doxytag: member="CResponse::GetState" ref="a118506616c44d373a0a924f6fd4dea0b" args="() const " --> |
|
326 <div class="memitem"> |
|
327 <div class="memproto"> |
|
328 <table class="memname"> |
|
329 <tr> |
|
330 <td class="memname"><a class="el" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">CResponse::TResponseState</a> CResponse::GetState </td> |
|
331 <td>(</td> |
|
332 <td class="paramname"></td> |
|
333 <td> ) </td> |
|
334 <td> const</td> |
|
335 </tr> |
|
336 </table> |
|
337 </div> |
|
338 <div class="memdoc"> |
|
339 <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> |
|
340 <dl class="return"><dt><b>Returns:</b></dt><dd>ETrue if message is complete, EFalse if not. </dd></dl> |
|
341 |
|
342 <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> |
|
343 |
|
344 </div> |
|
345 </div> |
|
346 </div> |
|
347 <hr size="1"/><address style="text-align: right;"><small>Generated by |
|
348 <a href="http://www.doxygen.org/index.html"> |
|
349 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> |
|
350 </body> |
|
351 </html> |