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.
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.
|
ctype.h
|
Character functions are provided by TChar .
|
errno.h
|
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_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.
|
math.h
|
Maths functions are provided by Maths services.
|
setjmp.h
|
No equivalent. However, the trap and leave mechanism
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 .
|
stdef.h
|
Closest equivalent is the header e32def.h .
|
stdio.h
|
File handling is provided by the
File Server.
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 ).
For random numbers, see Math .
Memory management is usually done through C++ new and
delete operators, but direct access to the heap
is available, using classes like RHeap .
Environment variables are not used, though
Publish and Subscribe
provides an effective equivalent. For basic sorts, see
User .
|
string.h
|
String handling is provided by the
descriptor
family
of classes.
|
time.h
|
Equivalents are provided by the
Date and Time Handling
API.
|
|
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;
for basic sorts, see User .
|
<bitset>
|
No equivalent.
|
<complex>
|
No equivalent.
|
<deque>
|
Queues are typically implemented using a list: see
Singly Linked Lists.
|
<exception>
|
The main exception handling is provided by the
trap and leave mechanism.
Thread-level
handling of processor exceptions is provided by
Threads and Processes.
|
<fstream>
|
See File Stores.
|
<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.
|
<iterator>
|
No equivalent.
|
<limits>
|
Constant definitions are in the header e32math.h .
|
<list>
|
See Singly Linked Lists.
|
<locale>
|
See Locale settings.
|
<map>
|
See Array keys.
|
<memory>
|
No equivalent. Dynamic Arrays
have
various types for different pre-defined allocators.
|
<numeric>
|
No equivalent.
|
<ostream>
|
See Streaming.
|
<queue>
|
Queues are typically implemented using a list: see
Singly Linked Lists.
|
<set>
|
See Array Keys.
|
<sstream>
|
Descriptors can be streamed as described in
Externalising and internalising descriptors;
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
family
of classes.
|
<strstream>
|
Descriptors can be streamed as described in
Externalising and internalising descriptors;
see also classes such as RBufReadStream ,
RBufWriteStream , RDesReadStream ,
RDesWriteStream .
|
<utility>
|
No equivalent.
|
<valarray>
|
No equivalent.
|
<vector>
|
See Dynamic Arrays.
|
|
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
API.
Controls, the equivalent of AWT Components, are defined abstractly in the
UI Control Framework.
Concrete components are provided by UIQ.
|
java.beans
|
No equivalent.
|
java.io
|
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.
|
java.lang
|
The user library provides equivalents, particuarly
Basic Types,
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;
64-bit integers by TInt64 .
|
java.net
|
Sockets are provided by Sockets Client; URL handling by the Internet Protocol Utility
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
provides
database management, including SQL.
|
java.text
|
Locale settings
provides formatting for locale-sensitive information.
|
java.util
|
Collection classes are provided by
Arrays and Lists;
event
handling by active objects;
date
and time facilities by Date and Time handling;
string
tokenizer by Lexical Analysis;
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.
|
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.
|
javax.print
|
See Print Framework.
|
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
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
|
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.
Strings
are handled by descriptors;
date and time facilities by Date and Time Handling.
|
Array, List, and Map Classes
|
For arrays, see Dynamic Arrays;
for
lists, see Singly Linked Lists
and
Doubly Linked Lists;
for maps, see Array Keys.
|
File and Database Classes
|
File handling is done through the
File Server.
An
abstract interface for many types of storage is provided by
Streaming:
the
specialisation of streaming for files is provided by
File Stores.
A
compound file of multiple files is referred to as a store.
DBMS
provides
database management.
|
Internet and Networking Classes
|
Sockets are provided by the Sockets Client; HTTP services by
HTTP Client.
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
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.