Symbian Developer Network

Documentation and Code

Symbian C++

Separated Client-Server: a Design Pattern

(John Roe)

This article describes how best to package the well-known Symbian OS Client–Server pattern to maximize encapsulation of the service interface, reduce client dependencies and reduce the overall RAM used by the service. The article is laid out as a design pattern, in a style similar to the forthcoming Symbian Press book, Common Design Patterns for Symbian OS. Read the paper

Long Running Active Object: a Design Pattern

(Ian McDowall)

This article describes a commonly used design that solves the problem of allowing a thread to perform a long running background task whilst still remaining responsive to higher priority events. The article is laid out as a design pattern, in a style similar to the forthcoming Symbian Press book, Common Design Patterns for Symbian OS. Read the paper

Symbian OS Descriptors Cookbook

(Alexey Gusev)

This paper illustrates the use of one of the more challenging entities in Symbian OS: descriptors. These string classes are frequently criticized by developers new to Symbian OS. Even the more seasoned engineer might have to spend some time to resolve common problems when working with the descriptors classes. This article provides a clear and definite guide for everyone who wants to get handy experience with these classes, learn how they work and get brief solutions for the most common problems that a developer faces in his or her everyday job.Read the paperDownload the source code

Introduction to R Classes

(Sorin Basca)

In this paper, Sorin Basca introduces R Classes. Symbian C++ standards define a number of types of classes which are easily identifiable by the naming conventions used. ‘R classes,’ or ‘resource classes,’ are one of these types of classes defined in the standards.Read the paper

Introduction to the Camera API

(Mark Shackman)

This paper outlines the facilities provided by the ECAM API, including some code examples to show how they are used. Note that the ECAM API provides only the definitions – it is still up to each manufacturer to implement the code for the API, and hence there may be some differences in behavior between manufacturers.Read the paper

Exception Handling in Symbian OS

(Ben Morris)

This paper provides an overview of C++ exception handling in Symbian OS, including both native and standard approaches. It discusses when each approach is most appropriate, and how the two approaches can safely be mixed.Read the paper

Modularizing Symbian OS Applications

(Hamish Willee)

Symbian OS applications are often split into separate Engine and GUI components. Symbian has historically implemented its Engines as DLLs that are statically loaded by the GUI at runtime. However, the division does not need to be made at binary level. It's also possible to separate at source level, and use the build system to create a standalone EXE for each target platform. This paper examines both of the methods, and concludes that the approach adopted by Symbian and the device-creation community may not always the best method for third-party application developers.
Read the paperDownload the source code

Advanced RArray

(Paul Todd)

This document covers intermediate and advanced usage of the RArray classes. It gives explanations and examples for some of the most frequently asked questions and encountered problems that have appeared on the Symbian forums.
ASD topics addressed: dynamic arrays. Read the paperDownload the source code

CActive and Friends

(Ben Morris)

The second in the series by Ben Morris, which examines the Symbian OS native C++ idioms.
ASD topics addressed: active objects.Read the paper in EnglishRead the paper in Russian

Leaves and Exceptions

(Jason Morley)

Jason Morley outlines the motivations for why Symbian OS v9.x now supports standard C++ exceptions.
ASD topics addressed: cleanup stack, object construction.Read the paper

Coding idioms for Symbian OS

This paper is aimed at all Symbian OS smartphone developers. The 80-20 rule states that 80% of the time will be spent fixing 20% of the problems that occur in development. The aim of this document is to address those 20%.
ASD topics addressed: Classes and objects, class design and inheritance, Symbian OS types and declarations, cleanup stack, object construction. Read the paper (94 Kb)

Introduction to RBuf

(Mark Shackman)
RBuf is a new addition to the Symbian descriptor family, providing a modifiable, resizable heap-based descriptor. This paper provides an introduction to RBuf, with example code to show its usage.
ASD topics addressed: descriptors. Read the paper (84 Kb)

Transient Server Template

(Hamish Willee, Andrew Thoelke, Adrian Taylor)

Symbian OS makes much use of the client-server model. A transient server is one that exists only when it is needed; it is started up the first time a client attempts to connect, and then shuts itself down some point after the last client session has been closed.

The code used to start and shut down the server is almost boiler-plate. This paper and associated code deliver a template that can be used as the basis for Symbian OS v9 transient servers that launch the server in a separate process to the client; note that the start-up code for a server that runs in the same process as the client is not covered in this paper.
ASD topics addressed: client server. Transient server template paperDownload the source code (16kb)

Using an indirection DLL for multi-UI platform support

(Andy Weinstein, Degel Software)

An application that supports multiple UI platforms sometimes runs into the need to use different APIs to give similar functionality on different Symbian OS phones. Andy Weinstein explains how to use an indirection DLL to isolate just those pieces of the application that use platform-dependent API support. This DLL alone is reimplemented for each target platform, internally using the appropriate platform-specific APIs. Read the paper (180 KB)

Publish and Subscribe

(Mark Shackman)

Symbian OS v9 introduces “Publish and Subscribe” that allows the setting, retrieving and monitoring of system-wide variables and provides a new IPC mechanism for peer to peer communication between threads. This paper describes the Publish and Subscribe functionality, including comprehensive code examples and covering both usage patterns and general usage guidelines.
ASD topics addressed: system structure Read the paper (72 Kb)

Support for Writeable Static Data in Symbian OS

Symbian’s new Real-Time Kernel (EKA2) introduces support for DLL global writeable static data (WSD). The following paper provides a definition of WSD, the alternatives to using WSD, and the costs and caveats; included also are some architectural details about Symbian's implementation, in the form of frequently asked questions.
ASD topics addressed: system structure Read the paper (132 Kb) (Updated January 2008)

To read or contribute additional information on Symbian C++, visit the Wiki Extra.

 

FAQs

Here you can find the answers to the most frequently asked developer questions, together with other useful tech tips.More