Qt applications can use Symbian APIs directly. This section is an accelerated introduction to Symbian C++ for application developers with a working knowledge of standard C++.
clear coding conventions.
a framework for controlling access to shared system services.
an elegant mechanism for managing multiple asynchronous requests from a single thread.
a technique for managing memory and other resources.
a lightweight alternative to standard C++ exception handling.
Symbian encourages only single inheritance of implementation ('subclassing') , but allows multiple interface inheritance ('subtyping').
Class and function templates are not used extensively in Symbian
C++. Examples of using templates in Symbian include the dynamic array
class templates such as RArray
and RPointerArray
. The Thin Template idiom is used to prevent code bloat. See Thin templates for details.
Standard C++ exception handling was not originally supported due to the overhead involved. It is now possible to use standard exception syntax but this is primarily to make porting existing C++ code easier.
The smart pointer idiom is not widely used in Symbian code. Exception safety is achieved through the leave mechanism and the cleanup stack instead of releasing resources in the destructors of local variables.
The device resources and services that you are most likely to use in your application are provided by Symbian servers. A Symbian server is a system program that runs in the background and manages access by applications to the resources of the device, such as the file system, multimedia, and networking. Individual servers control shared access to key device components, for example the camera.
The QtMobility package offers convenient access to much of the functionality provided by Symbian servers. In cases where a particular server is not yet accessible using QtMobility, you can interact with the server directly from Symbian code.
creating active objects to make asynchronous requests of the server. Active objects are managed by a component called the active scheduler. The application framework creates an active scheduler to which you can add your active objects.
passing data to and receiving data from the server in the form of descriptors. Descriptors are how strings are represented in Symbian code. There are 16 bit and 8 bit descriptor classes. For serializing objects across the client server boundary 8 bit package descriptors are used.
For further information on developing an application using both Qt and Symbian C++, see Mixing Qt and Symbian C++ in your application.
Figure: Application architecture for using a Symbian server