UIQ Technology
Symbian OS Library

UIQ 3.1 SDK        UIQ developer portal

[Index] [Spacer] [Previous] [Next]



Appendix: Symbian OS APIs

A major part of any software development project involves finding and understanding the application programming interfaces (APIs) you'll need to use to achieve your tasks. The basic elements of these APIs are the header files you include in your code, the libraries you link against and their documentation. However, with over 600 libraries and over 2500 headers in a typical SDK, understanding the whole system isn't easy. The Symbian OS system documentation attempts to make things simpler by grouping the elements into about 150 larger functional areas corresponding to OS components and into around 20 top-level areas (termed subsystems). This top-down view of the system is introduced in the Symbian OS Library in Subsystems and APIs. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/SubsystemsAndAPIs.guide.html#devguides%2eSubsystems%2estart

Another way to understand the APIs is to compare them with the interfaces of other systems that you already know well. This appendix maps Symbian OS interfaces to those of other, commonly used platforms (ANSI C, the C++ standard library, Java, and Windows/MFC). If you find this approach useful, and want to read case studies and discussions of moving to Symbian OS from other systems, there are papers on the Symbian Developer Network in the Migrating to Symbian OS section.

ANSI C standard library

The following table lists the ANSI C standard library headers, and provides links to where similar functionality can be found in Symbian OS.

assert.h

Asserts are provided by system macros, see system macros and E32_EKA2. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/SystemMacros/index.html#SystemMacros%2etoc

ctype.h

Character functions are provided by TChar. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/BasicTypes/TCharClass.html#%3a%3aTChar

errno.h

http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/SystemWideErrorCodes/SystemWideErrorCodes.html#apireference%2esystemwideerrorcodes System wide error codes are defined as integers, see e32err.h Global variables. Apps can add their own errors, and instruct the system how to display them through ERROR_ARRAYhttp://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/UikonCore/ERROR_ARRAYStruct.html#ERROR_ARRAY resources.

float.h

Constant definitions are in the header e32math.h.

limits.h

No direct equivalent.

locale.h

Locale settings are encapsulated by Locale settings.http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/LocaleSettings/index.html#LocaleSettingsOverview%2etoc

math.h

Maths functions are provided by Maths services. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/Maths/index.html#MathsOverview%2etoc

setjmp.h

No equivalent. However, the trap and leave mechanism http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/MemoryManagement/CleanupSupport/CleanupSupportGuide1/index.html#CleanupSupportGuide1%2etoc error handling system is similar in principle.

signal.h

No equivalent.

stdarg.h

Variable argument handling is provided by various macros, including VA_START, VA_LIST. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/SystemMacros/index.html#SystemMacros%2etoc

stdef.h

Closest equivalent is the header e32def.h.

stdio.h

File handling is provided by the File Server.http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/FileServerClientSide/index.html#FileServerClientSideOverview%2etoc Consoles are accessed through Console, though their use is unusual in production code.

stdlib.h

For conversion functions, see the descriptor classes (e.g. the base class TDes16). http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/Descriptors/TDes16Class.html#%3a%3aTDes16 For random numbers, see Math. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/MathsServices/MathClass.html#%3a%3aMath Memory management is usually done through C++ new and delete operators, but direct access to the heap http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/MemoryAllocation/index.html#MemoryAllocation%2etoc is available, using classes like RHeap. Environment variables are not used, though Publish and Subscribe provides an effective equivalent. For basic sorts, see http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/SystemStaticFunctions/UserClass.html#%3a%3aUser User.

string.h

String handling is provided by the descriptor http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/BuffersAndStrings/Descriptors/index.html#DescriptorsGuide%2etoc family of classes.

time.h

Equivalents are provided by the Date and Time Handling API.http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/DateAndTimeHandling/index.html#DateAndTimeHandlingOverview%2etoc

C++ standard library

The following table lists the C++ standard library headers, and provides links to where similiar functionality can be found in Symbian OS.

<algorithm>

No direct equivalents, though for min/max see Basic Types http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/BasicTypes/index.html#BasicTypes%2etoc ; for basic sorts, see User. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/SystemStaticFunctions/UserClass.html#%3a%3aUser

<bitset>

No equivalent.

<complex>

No equivalent.

<deque>

Queues are typically implemented using a list: see Singly Linked Lists. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/SinglyLinkedListsGuide/index.html#SinglyLinkedListsGuide%2etoc

<exception>

The main exception handling is provided by the trap and leave mechanism. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/MemoryManagement/CleanupSupport/CleanupSupportGuide1/index.html#CleanupSupportGuide1%2etocThread-level handling of processor exceptions is provided by Threads and Processes. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/ThreadsAndProcesses/index.html#ThreadsAndProcesses%2etoc

<fstream>

See File Stores.http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/FileStores/index.html#FileStoresOverview%2etoc

<functional>

No equivalent.

<iomanip>

No equivalent.

<ios>

