⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _web_client_engine_8h-source.html

📁 symbian 利用http上传的例子.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a name="l00125"></a>00125 <span class="comment">        */</span><a name="l00126"></a>00126         <span class="keywordtype">void</span> <a class="code" href="class_c_web_client_engine.html#5b3730609dcbc8696c0ff37e711e965d">CancelTransactionL</a>();<a name="l00127"></a>00127 <span class="comment"></span><a name="l00128"></a>00128 <span class="comment">        /**</span><a name="l00129"></a>00129 <span class="comment">        * IsRunning()</span><a name="l00130"></a>00130 <span class="comment">        * Checks if the transaction is running.</span><a name="l00131"></a>00131 <span class="comment">        * @return ETrue, if transaction is currently running.</span><a name="l00132"></a>00132 <span class="comment">        */</span><a name="l00133"></a><a class="code" href="class_c_web_client_engine.html#3f9569fee2d8d73da06a0025fcd80c8d">00133</a>         <span class="keyword">inline</span> TBool <a class="code" href="class_c_web_client_engine.html#3f9569fee2d8d73da06a0025fcd80c8d">IsRunning</a>() { <span class="keywordflow">return</span> <a class="code" href="class_c_web_client_engine.html#d19da1539625146ffaa8979ee6ced8c3">iRunning</a>; };<a name="l00134"></a>00134 <span class="comment"></span><a name="l00135"></a>00135 <span class="comment">        /**</span><a name="l00136"></a>00136 <span class="comment">        * SetCallBack()</span><a name="l00137"></a>00137 <span class="comment">        * Sets the callback address.</span><a name="l00138"></a>00138 <span class="comment">        * @param aCallBack: A pointer to calling instance.</span><a name="l00139"></a>00139 <span class="comment">        */</span><a name="l00140"></a>00140         <span class="keywordtype">void</span> <a class="code" href="class_c_web_client_engine.html#d7945af2beb1efffbb94f6007b666d46">SetCallBack</a>( <a class="code" href="class_c_web_client_app_ui.html">CWebClientAppUi</a>* aCallBack );<a name="l00141"></a>00141 <a name="l00142"></a>00142     <span class="keyword">private</span>:<span class="comment"></span><a name="l00143"></a>00143 <span class="comment">        /**</span><a name="l00144"></a>00144 <span class="comment">        * ConstructL()</span><a name="l00145"></a>00145 <span class="comment">        * Perform the second phase construction of a CWebClientEngine object.</span><a name="l00146"></a>00146 <span class="comment">        */</span><a name="l00147"></a>00147         <span class="keywordtype">void</span> <a class="code" href="class_c_web_client_engine.html#9ce34ba0b947863222da3c63d0481044">ConstructL</a>();<a name="l00148"></a>00148 <span class="comment"></span><a name="l00149"></a>00149 <span class="comment">        /**</span><a name="l00150"></a>00150 <span class="comment">        * CWebClientEngine()</span><a name="l00151"></a>00151 <span class="comment">        * Perform the first phase of two phase construction.</span><a name="l00152"></a>00152 <span class="comment">        * @param iObserver: </span><a name="l00153"></a>00153 <span class="comment">        */</span><a name="l00154"></a>00154         <a class="code" href="class_c_web_client_engine.html#32fe2a86e82c042cd514e8f576077b8c">CWebClientEngine</a>( <a class="code" href="class_m_web_client_observer.html">MWebClientObserver</a>&amp; <a class="code" href="class_c_web_client_engine.html#5598d19cc10719afd28055422087a200">iObserver</a> );<a name="l00155"></a>00155 <span class="comment"></span><a name="l00156"></a>00156 <span class="comment">        /**</span><a name="l00157"></a>00157 <span class="comment">        * SetHeaderL()</span><a name="l00158"></a>00158 <span class="comment">        * Sets header value of an HTTP request.</span><a name="l00159"></a>00159 <span class="comment">        * @param aHeaders:  Headers of the HTTP request</span><a name="l00160"></a>00160 <span class="comment">        * @param aHdrField: Enumerated HTTP header field, e.g. HTTP::EUserAgent</span><a name="l00161"></a>00161 <span class="comment">        * @param aHdrValue: New value for header field</span><a name="l00162"></a>00162 <span class="comment">        */</span><a name="l00163"></a>00163         <span class="keywordtype">void</span> <a class="code" href="class_c_web_client_engine.html#c5970d86bcc6ac5be0ff1c5d5daaea7b">SetHeaderL</a>( RHTTPHeaders aHeaders, TInt aHdrField, <a name="l00164"></a>00164                          <span class="keyword">const</span> TDesC8&amp; aHdrValue );<a name="l00165"></a>00165 <span class="comment"></span><a name="l00166"></a>00166 <span class="comment">        /**</span><a name="l00167"></a>00167 <span class="comment">        * DumpRespHeadersL()</span><a name="l00168"></a>00168 <span class="comment">        * Called when HTTP header is received.</span><a name="l00169"></a>00169 <span class="comment">        * Displays HTTP header field names and values</span><a name="l00170"></a>00170 <span class="comment">        * @param aTransaction: The transaction that is processed.</span><a name="l00171"></a>00171 <span class="comment">        */</span><a name="l00172"></a>00172         <span class="keywordtype">void</span> <a class="code" href="class_c_web_client_engine.html#f0720cc791fe8b50eff81b4af13e9f89">DumpRespHeadersL</a>( RHTTPTransaction&amp; aTransantion );<a name="l00173"></a>00173 <span class="comment"></span><a name="l00174"></a>00174 <span class="comment">        /**</span><a name="l00175"></a>00175 <span class="comment">        * HandleRunErrorL()</span><a name="l00176"></a>00176 <span class="comment">        * Called from MHFRunError() when *leave* occurs in handling of transaction event. </span><a name="l00177"></a>00177 <span class="comment">        * @param aError:       The leave code that occured.</span><a name="l00178"></a>00178 <span class="comment">        */</span><a name="l00179"></a>00179         <span class="keywordtype">void</span> <a class="code" href="class_c_web_client_engine.html#2f2fdeb2077849ca331b415db028feba">HandleRunErrorL</a>( TInt aError );<a name="l00180"></a>00180 <span class="comment"></span><a name="l00181"></a>00181 <span class="comment">    /**</span><a name="l00182"></a>00182 <span class="comment">    * From MHTTPSessionEventCallback</span><a name="l00183"></a>00183 <span class="comment">    */</span><a name="l00184"></a>00184     <span class="keyword">private</span>:<span class="comment"></span><a name="l00185"></a>00185 <span class="comment">        /**</span><a name="l00186"></a>00186 <span class="comment">        * MHFRunL()</span><a name="l00187"></a>00187 <span class="comment">        * Called by framework to notify about transaction events.</span><a name="l00188"></a>00188 <span class="comment">        * @param aTransaction: Transaction, where the event occured.</span><a name="l00189"></a>00189 <span class="comment">        * @param aEvent:       Occured event.</span><a name="l00190"></a>00190 <span class="comment">        */</span><a name="l00191"></a>00191         <span class="keywordtype">void</span> <a class="code" href="class_c_web_client_engine.html#5c546ad730e52f05cc98ad0dc9ed7461">MHFRunL</a>( RHTTPTransaction aTransaction, <span class="keyword">const</span> THTTPEvent&amp; aEvent );<a name="l00192"></a>00192 <span class="comment"></span><a name="l00193"></a>00193 <span class="comment">        /**</span><a name="l00194"></a>00194 <span class="comment">        * MHFRunError()</span><a name="l00195"></a>00195 <span class="comment">        * Called by framework when *leave* occurs in handling of transaction event. </span><a name="l00196"></a>00196 <span class="comment">        * @param aError:       The leave code that occured.</span><a name="l00197"></a>00197 <span class="comment">        * @param aTransaction: The transaction that was being processed when leave occured.</span><a name="l00198"></a>00198 <span class="comment">        * @param aEvent:       The event that was being processed when leave occured.</span><a name="l00199"></a>00199 <span class="comment">        * @return KErrNone,    if the error was handled. Otherwise the value of aError, or</span><a name="l00200"></a>00200 <span class="comment">        *                      some other error value. Returning error value causes causes </span><a name="l00201"></a>00201 <span class="comment">        *                      HTTP-CORE 6 panic.</span><a name="l00202"></a>00202 <span class="comment">        */</span><a name="l00203"></a>00203         TInt <a class="code" href="class_c_web_client_engine.html#4f19969440d49e831aaec230508b0a3c">MHFRunError</a>( TInt aError, <a name="l00204"></a>00204                           RHTTPTransaction aTransaction, <a name="l00205"></a>00205                           <span class="keyword">const</span> THTTPEvent&amp; aEvent );<a name="l00206"></a>00206 <span class="comment"></span><a name="l00207"></a>00207 <span class="comment">    /**</span><a name="l00208"></a>00208 <span class="comment">    * From MHTTPAuthenticationCallback (needed for HTTP authentication)</span><a name="l00209"></a>00209 <span class="comment">    */</span><a name="l00210"></a>00210     <span class="keyword">private</span>:<span class="comment"></span><a name="l00211"></a>00211 <span class="comment">        /**</span><a name="l00212"></a>00212 <span class="comment">        * GetCredentialsL()</span><a name="l00213"></a>00213 <span class="comment">        * Called by framework when username and password for requested URI is </span><a name="l00214"></a>00214 <span class="comment">        * needed.</span><a name="l00215"></a>00215 <span class="comment">        * @param aURI: The URI being requested (e.g. "http://host.org")</span><a name="l00216"></a>00216 <span class="comment">        * @param aRealm: The realm being requested (e.g. "user@host.org")</span><a name="l00217"></a>00217 <span class="comment">        * @param aAuthenticationType: Authentication type. (e.g. "Basic")</span><a name="l00218"></a>00218 <span class="comment">        * @param aUsername: Given user name.</span><a name="l00219"></a>00219 <span class="comment">        * @param aPassword: Given password.</span><a name="l00220"></a>00220 <span class="comment">        * @return A pointer to the created document</span><a name="l00221"></a>00221 <span class="comment">        */</span><a name="l00222"></a>00222         TBool <a class="code" href="class_c_web_client_engine.html#ffb00f6bfbe7b1f8512c8f8a948bc765">GetCredentialsL</a>(  <span class="keyword">const</span> TUriC8&amp; aUri, <a name="l00223"></a>00223                                 RString aRealm, <a name="l00224"></a>00224                                 RStringF aAuthenticationType, <a name="l00225"></a>00225                                 RString&amp; aUsername, <a name="l00226"></a>00226                                 RString&amp; aPassword );<a name="l00227"></a>00227 <a name="l00228"></a>00228     <span class="keyword">private</span>: <span class="comment">// Data</span><a name="l00229"></a><a class="code" href="class_c_web_client_engine.html#d8033daa9b951c54149345b6871648bb">00229</a>         RHTTPSession            <a class="code" href="class_c_web_client_engine.html#d8033daa9b951c54149345b6871648bb">iSession</a>;<a name="l00230"></a><a class="code" href="class_c_web_client_engine.html#7deee05e1ccb79197ceb34881cf60159">00230</a>         RHTTPTransaction        <a class="code" href="class_c_web_client_engine.html#7deee05e1ccb79197ceb34881cf60159">iTransaction</a>;<a name="l00231"></a><a class="code" href="class_c_web_client_engine.html#5598d19cc10719afd28055422087a200">00231</a>         <a class="code" href="class_m_web_client_observer.html">MWebClientObserver</a>&amp;     <a class="code" href="class_c_web_client_engine.html#5598d19cc10719afd28055422087a200">iObserver</a>;      <span class="comment">// Used for passing body data and</span><a name="l00232"></a>00232                                                 <span class="comment">// events to UI.</span><a name="l00233"></a><a class="code" href="class_c_web_client_engine.html#d19da1539625146ffaa8979ee6ced8c3">00233</a>         TBool                   <a class="code" href="class_c_web_client_engine.html#d19da1539625146ffaa8979ee6ced8c3">iRunning</a>;       <span class="comment">// ETrue, if transaction running</span><a name="l00234"></a><a class="code" href="class_c_web_client_engine.html#6da7cfd219226594e04b0bf1b29cd50d">00234</a>         <a class="code" href="class_c_web_client_app_ui.html">CWebClientAppUi</a>*        <a class="code" href="class_c_web_client_engine.html#6da7cfd219226594e04b0bf1b29cd50d">iApplicationUi</a>; <span class="comment">// Pointer to AppUi instance</span><a name="l00235"></a>00235     };<a name="l00236"></a>00236 <a name="l00237"></a>00237 <span class="preprocessor">#endif // WEBCLIENTENGINE_H</span></pre></div><hr><table x-use-null-cells		style="x-cell-content-align: top;				width: 100%;				border-spacing: 0px;				border-spacing: 0px;"		cellspacing=0		width=100%>  <col style="width: 50%;">  <col style="width: 50%;">  <tr style="x-cell-content-align: top;"	valign=top>  <td style="width: 50%;			padding-right: 10px;			padding-left: 10px;			border-right-style: None;			border-left-style: None;			border-top-style: None;			border-bottom-style: None;"	width=50%>  <p style="font-family: Arial;"><small style="font-size: smaller;">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -