Full Example Code List

This document lists the example code available for each module and collection in the platform.

The following tables are grouped by module and collection. In each table, the left hand column gives a link to the overview for the example. The overviews describe the example's purpose, the APIs it demonstrates, how to build and run it, and they provide a link to download the example's source code.

In most cases, the name in the left hand column is the example's mmp filename. If the example has more than one mmp file, the name of its directory is used. The right hand column gives a summary of the main purpose of the example.

Symbian Platform Fundamentals

Name Description

HelloWorld

Most basic console application.

CClasses

Shows a basic 'C' class and use of the cleanup stack.

TAndRClasses

Shows a typical 'T' and 'R' class.

MClasses1-3

Shows the use of 'M' (abstract interface) classes.

StaticDLL

Shows how a statically linked DLL is used.

Application Framework

Name Description

BmpAnimGui

Shows how to create an animation using the Bitmap Animation framework.

HelloWorld

Shows how to create a simple GUI application with a single view.

Communications Framework

Data Server

Name Description

Rconnection

Shows how to use the RConnection API for connection monitoring and management.

Generic Application Support

Common App Services

Name Description

AlarmServerExample

Shows the client API to the alarm server.

Generic OS Services

Compression Libraries

Name Description

EzlibExample

Shows how to use the EZLIB API to do file extraction and compression.

Generic Open Libraries

Name Description

FileAccessExample

Shows accessing the file system using P.I.P.S.

HelloWorldExample

Creates a simple P.I.P.S. DLL and EXE to demonstrate function lookup by name rather than by ordinal.

hybridapp

Shows a P.I.P.S. 'hybrid' application that uses both C and native Symbian C++ APIs.

IPC

Shows inter-process communication in P.I.P.S.

LibpThreadExample

Shows simple multi-threading and synchronisation in P.I.P.S. using libpthread.dll.

libmexample

Shows the P.I.P.S. Standard C maths library, libm.dll.

ConsoleApp

Shows a simple console-based STDLIB (C Standard library) program that converts quantities from one unit of measurement into another.

GUIApp

Shows a Techview GUI application whose engine is written using STDLIB.

Hello

The simplest possible STDLIB example.

posixsignals

Shows various signal use cases as supported in P.I.P.S.

Open C

Name Description

openclibz

Shows file compression/decompression. Huffman , filtered data compression, run length encoding, compress a string given by user

Antiword

converts a MS-word document (i.e. .doc) file in to a plain text(i.e. .txt) file.

converts a MS-word document (i.e. .doc) file in to a Adobe acrobat(i.e. .pdf) file.

converts a MS-word document (i.e. .doc) file in to a post-script (i.e. .ps) file.

converts a MS-word document (i.e. .doc) file in to a xml (i.e. .xml) file

handleglobalvar

How to handle global variables within the library code.

How to solve WSD (Writable Static Data) problem

opencmessagequeuelibraryex

Send/receive messages using message queue, demonstrated using open C message queue library

opencproducerconsumerex

Demonstrates solution for Producer/ Consumer Problem using Open C.

OpenCStringUtilitiesEx

Demonstrates string utility using open C libraries

redirectprintf

how to redirect stdio to a file. libc library provides freopen API to redirect all standard IOs (namely, stderr, stdin, or stdout).

Generic Services

Name Description

exampleRecognizer

Shows how to write a simple data recognizer.

 

TaskSchedulerExample

Shows how to schedule and run tasks using the Task Scheduler API.

Low level Libraries and Frameworks

Name Description

Basics

Shows how to store and restore objects using the clipboard API.

InterfaceClient

One of a set of three related ECom examples that provide an interface definition, a DLL that contains two implementations of that interface, and a client program that uses the interface.

InterfaceDefinition

See InterfaceClient, above.

InterfaceImplementation

See InterfaceClient, above.

ReadText

Most basic resource file example, shows how to read a string resource and print it to the console.