See Streaming.

<iosfwd>

No equivalent.

<iostream>

No equivalent. Console handling is provided by the Console class.

<istream>

See Streaming http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/Streaming/index.html#StreamingOverview%2etoc .

<iterator>

No equivalent.

<limits>

Constant definitions are in the header e32math.h.

<list>

See Singly Linked Lists http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/SinglyLinkedListsGuide/index.html#SinglyLinkedListsGuide%2etoc .

<locale>

See Locale settings.http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/LocaleSettings/index.html#LocaleSettingsOverview%2etoc

<map>

See Array keys. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/ArrayKeys/index.html#ArrayKeysGuide%2etoc

<memory>

No equivalent. Dynamic Arrays http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/DynamicArrays/index.html#DynamicArraysGuide%2etoc have various types for different pre-defined allocators.

<numeric>

No equivalent.

<ostream>

See Streaming http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/Streaming/index.html#StreamingOverview%2etoc .

<queue>

Queues are typically implemented using a list: see Singly Linked Lists http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/SinglyLinkedListsGuide/index.html#SinglyLinkedListsGuide%2etoc .

<set>

See Array Keys. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/ArrayKeys/index.html#ArrayKeysGuide%2etoc

<sstream>

Descriptors can be streamed as described in Externalising and internalising descriptorshttp://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/Streaming/ExtIntDescriptors.guide.html#StreamingGuide%2eext%2dint%2ddescriptors; see also classes such as RBufReadStream, RBufWriteStream, RDesReadStream, RDesWriteStream.

<stack>

See CStack.

<stdexcept>

System wide error codes, see e32err.h Global variables are defined as integers.

<streambuf>

See the stream buffer classes, for instance MStreamBuf, TStreamBuf.

<string>

String handling is provided by the descriptor http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/BuffersAndStrings/Descriptors/index.html#DescriptorsGuide%2etoc family of classes.

<strstream>

Descriptors can be streamed as described in Externalising and internalising descriptors http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/Streaming/ExtIntDescriptors.guide.html#StreamingGuide%2eext%2dint%2ddescriptors ; see also classes such as RBufReadStream, RBufWriteStream, RDesReadStream, RDesWriteStream.

<utility>

No equivalent.

<valarray>

No equivalent.

<vector>

See Dynamic Arrays. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/DynamicArrays/index.html#DynamicArraysGuide%2etoc

Java

The following table lists the top-level packages in the Java(TM) 2 Platform Standard Edition 5.0, and provides links to where similiar functionality can be found in Symbian OS.

java.applet

No equivalent.

java.awt

Graphics primitives are provided by the Graphics http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Graphics/Graphics/index.html#GraphicsAPIGuide%2etoc API. Controls, the equivalent of AWT Components, are defined abstractly in the UI Control Framework.http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/ApplicationFramework/UIControlFrameworkGuide/index.html#UiControlFrameworkGuide1%2eUsing Concrete components are provided by UIQ.

java.beans

No equivalent.

java.io

http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/Streaming/index.html#StreamingOverview%2etoc Streaming provides an abstract stream interface; streams can be combined into Stores. Concrete streams and stores for the file system are provided by File Stores http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/FileStores/index.html#FileStoresOverview%2etoc .

java.lang

The user library provides equivalents, particuarly Basic Types http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/BasicTypes/index.html#BasicTypes%2etoc , and the User class. There is no equivalent to the reference-object and reflective packages.

java.math

High precision floating point is provided by Maths services http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/Maths/index.html#MathsOverview%2etoc ; 64-bit integers by TInt64.

java.net

Sockets are provided by Sockets Client; URL handling by the Internet Protocol Utility http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/CommsInfrastructure/SocketsClientGuide/index.html#SocketsGuide%2eindex component.

java.nio

Character-set encoders and decoders are available from the Character Conversion component; the channel and regular expression packages have no equivalent.

java.rmi

No equivalent.

java.security

See Certificate Manager. Cryptography algorithm interfaces are not exposed.

java.sql

DBMS http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/DBMS/index.html#DBMSGuide%2etoc provides database management, including SQL.

java.text

Locale settings http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/LocaleSettings/index.html#LocaleSettingsOverview%2etoc provides formatting for locale-sensitive information.

java.util

Collection classes are provided by Arrays and Lists; http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/index.html#ArraysAndListsOverview%2etoc event handling by active objects; http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/InterProcessCommunication/AsynchronousServicesGuide/AsynchronousServicesGuide3/index.html#AsynchronousServicesGuide3%2etoc date and time facilities by Date and Time handling; http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/DateAndTimeHandling/index.html#DateAndTimeHandlingOverview%2etoc string tokenizer by Lexical Analysis; http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/BuffersAndStrings/LexicalAnalysis/index.html#LexicalAnalysisGuide%2etoc random-number generator by Math; zip handling by EZLIB (undocumented at v9.1); logging by File Logging; the regular expression packages have no equivalent.

