📄 index.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>WebClient Example</title><link href="style.css" rel="stylesheet" type="text/css"></head><table border="0" width="100%" height="8" bgcolor="#eeeeee"><tr> <td width="100%" height="1"><b><font size="2" color="#000000" face="Arial, Helvetica, sans-serif"><strong><a name=Top></a>S60 3rd Edition SDK FP1 for Symbian OS </strong></font></b><br><i>Example Applications Guide</i></td></tr> </table><!-- Generated by Doxygen 1.4.5 --><div class="tabs"> <ul> <li id="current"><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul></div><h1>WebClient Example</h1><p><a class="el" href="index.html#intro_sec">1. About this Example</a> <br><a class="el" href="index.html#Pre_sec">2. Prerequisites</a> <br><a class="el" href="index.html#Design_sec">3. Design and Implementation</a><p><hr><h2><a class="anchor" name="intro_sec">1. About this Example</a></h2>This example application describes how to retrive files from internet over HTTP.<p><hr><h2><a class="anchor" name="Pre_sec">2. Prerequisites</a></h2>This example exists as a complete application, and has the standard Symbian OS application architecture. The example makes use of several other Symbian OS and Internet concepts which the reader should be aware of before attempting to understand this example. These are:<p><ul><li>Familiarity with HTTP protocol</li><li>Familiarity with Emulator's TCP/IP connectivity</li></ul><p><hr><h2><a class="anchor" name="Design_sec">3. Design and Implementation</a></h2><h3><a class="anchor" name="Sub31">3.1 Capabilities</a></h3>The program capabilities are defined in Webclient.mmp file: CAPABILITY NetworkServices.<h3><a class="anchor" name="Sub32">3.2 ScalableUI</a></h3>The program takes screen parameters in the start of the application and works with all screen modes. The program supports changing the screen layout while the program is running.<h3><a class="anchor" name="Sub33">3.3 Building the example application</a></h3>This example can be built in directory Webclient\group by running the following commands:<br><p>bldmake bldfiles<br> abld build winscw udeb<br><p>In addition it is possible to create project for CodeWarrior IDE by running the following command:<br><p>abld makefile cw_ide<h3><a class="anchor" name="Sub34">3.4 Design</a></h3><h4><a class="anchor" name="SubSub341">3.4.1 Overview of the WebClient application</a></h4>The main view consists of three parts. The uppermost part of the screen contains all received HTTP header fields and their values. The middle part contains the received raw data (e.g., HTML page, no parsing or formatting is provided), and the last part contains the status messages of the HTTP transaction, such as errors.<h4><a class="anchor" name="SubSub342">3.4.2 Option menu</a></h4>The Options menu commands are handled in <a class="el" href="class_c_web_client_app_ui.html#a682d228622cea7790645ce10f591242">CWebClientAppUi::HandleCommandL()</a>. Request URL opens URL query dialog. When desired URL is entered, application inserts "http://" to URL, if it does not contain http or https prefix. <a class="el" href="class_c_web_client_engine.html#b0657f50d2303b5a4f15a7c3b15cbbdc">CWebClientEngine::IssueHTTPGetL()</a> method is called to start the HTTP client session.<p>With HTTP Header, HTTP Source and Transaction Status options focus can be changed between application windows. Options menu command are handled in <a class="el" href="class_c_web_client_container.html#a682d228622cea7790645ce10f591242">CWebClientContainer::HandleCommandL()</a>.<h4><a class="anchor" name="Sub343">3.4.3 Main view</a></h4>The main view is implemented in class <a class="el" href="class_c_web_client_container.html">CWebClientContainer</a>. CEikLabel is used for URL name and three CEikRichTextEditor windows for information from returned web page. The application supports changing the screen layout while the program is running. Function HandleResourceChangeL() in class <a class="el" href="class_c_web_client_app_ui.html">CWebClientAppUi</a> is called when the resolution is changed.<h4><a class="anchor" name="Sub344">3.4.4 HTTP client session</a></h4>Class <a class="el" href="class_c_web_client_engine.html">CWebClientEngine</a> contains the implementation of HTTP Client API usage. <a class="el" href="class_c_web_client_engine.html">CWebClientEngine</a> contains also implementation of basic authentication with authentication filters provided by the API. User name/password dialog is shown when authentication is required to enter a URL. <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 + -