ReadArray

Shows how to load data from a resource file into an array.

MultiRead1

Shows how to open a single resource file and read a resource from it into a descriptor.

MultiRead2

Shows how to open and read from multiple resource files.

ReadData

Shows how to use a resource reader to read data of various types from a resource file into the data members of a class.

EUser High Level Library

Shows how to use EUser High Level library classes and APIs

SigCheck

Shows how the signature of a resource file is checked before use.

XML

Name Description

XmlExample

Shows how to use the Xml framework to parse XML and WBXML files.

Graphics

Font and Bitmap Server

Name Description

BitmapsShell

Shows how to draw and manipulate bitmaps.

CoverflowApp

Illustrates how the graphics architecture called ScreenPlay creates OpenVG content on a semi-transparent or transparent UI.

General

Name Description

GraphicsShell

A TechView application that demonstrates drawing points, lines and shapes, and zooming a bitmap and text.

High Level Internet Protocols

Application Layer Protocols

Name Description

httpexampleclient

A console application that provides a menu-driven interface to demonstrate the HTTP API.

IMS and Streaming

Name Description

RTPExample

Shows RTP packet streaming.

Kernel and Hardware Services

User Library

Name Description

AdvancedClientServerExample

Shows the use of asynchronous and synchronous client/server APIs using a logical device driver (LDD) and a physical device driver (PDD).

SingleRequest

Shows the basic principles of asynchronous programming by issuing and waiting for completion of a single request.

WaitLoop

Shows how a wait loop can be used to identify and handle a completed request.

RealLifeWaitLoop

Shows how the wait loop can deal with multiple asynchronous service providers.

RunComplete

Shows how active objects and an active scheduler can be used to handle asynchronous events, using a timer.

AcceptInput1-2

Shows how active objects and an active scheduler can be used to handle asynchronous events, using keyboard input.

AcceptPrintInput

Shows how active objects and an active scheduler can be used to handle accept and print keyboard inputs to a console.

Fibonacci1-3

Shows how active objects and an active scheduler can be used to handle asynchronous events and long-running services to maintain system responsiveness.

circularbuffer

Shows how to construct and use circular buffers holding different types of objects.

Simple

Shows a simple client that has a single session with a server.

Complex

More complex client/server example, where the server supports multiple subsessions within a session.

condvarglobal

Shows the use of the global condition variable IPC mechanism.

condvarlocal

Shows the use of the local condition variable IPC mechanism.

Basics

Shows date and time handling.

BinaryData

Shows how descriptors can handle general binary data by explicitly using the 8 bit descriptor class variants.

Buffer

Shows the basic idea of buffer descriptors and how they are used.

InFunct

Shows how to use descriptors as function arguments.

HeapBuffer

Shows how to create and use the heap buffer descriptor HBufC.

Modifier

Shows how to use the modifiable descriptor class TDes.

NonModifier

Shows how to use the non-modifiable descriptor class TDesC.

Pointer

Shows how to use pointer descriptors.

WriteToFile

Basic example that shows how to write text to a file.

DynamicArrays

Shows how to construct and use dynamic arrays.

DynamicBuffers

Shows how to use the flat and segmented buffer classes.

DLLs

Implements two polymorphic DLLs and shows how to load and use them.

RangeChecking

Shows how to use the range checking wrapper class for C++ arrays (TFixedArray).

hashtableexample

Shows how to use the hash table APIs.

Lexer

Shows how to use the lexical analyser, TLex.

linkedlist

Shows how to use singly and doubly linked lists and the delta queue class.

Currency

Shows locale-specific representation of currency values and symbols.

localeupdate

Shows how to load a locale DLL and read settings from it.

ErrorOnFail

Shows use of the TRAPD macro, the cleanup stack and the process of leaving. Returns an error code on failure.

LeaveOnFail

As the ErrorOnFail example except it leaves on failure.

ELeaveOnFail