javax.accessibility

No equivalent.

javax.crypto

No equivalent.

javax.imageio

See Image Converter. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/MediaServer/ImageConverterOverview.guide.html#MediaServerOverview%2eImageConverterOverview%2emain

javax.management

No equivalent.

javax.naming

Naming services (e.g. DNS) are available through the Sockets Client RHostResolver class. There is no directory service support.

javax.net

See Secure Sockets. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/CommsInfrastructure/SecureSocketsGuide/index.html#SecureScoketsGuide%2etoc

javax.print

See Print Framework. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/ApplicationFramework/PrintFrameworkGuide/index.html#PrintFrameworkGuide%2etoc

javax.rmi

No equivalent.

javax.security

For certficates, see Certificate Manager. For authentication, see MCTAuthObject.h (undocumented at v9.1).

javax.sound

For sampled sound and MIDI packages, see the Multi Media Framework.

javax.sql

See comments for java.sql.

javax.swing

See comments for java.awt.

javax.transaction

No equivalent.

javax.xml

No equivalent.

org.ietf.jgss

No equivalent.

org.omg

No equivalent. Symbian OS's ECom http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/ApplicationProtocols/ECom/index.html#guide%2eecom%2eindex provides a management system for local component binaries.

org.w3c.dom

No equivalent.

org.xml

No equivalent.

Windows MFC

The following table lists the top-level MFC API categories, and provides links to where similiar functionality can be found in Symbian OS.

Root Class: CObject

All Symbian OS classes that allocate resources on the heap are derived from CBase.

MFC Application Architecture Classes

http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/ApplicationFramework/UikonCoreOverview.guide.html#ApplicationFrameworkOverview%2eUikonOverview%2eUikonCoreOverview%2emain Uikon defines a roughly similar application architecture with application, document, and view classes (note though that commands are handled by the view class rather than command routing base classes). The platform UI layer, such as UIQ supplies, can specialise the application architecture classes.

Window, Dialog, and Control Classes

Frame windows: Symbian OS applications do not have a frame window as such. The app UI class creates screen furniture such as menus and toolbars.

Drawing and Printing Classes

Like MFC, Symbian OS has an abstract graphics device, and sub-classes for device types such as windows and printers. Instead of separate drawing tool objects such as CPen, drawing is done through the functions on a graphics context.

Simple Data Type Classes

Simple geometric types are defined in various Geometry classes. http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/GraphicsFoundations/index.html Strings are handled by descriptors http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/BuffersAndStrings/Descriptors/index.html#DescriptorsGuide%2etoc ; date and time facilities by Date and Time Handling http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/DateAndTimeHandling/index.html#DateAndTimeHandlingOverview%2etoc .

Array, List, and Map Classes

For arrays, see Dynamic Arrays; http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/DynamicArrays/index.html#DynamicArraysGuide%2etoc for lists, see Singly Linked Lists http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/SinglyLinkedListsGuide/index.html#SinglyLinkedListsGuide%2etoc and Doubly Linked Lists http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/DoublyLinkedListsGuide/index.html#DoublyLinkedListsGuide%2etoc ; for maps, see Array Keys http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/ArraysAndLists/ArrayKeys/index.html#ArrayKeysGuide%2etoc .

File and Database Classes

File handling is done through the File Server.http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/FileServerClientSide/index.html#FileServerClientSideOverview%2etoc http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/FileServerClientSide/index.html#FileServerClientSideOverview%2etoc An abstract interface for many types of storage is provided by Streaming: http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/Streaming/index.html#StreamingOverview%2etoc the specialisation of streaming for files is provided by File Stores.http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/FileStores/index.html#FileStoresOverview%2etoc http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/FileStores/index.html#FileStoresOverview%2etoc A compound file of multiple files is referred to as a store.

http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/DBMS/index.html#DBMSGuide%2etoc DBMS http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/Base/DBMS/index.html#DBMSGuide%2etoc provides database management.

Internet and Networking Classes

Sockets are provided by the Sockets Client; HTTP services by HTTP Client http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/DevGuides/cpp/ApplicationProtocols/HTTP/index.html#cpp%2eguide%2ehttp%2eindex . There is no gopher or FTP support in Symbian OS.

OLE Classes

There is no equivalent. The Symbian OS application architecture supports embedding of documents, but this facility is not used in UIQ. UIQ prefers applications to link using dynamic navigational links (DNLs) in views.

Debugging and Exception Classes

The emulator provides debug facilities http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/ToolsAndUtilities/Emulator/emulator/Debugging.guide.html#emulator%2edebug for manipulating and checking memory and other resources. Debug builds of applications automatically check for memory leaks and report unfreed cells on exit.

Errors are indicated by the System wide error codes, see e32err.h Global variables

The Symbian Developer Network paper Symbian OS for Windows programmers may also be helpful to Windows programmers migrating code to Symbian OS.