S60 3rd Edition SDK for Symbian OS Example Applications Guide |
WebClient Example
1. About this Example
2. Prerequisites
3. Design and Implementation
4. Class Hierarchy
This example application describes how to retrive files from internet over HTTP.
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:
- Familiarity with HTTP protocol
- Familiarity with Emulator's TCP/IP connectivity
The program capabilities are defined in Webclient.mmp file: CAPABILITY NetworkServices.
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.
This example can be built in directory Webclient\group by running the following commands:
bldmake bldfiles
abld build winscw udeb
In addition it is possible to create project for CodeWarrior IDE by running the following command:
abld makefile cw_ide
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.
The Options menu commands are handled in CWebClientAppUi::HandleCommandL(). 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. CWebClientEngine::IssueHTTPGetL() method is called to start the HTTP client session.
With HTTP Header, HTTP Source and Transaction Status options focus can be changed between application windows. Options menu command are handled in CWebClientContainer::HandleCommandL().
The main view is implemented in class CWebClientContainer. 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 CWebClientAppUi is called when the resolution is changed.
Class CWebClientEngine contains the implementation of HTTP Client API usage. CWebClientEngine 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.
This inheritance list is sorted roughly, but not completely, alphabetically:
|
© Nokia 2006 |

|