As the LeaveOnFail example except it calls new (ELeave) rather than new.

TrapD

Shows the use of the TRAPD macro.

PushLAndPop

Shows the use of the cleanup stack and its functions PushL() and Pop().

PushLPopDest

Shows the use of the cleanup stack and its functions PushL() and PopAndDestroy().

NewL

Shows use of the NewL() static function.

NewLC

Shows use of the NewLC() static function.

SimpleOOM

Shows cleanup handling for compound classes.

MemLeakOOM

Shows cleanup handling for compound classes, and avoiding memory leaks.

TwoPhaseOOM

Shows the two phase construction technique.

TAnyRObjects1

Shows how cleanup can be implemented for TAny* type objects and 'R' type (resource type) objects.

TAnyRObjects2

As TAnyRObjects1 except it calls OpenLC() to open the file and push it onto the cleanup stack in one function call.

Utilities

Shows how to use the cleanup functions CleanupDeletePushL(), CleanupClosePushL() and CleanupReleasePushL(), and CleanupArrayDeletePushL().

MessageQueueExample

Shows the use of the message queue in interprocess communication.

pubsub

Shows the Publish and Subscribe IPC mechanism.

rbufexample

Shows how to use the resizable buffer descriptor class RBuf.

SecureServer

Shows how to use the policy server framework.

tcharexample

Shows how to use the single character class, TChar, and its derived classes.

TLS1

Shows the use of thread local storage (TLS) in a DLL, that is set and accessed from a separate executable.

ThreadRendezvous

Shows the principle of synchronisation using the thread rendezvous technique.

BasicTimer

Shows the asynchronous timer class RTimer

Periodic

Shows the differences between a periodic and a heartbeat timer.

resourcemanager

Shows how to use the Power Resource Manager framework.

SemaphoreExample

Shows how to use semaphores for a multithreading application.

Messaging Middleware

Name Description

TextMTM

Several example projects that show how to use the Messaging APIs.

SearchSortExample

Shows how to use the enhanced search and sort API for message stores.

BIOMessageMgr

Shows BIO messaging and parsing the BIO message.

SendAs2Example

Shows how to use the SendAs v2 protocol for sending messages.

Messaging Applications

Name Description

smsexample

Shows how to send and receive SMS messages using the Messaging Framework APIs.

Pop3Example

Shows how to create SMTP (Simple Mail Transfer Protocol) and POP (Post Office Protocol) accounts to send and receive emails.

Imap4Example

Shows how to create SMTP and IMAP (Internet Message Access Protocol) accounts to send and receive emails.

Multimedia

Multimedia APIs and Frameworks

Name Description

ICLCodec

Shows how to implement encoder and decoder plug-ins for the Image Converter Library.

ICLExample

Shows how to convert still images, stored in files or descriptors, to and from bitmap objects using the Image Conversion Library (ICL) API

ImageConv

Shows how to convert between standard graphics formats to and from CFbsBitmap s, and how to rotate, flip, and zoom images.

CameraExample

Shows how to use the Camera API to capture and control images.

Multimedia Middleware

Multimedia Middleware Frameworks

Name Description

AudioClientEx

Shows how to use the Multimedia Framework's client audio interfaces to play and record audio.

MmfExCodec

Shows how to implement a codec plug-in for the Multimedia Framework to convert media data.

MmfRAWFormat

Shows how to implement format encoder and decoder plug-ins for the Multimedia Framework.

MmfExSinkSource

Shows how to implement sink and source plug-ins for the Multimedia Framework.

MmfRec

Shows how to record short audio clips using each format that the system supports.

PC Tools

Secure Software Install Tools

Name Description

HelloWorld

Shows how to create a simple installation file for an application.

HelloWorld

Shows how to create an installation file for a multilingual application.

System GUI Framework

Look-and-Feel Agnostic UI Foundation

Name Description

ClockExample

Shows how to create and display digital and analogue clocks.