Chapter 4. Symbian OS Programming Basics

This chapter focuses on the fundamentals of Symbian OS programming. So far, I've described smartphones in general, presented some steps to get started with the SDK, walked through some example code, and described the general architecture of the operating system. This chapter, however, marks the real beginning of your Symbian OS programming training as we get down to the basics.

You will not find any references to S60 or UIQ in this chapter. The information presented here is generic for all platforms based on Symbian OS.

I begin the chapter with an overview of the use of C++ in Symbian OS, followed by a look at the basic data types, the key types of classes you'll use and create, and the Symbian OS naming conventions. Then, I show how to program using the error-handling mechanism in Symbian OS, using leaves and traps, and how to use the cleanup stack. Next, I cover libraries in Symbian OS – both statically linked and DLLs.

Finally, I summarize the key points to remember when writing Symbian OS software.

Use of C++ in Symbian OS

C++ is the primary language for software development on Symbian OS since it provides the most efficient and natural interface to the system-level frameworks and APIs, which themselves are written in C++. In fact, Symbian OS itself is written almost entirely in C++. The first version of the operating system (known then as EPOC32) was created before C++ itself was formally standardized, that is, prior to 1998. For this reason, ...

Get Developing Software for Symbian OS: A Beginner's Guide to Creating Symbian OS v9 Smartphone Applications in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.