|
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: examples/ForumNokia/Symbian_OS_End-to-End_Sockets_API_Example/SocketTaskManager_S60/inc/Response.h Source File</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 <h1>examples/ForumNokia/Symbian_OS_End-to-End_Sockets_API_Example/SocketTaskManager_S60/inc/Response.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> |
|
12 <a name="l00002"></a>00002 <span class="comment">* ============================================================================</span> |
|
13 <a name="l00003"></a>00003 <span class="comment">* Name : CResponse from Response.h</span> |
|
14 <a name="l00004"></a>00004 <span class="comment">* Part of : TaskManager</span> |
|
15 <a name="l00005"></a>00005 <span class="comment">* Created : 15/03/2006 by Forum Nokia</span> |
|
16 <a name="l00006"></a>00006 <span class="comment">* Version : 1.2</span> |
|
17 <a name="l00007"></a>00007 <span class="comment">* Copyright: Nokia Corporation</span> |
|
18 <a name="l00008"></a>00008 <span class="comment">* ============================================================================</span> |
|
19 <a name="l00009"></a>00009 <span class="comment">*/</span> |
|
20 <a name="l00010"></a>00010 |
|
21 <a name="l00011"></a>00011 <span class="preprocessor">#ifndef __CRESPONSE_H</span> |
|
22 <a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define __CRESPONSE_H</span> |
|
23 <a name="l00013"></a>00013 <span class="preprocessor"></span> |
|
24 <a name="l00014"></a>00014 <span class="comment">// INCLUDE FILES</span> |
|
25 <a name="l00015"></a>00015 <span class="preprocessor">#include "TaskManager.hrh"</span> |
|
26 <a name="l00016"></a>00016 |
|
27 <a name="l00017"></a>00017 <span class="preprocessor">#include <e32std.h></span> |
|
28 <a name="l00018"></a>00018 <span class="preprocessor">#include <badesca.h></span> <span class="comment">//CDesCArray</span> |
|
29 <a name="l00019"></a>00019 |
|
30 <a name="l00020"></a>00020 <span class="comment">// CLASS DECLARATION</span> |
|
31 <a name="l00021"></a>00021 |
|
32 <a name="l00025"></a><a class="code" href="class_c_response.html">00025</a> <span class="keyword">class </span><a class="code" href="class_c_response.html">CResponse</a> : <span class="keyword">public</span> CBase |
|
33 <a name="l00026"></a>00026 { |
|
34 <a name="l00027"></a>00027 <span class="keyword">public</span>: <span class="comment">// Constructors and destructor</span> |
|
35 <a name="l00028"></a>00028 |
|
36 <a name="l00032"></a><a class="code" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">00032</a> <span class="keyword">enum</span> <a class="code" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">TResponseState</a> |
|
37 <a name="l00033"></a>00033 { |
|
38 <a name="l00034"></a>00034 ENotComplete, |
|
39 <a name="l00035"></a>00035 EComplete, |
|
40 <a name="l00036"></a>00036 EError |
|
41 <a name="l00037"></a>00037 }; |
|
42 <a name="l00038"></a>00038 |
|
43 <a name="l00042"></a>00042 <span class="keyword">static</span> <a class="code" href="class_c_response.html">CResponse</a>* <a class="code" href="class_c_response.html#a2a6a27395f054e6912d4491f98ca3c54">NewL</a>(); |
|
44 <a name="l00043"></a>00043 |
|
45 <a name="l00047"></a>00047 <span class="keyword">static</span> <a class="code" href="class_c_response.html">CResponse</a>* <a class="code" href="class_c_response.html#a78c01ecd70d8477731923b4bc12f9628">NewLC</a>(); |
|
46 <a name="l00048"></a>00048 |
|
47 <a name="l00052"></a>00052 <a class="code" href="class_c_response.html#a6f1fbd7e819a3f55a84d3e3ea757faa7">~CResponse</a>(); |
|
48 <a name="l00053"></a>00053 |
|
49 <a name="l00057"></a><a class="code" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">00057</a> <span class="keyword">enum</span> <a class="code" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">TResponseType</a> |
|
50 <a name="l00058"></a>00058 { |
|
51 <a name="l00059"></a>00059 ELoadTasks = 0, |
|
52 <a name="l00060"></a>00060 ETaskComplete |
|
53 <a name="l00061"></a>00061 }; |
|
54 <a name="l00062"></a>00062 |
|
55 <a name="l00063"></a>00063 <span class="keyword">public</span>: <span class="comment">// New functions</span> |
|
56 <a name="l00064"></a>00064 |
|
57 <a name="l00069"></a>00069 <span class="keywordtype">void</span> <a class="code" href="class_c_response.html#a5eea58b909203d7f9e5731eb1f7a7243">ParseDataL</a>( TDesC& aData ); |
|
58 <a name="l00070"></a>00070 |
|
59 <a name="l00075"></a>00075 TBool <a class="code" href="class_c_response.html#aa2c211eba8208a0659bbecc31929a607">HasError</a>() <span class="keyword">const</span>; |
|
60 <a name="l00076"></a>00076 |
|
61 <a name="l00081"></a>00081 TBuf<KMaxError> <a class="code" href="class_c_response.html#abcd4ed6c6427bfe23a51989db29bd85e">Error</a>() <span class="keyword">const</span>; |
|
62 <a name="l00082"></a>00082 |
|
63 <a name="l00087"></a>00087 TInt <a class="code" href="class_c_response.html#a7f13737551cb7c1a5dce6b901f1892b6">TaskCount</a>() <span class="keyword">const</span>; |
|
64 <a name="l00088"></a>00088 |
|
65 <a name="l00094"></a>00094 TBuf<KMaxTaskLength> <a class="code" href="class_c_response.html#a4bd26f70c829e7f88367457b445c2ce2">TaskDescription</a>(<span class="keyword">const</span> TInt& aIndex) <span class="keyword">const</span>; |
|
66 <a name="l00095"></a>00095 |
|
67 <a name="l00100"></a>00100 TInt <a class="code" href="class_c_response.html#a95771f9a7090029b7ff675553432adcf">TaskId</a>(<span class="keyword">const</span> TInt& aIndex) <span class="keyword">const</span>; |
|
68 <a name="l00101"></a>00101 |
|
69 <a name="l00106"></a>00106 <a class="code" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">TResponseType</a> <a class="code" href="class_c_response.html#a886806fe15bd7b490be051f258aa1c6b">ResponseType</a>() <span class="keyword">const</span>; |
|
70 <a name="l00107"></a>00107 |
|
71 <a name="l00112"></a>00112 <span class="keywordtype">void</span> <a class="code" href="class_c_response.html#abbd142a6b537780d136cb9b12e3d6572">InputDataL</a>( <span class="keyword">const</span> TDesC8& aData ); |
|
72 <a name="l00113"></a>00113 |
|
73 <a name="l00120"></a>00120 <a class="code" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">TResponseState</a> <a class="code" href="class_c_response.html#a118506616c44d373a0a924f6fd4dea0b">GetState</a>() <span class="keyword">const</span>; |
|
74 <a name="l00121"></a>00121 |
|
75 <a name="l00122"></a>00122 <span class="keyword">private</span>: |
|
76 <a name="l00123"></a>00123 |
|
77 <a name="l00128"></a>00128 <span class="keywordtype">void</span> DoCheck(); |
|
78 <a name="l00129"></a>00129 |
|
79 <a name="l00133"></a>00133 <a class="code" href="class_c_response.html">CResponse</a>(); |
|
80 <a name="l00134"></a>00134 <span class="keywordtype">void</span> ConstructL(); |
|
81 <a name="l00135"></a>00135 |
|
82 <a name="l00139"></a>00139 <span class="keyword">enum</span> TTaskReadStatus |
|
83 <a name="l00140"></a>00140 { |
|
84 <a name="l00141"></a>00141 EStart = 0, |
|
85 <a name="l00142"></a>00142 EReadId, |
|
86 <a name="l00143"></a>00143 EReadTask |
|
87 <a name="l00144"></a>00144 }; |
|
88 <a name="l00145"></a>00145 |
|
89 <a name="l00146"></a>00146 <span class="keyword">private</span>: <span class="comment">// Data members</span> |
|
90 <a name="l00147"></a>00147 |
|
91 <a name="l00148"></a>00148 <span class="comment">// Error informers</span> |
|
92 <a name="l00149"></a>00149 TBuf<KMaxError> iError; |
|
93 <a name="l00150"></a>00150 |
|
94 <a name="l00151"></a>00151 CDesCArray* iDescriptions; |
|
95 <a name="l00152"></a>00152 RArray<TInt> iIds; |
|
96 <a name="l00153"></a>00153 <a class="code" href="class_c_response.html#a66d7d28d83f038b1f1fbd4421376bbfd">TResponseType</a> iResponseType; |
|
97 <a name="l00154"></a>00154 |
|
98 <a name="l00155"></a>00155 <span class="comment">// Resizable descriptor for storing the message</span> |
|
99 <a name="l00156"></a>00156 HBufC* iMessageBuffer; |
|
100 <a name="l00157"></a>00157 |
|
101 <a name="l00158"></a>00158 TInt iExpectedPackageSize; |
|
102 <a name="l00159"></a>00159 <a class="code" href="class_c_response.html#a797ea6210eadf0408870a77f242b333d">TResponseState</a> iState; |
|
103 <a name="l00160"></a>00160 }; |
|
104 <a name="l00161"></a>00161 |
|
105 <a name="l00162"></a>00162 <span class="preprocessor">#endif</span> |
|
106 <a name="l00163"></a>00163 <span class="preprocessor"></span> |
|
107 <a name="l00164"></a>00164 <span class="comment">// End of file</span> |
|
108 <a name="l00165"></a>00165 |
|
109 <a name="l00166"></a>00166 |
|
110 </pre></div></div> |
|
111 <hr size="1"/><address style="text-align: right;"><small>Generated by |
|
112 <a href="http://www.doxygen.org/index.html"> |
|
113 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> |
|
114 </body> |
|
115 </html> |