Developing Series 60 Applications: A Guide for Symbian OS C++ Developers: A Guide for Symbian OS C++ Developers

Covering the essential aspects of Symbian OS, upon which Series 60 is based

This chapter introduces the basic concepts, APIs, and data structures that you need to understand in order to develop for Symbian OS and therefore Series 60. All of the topics discussed in this chapter will be used throughout the book, usually without further explanation. It is therefore essential that you understand them fully before proceeding further.

Symbian OS is written almost entirely in C++, but developing applications for it is not trivial, and so this chapter requires the reader to have a solid background in advanced use of C++ and object-oriented design. Readers with previous Symbian OS development experience may wish to skip this chapter, as no Series 60-specific elements will be covered here. However, it may still prove to be a useful refresher course.

Although Symbian OS provides part of the User Interface ( UI ) implementation of the platform, Series 60 provides many of the concrete UI controls ”so UI features will not be covered here. In fact the contents of this chapter could easily apply to any platform that is based on Symbian OS.

Topics covered are:

Each of these fundamental topics builds on information given earlier in the chapter, so you are advised to approach each topic in turn : The naming conventions and basic types are used throughout; descriptors and collection classes require resource management; file handling and Client/Server architecture use Active Objects, and so on.

All of the topics covered in this chapter are illustrated using code snippets, mostly taken from an example application called Elements , and the details of how to download the full buildable source of this, along with the other example applications, are given in the Preface.

For the sake of simplicity, this example is implemented as a console application ”in other words it has no Graphical User Interface ( GUI ). Using a console application allows the focus to be placed on the underlying principles of the topics being explained, rather than having to examine the Series 60 UI framework at this early stage.

The Elements application is a contrived example that stores and manipulates lists of chemical elements. The elements can be loaded in from a standard comma-separated value ( CSV ) text file, or from a Symbian OS stream-based binary file (this will be explained further in the section Files, Streams and Stores ). Once loaded, the list can then be sorted, searched and written out to the console display, or back to a file.

Note that lines of code are sometimes omitted for clarity in the book listings, and while it is unusual for a console application to be run on a real Series 60 device, details are provided with the full source to allow you to run the application on target hardware.

Категории