|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
1. About this Example
2. Prerequisites
3. Design and Implementation
4. Class Hierarchy
The tutorial starts by listing the pre-requisites the user should know before starting this example, and describes how to build and run the example.
How to use TCP/IP connection
Before running this example, Bluetooth or Network connection must be enabled and configured. The application needs to be installed into two devices, one functioning as server and the other as client. When example is started, the application will show the same view on both devices.
This application supports changing the screen size when program is running.
It is possible to create project for CodeWarrior IDE by running the following command:
abld makefile cw_ide
In addition it is possible to create project form CodeWarrior IDE:
Open CodeWarrior IDE
Select File -> Import from .mmp file
Browse to chat/group folder and select chat.mmp
Select Project -> Make
Select Project -> Run
After successful build, application can be found and started from Applications > Installed > Chat
Use TCP/IP -> Start Chat starts the server by calling ChatInet's StartL() function. Before starting user has to select Accesspoint to use. Server will then has a service and it is able to receive and send messages. Client device can connect to server by selecting Connect from Use TCP/IP submenu. Connect calls ChatInet's ConnectL() function. As connect is selected, server address is asked from user. After giving correct server address, user has to select Accespoint to use.
As connection has been made successfully via Bluetooth or TCP/IP, there are Disconnect, Send Message, Clear List and Exit in Options in client device's Options menu and Stop Chat, Send Message, Clear List and Exit in Server device's Options menu. Disconnect disconnects the connection and Stop Chat stops server and disconnects the connection. Disconnect calls DisconnectL() function and Stop Chat calls StopL() function. With Send Message option, client device can send messages to server device and vice versa. Send Message calls first Container's ShowDataQueryL function. This function draws "Write Message" query. After that send message calls SendMessageL(text) function to deliver message from client to server or vice versa. Clear list clears the view by empting the listbox. Exit closes the application. *
|
© Nokia 2006 |