introduction to symbian os

60
Fundamentals of Symbian OS Copyright © 2001-2007 Symbian Software Ltd. Introduction to Symbian OS Introduction Part 1a

Upload: phamtuyen

Post on 10-Feb-2017

246 views

Category:

Documents


4 download

TRANSCRIPT

Fundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Introduction to Symbian OS

Introduction Part 1a

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Introduction

This lecture serves as general introduction to the course

• The background of Symbian the company

• Symbian OS C++ dialect

• The architecture of Symbian OS

• What is covered in the course

• Resources

2

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Background

3

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Before Symbian - Psion

Psion was established in 1980

• To develop games and software for the Z80-based Sinclair ZX81 and ZX Spectrum

Products included

• Flight simulator, “Horace Goes Skiing”, Psion Chess, Space Raiders and other games.

• Psion Chess for the ZX81 took 1K memory

• Office suite for the Sinclair QL (1983)

4

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Before Symbian - Psion

Mid ‘80s - Hardware

• The 6301 based 8-bit Organiser (1984) - 14cm x 9cm, 2K RAM, 4K ROM, 8K datapak, 6 months battery life!

• Organiser II (1986) - the world’s first proper PDA

• Organiser II variants were created: up to 64K memory, 4 line screen resolution, add-on hardware

• Half a million sold over a decade

5

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Before Symbian - Psion

1989 - MC400 laptop

• 16-bit “EPOC” Operating System - multi tasking, GUI, built-in apps

• Exceptional power management, screen technology

1991 - Series 3, 1993 - Series 3a, 1996 Series 3c/Siena, Series 3mx

• Clam shell organisers, built in apps, OPL, up to 2MB memory

• Built on EPOC

• Over 1.5 million units sold

1997 - Series 5

• 32 bit OS “EPOC32” (EPOC -> EPOC16 -> SIBO)

• Slide out QWERTY keyboard, touch screen, 4MB/8MB

• Implemented using C++

http://3lib.ukonline.co.uk/historyofpsion.htm

6

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian History1998 - Symbian was formed by Psion, Nokia, Ericsson and Motorola

• Matsushita joined in 1999, Sony Ericsson & Siemens in 2002, Samsung in 2003

• Motorola share in Symbian were sold back in 2003

• Psion shares were sold back in 2004

• EPOC32 was later renamed to Symbian OS

First Symbian OS phone was released in 2000 (Ericsson R380)

• Nokia 9210 Communicator released in 2001 - this was the first “open” phone.

2.5G phones followed in early 2002

• Nokia 7650

3G phones in December 2002

• 3G FOMA F2051 from Fujitsu

7

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian HistoryOther notable milestones

• EKA2 (EPOC Kernel Architecture 2) was announced in 2004

• Secure Platform introduced in Symbian OS v9 in 2005

• Symbian OS opens to non-mobile developer community through P.I.P.S in 2007

P.I.P.S stands for “P.I.P.S Is POSIX on Symbian OS” - a POSIX compliant API

8

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OwnershipAs of the Summer 2007 Symbian shareholders:

9

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Some Stats

As of 31 March 2007:

• A growing company - 15.9m Symbian smartphones shipped by licensees in Q1 2007, a 35.9% increase on Q1 2006 (Q1 2006 - 11.7m)

• 126 million cumulative Symbian smartphone unit shipments

• 20 million cumulative Symbian smartphone unit shipments milestone reached in Japan since first 3G Symbian model shipped in 2003 all models shipped since have been 3G

• The demand for Symbian OS C++ developers outstrips the supply!

• More stats at http://www.symbian.com/about/fastfacts/fastfacts.html

10

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OS C++

11

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OS C++

Symbian OS C++ is referred to as “the C++ domain specific dialect and accompanying frameworks that is used to build Symbian OS and the software that runs on it”

12

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Evolution of Symbian C++

Symbian OS design and C++ considerations were driven by factors such as:

• Power sources (battery lifetimes)

• User responsiveness

• “Always on” nature of mobile devices

• Limited resources (RAM, ROM)

• Re-use and customization through frameworks.

• Reliable data storage

• Openness

13

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Evolution of Symbian C++

C++ for Symbian OS was also influenced by the point in time at which the OS was developed:

• In 1994 - C++ was still evolving

• It had not yet been standardized

This affected the take-up of some of its later features:

• Templates

• Exceptions

• Namespaces

• New casts

• Boolean types

• Some were not supported by the tool chain or were immature.

14

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Evolution of Symbian C++

Idioms were invented to fix omissions e.g.

• Leaves

• The cleanup stack

• Descriptors

Certain patterns of use were not adopted as C++ was explicitly intended as a general purpose systems language

• It was not optimized for small, low memory and low power devices

15

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Common Paradigms

Common Symbian OS paradigms

• Multithreading and pre-emptive multitasking

• Lightweight micro-kernel OS design

• Client-Server, session based IPC (among other mechanisms)

• Asynchronous services, Active Objects

• Cleanup Stack, Leaves, Traps for exception handling

• Re-usable frameworks for apps, middleware, GUIs

• Descriptors

• Naming Conventions

We’ll discuss these, and more, in the course

16

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Other Language SupportSymbian OS also has support for

• Java

• Flash Lite

• Runtimes such as Python, Ruby, Visual Basic

• OPL (until v9)

Hardware

Symbian OS

Java FlashLite

Runtimes

Python Ruby

C++

Functionality and performance

Ease

of d

evel

opm

ent Java

Flash

Symbian C++

Web

PythonManaged

code

Native code

P.I.P.S.

17

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Architecture

18

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OS Architecture

Hardware

Kernel & H/W Interface

OS Services

Application Services

UI Framework

Licensee UI Platform

Licensee H/W Services

Sym

bian

OS

Symbian OS separates the UI from the engines and services allowing licensees (like Nokia) to develop their own UIs for the phones

19

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OS ArchitectureIn a little more detail

20

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OS ArchitectureOkay a little too much detail!

21

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OS Architecture

The Symbian System Model shown on the previous slide is available here

• http://developer.symbian.com/main/oslibrary/sys_models/index.jsp

Or refer to “The Symbian OS Architecture Sourcebook”

• http://developer.symbian.com/main/learning/press/

22

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

UI Platform

23

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

UI Platform

Various UI platforms run on top of Symbian OS:

• S60 from Nokia

• UIQ from UIQ Technology (part of Sony Ericsson)

• NTT DoCoMo’s MOAP user interface for the FOMA™ 3G network in Japan

The platforms provide

• The GUI and extend the applications and middleware provided by Symbian

Each platform has a different look and feel

• Designed to support the characteristics of the handsets which use it

24

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

UI and Engine Separation

Broadly speaking the Licensee builds on the UI Framework

• Provided by Symbian OS

• We will touch on some of UI programming in the examples

• But the focus of this course is on core Symbian idioms and concepts

UI Framework

ApplicationEngine

App UI & Views

EngineSupport

Base

Licensee UI

25

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Examples of UI Platforms’ Look and Feel

!"###$%&'$()*

!"#$%%$%&'()*+(,%&-.*/0

%&'+,-..)/0,+1*213313+3)#45)63+5748,+#70974+6+:6/710;+)<+37<<1/140+6..57(607)4,=+

,-(9+6,+>1376+?6551/;[email protected](607)4+>646A1/=+BC+D91*1,=+10($=+0)+<-/091/+<6(7570601+

091+E)40140+F)#45)63+./)(1,,$+G*213313+3)#45)63+5748,+(64+21+./131<7413+0)+

%&'+26,13+31:7(1,=+0)+.)740+0)+).1/60)/+./):7313+()40140+,1/:7(1,$

!"""#$%&#'()

!"#$%&'()*&+%#,'-.%&)/'&'0","&-)1!*/2$%&*+,'-./01*2*324+056*(7*8041(,2-*+,7(4)25+(,*)2,290)0,5*7.,'5+(,1#*:;010*<=>*

288-+'25+(,1*'2,*?0*.10/*21*152,/@2-(,0*7025.401*2,/*'2,*2-1(*?0*021+-6*

16,';4(,+A0/*"+5;*>+'4(1(75*B.5-((C*2,/*(5;04*)2D(4*<E@?210/*1(75"240#*$80'+7+'*

288-+'25+(,1*+,'-./0*7(4*0F2)8-0G*8;(,0?((CG*'2-0,/24G*,(5082/G*'-('CG*'2-'.-25(4G*

5(@/(G*.,+5*'(,304504G*3(+'0*40'(4/04*2,/*7+-0*)2,2904#

$%&*2-1(*'(,52+,1*2*'2-0,/24*288-+'25+(,*7(4*C008+,9*542'C*(7*288(+,5)0,51G*

)005+,91G*?+45;/261G*2,,+304124+01G*2,/*(5;04*030,51#*:;0*.104*'2,*2//G*)(/+76*

2,/*40)(30*'2-0,/24*0,54+01G*105*'2-0,/24*2-24)1*5(*40)+,/*(7*.8'()+,9*030,51G*

2,/*16,';4(,+A0*5;0*'2-0,/24*"+5;*5;0*<E*'2-0,/24#*E2-0,/24*030,51*'2,*2-1(*?0*

40'0+30/*74()*(5;04*.1041*3+2*=,74240/G*H-.05((5;*(4*$>$#*I;+-0*?4("1+,9*5;0*

'2-0,/24G*5;0*.104*'2,*10-0'5*5(*3+0"*2*/26G*2*"00CG*(4*2*)(,5;#*

:;0*8;(,0?((C*288-+'25+(,*+1*7(4*'4025+,9G*0/+5+,9*2,/*)2,29+,9*2--*'(,52'5*

+,7(4)25+(,*1.';*21*8;(,0*,.)?041*2,/*2//401101#*=,*2//+5+(,*5(*?21+'*(80425+(,1G*

2*5;.)?,2+-*+)290G*180'+2-*4+,9+,9*5(,0*(4*1800/*/+2-*'2,*?0*2552';0/*5(*5;0*'(,52'5*

'24/#*:;0*8;(,0?((C*+1*'-(10-6*+,5094250/*"+5;*(5;04*288-+'25+(,1*2,/*'2,*?0*.10/*

21*2*15245+,9*8(+,5*7(4*2--*'()).,+'25+(,*+#0#*'2--1*2,/*)01129+,9#*:;0*8;(,0?((C*

/252*'2,*?0*15(40/*?(5;*(,*/03+'0*)0)(46*(4*$=>*'24/#*J252*74()*?(5;*1(.4'01*'2,*

?0*/+18-260/*(,*5;0*12)0*8;(,0?((C*3+0"#

$%&*1.88(451*B>K*J252*$6,';4(,+A25+(,*50';,(-(96*7(4*16,';4(,+A25+(,#*$6,'>L*

3041+(,*M#N*+1*1.88(450/G*0,2?-+,9*0,/*.1041*5(*16,';4(,+A0*+,7(4)25+(,*1.';*21*

'(,52'51G*521C1*2,/*50F5.2-*,(501*"+5;*324+(.1*0@)2+-G*'2-0,/24*2,/*2//4011*?((C*

288-+'25+(,1*"+5;*2*16,';4(,+A25+(,*104304#*$6,';4(,+A25+(,*'2,*0+5;04*?0*/(,0*

-('2--6*5;4(.9;*5;0*<E*$.+50G*(4*40)(50-6*(304*5;0*2+4*OB:KP#

$%&*1.88(451*K'5+30$6,'*84(5('(-*3041+(,*N#QG*0,2?-+,9*0,/*.1041*5(*16,';4(,+A0*

'(,52'51G*'2-0,/24*2,/*0@)2+-*"+5;*2*'()825+?-0*>+'4(1(75*RF';2,90*104304#*

$6,';4(,+A25+(,*'2,*?0*/(,0*(,-6*40)(50-6*(304*5;0*2+4#

!"###$%&"$'()

!"#$%&"

*+,-%&"-./0-10232(45-6,738/,-97':-!-243/(08',;-7-4,#-</(#;,/-7==>2'732(4-3(-3+,-

=>73?(/)$-@3-8;,;-<,;3A(?A</,,0-(=,4-;(8/',-'()=(4,43;-?(/-,B',>>,43-#,<-'(43,43-

CD*EFG-'()=>274',-740-=,/?(/)74',-740-'()=>,),43;-3+,;,-#23+-244(H732(4;-24-

8;7<2>23I-3(-=/(H20,-74-,4J(I7<>,-@43,/4,3-</(#;24K-,B=,/2,4',-?(/-8;,/;$-*+,-</(#;,/-

?(/-%&"-7>;(-;8==(/3;-)(<2>,-@43,/4,3-;37407/0;5-;8'+-7;-LEF5-MD*EF-E9-740-N%%$

@4-700232(4-3(-=/(H2024K-7-;2)2>7/-8;,/-,B=,/2,4',-3(-9N-</(#;,/;5-3+,-4,#-</(#;,/-

(??,/;-70H74',0-47H2K732(4-740-O(()24K-(=32(4;$-F('732(4-(4-3+,-=7K,-'74-<,-

'+74K,0-740-)(H,0-,7;2>I$-

P;-#,>>-7;-<,24K-7-?8>>-@43,/4,3-</(#;,/5-3+,-</(#;,/-?(/-%&"-2;-?8>>I-'(4?(/)743-#23+-

3+,-QEP-R$!-/,>,7;,-0,?24232(4-?(/-</(#;24K$-P;-;8'+5-,M3,4;2<>,-DI=,/3,B3-E7/:8=-

F74K87K,-E(<2>,-9/(?2>,-CMD*EF-E9G5-LP9-N7;'7024K-%3I>,-%+,,3;-CLP9-N%%G5-

L2/,>,;;-E7/:8=-F74K87K,-CLEFG-!$.5-1NEP%'/2=3-E(<2>,-9/(?2>,-7;-#,>>-7;-

?,738/,;-;8'+-7;-98;+-C%,/H2',-@402'732(4-S-%,/H2',-F(7024KG5-L*P@-=8<>2'-?84'32(4;-

740-,4+74',0-;,'8/23I-C%%F-S-*F%G-7/,-;8==(/3,0-#23+24-3+,-</(#;,/-7==>2'732(4$-

P-;8<;,3-(?-T7H7%'/2=3-!$U-<7;,0-(4-1NEP%'/2=3-2;-7>;(-;8==(/3,0$-*+,-;8<;,3-

24'>80,;-3+,-)(;3-'())(4>I-8;,0-?84'32(4;-?(840-(4-3+,-@43,/4,3-740-,4+74',;-3+,-

@43,/4,3-</(#;24K-,B=,/2,4',$

'#()&()*+#$(,#-.

%&"-;8==(/3;-3+,-/,>27<>,-0(#4>(70-740-0,>2H,/I-(?-'(43,43$-%8==(/3-#23+-=78;,V

/,;8),-?84'32(47>23I-?(/-'(43,43-0(#4>(70-2;-2)=>,),43,0-24-3+,-</(#;,/-7==>2'732(45-

740-7>>(#;-,40A8;,/;-3(-0(#4>(70-23,);-;8'+-7;-/24K24K-3(4,;5-2)7K,;5-(=,/73(/-

>(K(;5-H20,(-'>2=;5-,3'$-P;-;8'+5-%&"-;8==(/3;-3+,-+740>24K-(?-)8>32=>,-E@E1-'(43,43-

3I=,;$-P>>-;8==(/3,0-E@E1-3I=,;-7/,-7'',;;2<>,-3+/(8K+-7-WXF5-7;-#,>>-7;-3+/(8K+-

LP9-98;+-),;;7K,;5-EE%-),;;7K,;5-,A)72>5-@4?/7/,0-740-9NA<7;,0-=/(H2;2(424K$-

*+,-7'387>-0(#4>(70-(?-'(43,43-(H,/A3+,A72/-2;-?7'2>2373,0-<I-3+,-?7'3-3+73-)(;3-0737-

3I=,;-7/,-+740>,0-02/,'3>I-<I-3+,2/-37/K,3-7==>2'732(4$-@4-700232(45-<(3+-3+,-QEP-

Y(#4>(70-;=,'2?2'732(4;-7;-#,>>-7;-N(43,43-Q<J,'3-Y,;'/2=3(/-CNQYG-7/,-;8==(/3,0-

<I-%&"$

Z/(#;,/-?(/-%&"-;8==(/3;-24;3743-'(43,43-=>7I<7':-08/24K-3+,-0(#4>(7024K-;,;;2(45-

7>>(#24K-3+,-'(43,43-3(-<,-H2,#,0-(/->2;3,4,0-3(-<,?(/,-3+,-'()=>,3,-?2>,-2;-

0(#4>(70,0-3(-3+,-0,H2',$

Nokia S60

Sony Ericsson UIQ

26

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Curriculum

27

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Prerequisites

Prerequisites for this course are:

• C++ programming

• Object Oriented Design basics

Recommend at least some background knowledge in:

• Operating Systems theory

• Basic communication protocols

28

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Curriculum

This course is based on the Symbian Academy Fundamentals of Symbian OS curriculum

• The professional qualification for Symbian OS developers is the based on this curriculum

• The Accredited Symbian Developer

• All Symbian in-house staff are expected to have this qualification

• The recommended book for this course is the “The Accredited Symbian Developer Primer: Fundamentals of Symbian OS” published by Symbian Press, 2006.

29

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Training ExercisesAvailable training types:

Test your knowledgeAnswer different types of questions, e.g. find errors in code or explain concepts.

Extend pre-written source codeA small framework has been marked with several “edit”-positions, which explain the individual tasks.

More freedom, more explanationsInstead of many small pre-defined tasks, tutorials contain more detailed explanations that help you finish the module.

The real challengeAt the end of the course, you should do a Symbian OS project, which will help you to repeat many of the basics as well as dive into more advanced topics.

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Curriculum Core SubjectsTool Chain

Symbian OS Types & Declarations

Leaves and the Cleanup Stack

Two-Phase Construction and Object Destruction

Descriptors

Dynamic Arrays

Active Objects

System Structure

Client Server

File Server, Store & Streams

Sockets

Platform Security

Binary Compatibility

31

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Tool Chain

Introduces the Symbian OS tool chain and development environment

• Build Tools

• Hardware Builds

• Installing an Application to Phone Hardware

• The Symbian OS Emulator

32

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OS Types & Declarations

Examines the fundamental Symbian OS types, naming conventions and coding style, and the usage paradigms of each basic type of Symbian OS class

• T Classes

• C Classes

• R Classes

• M Classes

• Static Classes

• Factors to Consider when Creating a Symbian OS Class

• Why Is the Symbian OS Naming Convention Important?

33

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian OS Types & Declarations

ExerciseThe goal of the first exercise is to get to know the basic data types of Symbian OS as well as the console mode of the Symbian OS emulator.

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Leaves and the Cleanup Stack

Examines the Cleanup Stack and the difference between standard C++ and Symbian OS in handling leaks and exceptions

• Leaves: Lightweight Exceptions for Symbian OS

• How to Work with Leaves

• Comparing Leaves and Panics

• What Is a TRAP?

• The Cleanup Stack

• Detecting Memory Leaks

35

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Leaves and the Cleanup Stack

ExerciseThis module provides a hands-on experience with leaves and various ways on how the Cleanup Stack can help with handling risky memory situations.

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Two-Phase Construction and Object Destruction

Examines 2-phase construction in Symbian OS, safely creating objects and avoiding memory leaks

• Two-Phase Construction

• Object Destruction

37

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

ExerciseIn this module, you will see how two-phase construction works in Symbian OS and what can happen if you do not implement it correctly.

Two-Phase Construction and Object Destruction

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Descriptors

Examines the motivation for using descriptors, how to use buffer and pointer descriptors and when to use package descriptor classes

• Features of Symbian OS Descriptors

• The Symbian OS Descriptor Classes

• The Inheritance Hierarchy of the Descriptor Classes

• Using the Descriptor APIs

• Descriptors as Function Parameters

• Correct Use of the Dynamic Descriptor Classes

• Common Inefficiencies in Descriptor Usage

• Literal Descriptors

• Descriptor Conversion

39

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Descriptors

ExerciseThe two parts of this module cover working with descriptors. Through various examples, you learn their individual differences as well as a few of the available manipulation functions.

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Dynamic Arrays

Examines the use of Symbian OS dynamic arrays in preference to standard C++ arrays, and the choice of dynamic array class depending on desired usage and characteristics of array elements

• Dynamic Arrays in Symbian OS

• RArray, RPointerArray or CArrayX?

• Array Granularities

• Array Sorting and Searching

• TFixedArray

41

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Dynamic Arrays ExerciseIn this module, you will write a class that represents a student with a name and several other details. Dynamic arrays will be used to store several students as well as to sort or find elements.

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Active Objects

Examines why Active Objects are preferred over Threads and under what conditions, and the use and implementation of simple Active Objects and their relation to the Active Scheduler

• Event-Driven Multitasking on Symbian OS

• Class CActive

• The Active Scheduler

• Canceling an Outstanding Request

• Background Tasks

• Common Problems

43

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Active Objects

ExerciseTo make the subject of active objects more interesting, this exercise is based on a small console-based action game. You will have to write two active objects that provide the game engine with input.

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

System Structure

Examines the underlying structure of the Symbian OS, including threads, processes, DLLs and memory management

• DLLs in Symbian OS

• Writable Static Data

• Executables in ROM and RAM

• Threads and Processes

• Inter-Process Communication (IPC)

• Recognizers

• Panics and Assertions

45

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Client–Server Framework

Examines the use cases of the Client / Server model within a handset, system components utilizing the model and a classic Server implementation

• The Client–Server Pattern

• Fundamentals of the Symbian OS Client–Server Framework

• Symbian OS Client–Server Classes

• Client–Server Data Transfer

• Impact of the Client–Server Framework

46

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

File Server and Streams

Examines the use of files, stores and streams for storing persistent and temporary data

• The Symbian OS File System

• Streams and Stores

47

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

ExerciseYou will create a fully working audio player application for mp3/aac/...-files based on the S60 platform. To make this work, client server communication is demonstrated through the use of the multimedia framework as well as the file server.

Client–Server FrameworkFile Server and Streams

or

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Sockets

Examines the communication services and asynchronous communication events with the socket server architecture

• Introducing Sockets

• The Symbian OS Sockets Architecture

• Using Symbian OS Sockets

49

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

SocketsExerciseInstead of some artificial data transfer over sockets, this example requires you to complete the sockets-part of a fully functional multiplayer game client. The server is a desktop application and allows many (Symbian OS) clients to connect and play a game of good old Asteroids together – or rather against each other.

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Platform Security

Examines the three core concepts of Platform Security: The Trust Model, Capabilities and Data Caging. Introduces the designing, developing and distributing software on Symbian OS v9

• The Trust Model

• Capability Model

• Data Caging

• Secure Identifier, Vendor Identifier and Unique Identifier

• Application Design for a Secure Platform

• Releasing a Secure Application on Symbian OS v9

• The Native Software Installer

51

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Compatibility

Examines binary and source compatibility along with the programming and design techniques which are required to maintain compatibility in code modules and APIs

• Levels of Compatibility

• Preventing Compatibility Breaks — What Cannot Be Changed?

• What Can Be Changed Without Breaking Compatibility?

• Best Practice — Designing to Ensure Future Compatibility

52

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Project

Several project ideas in various difficulty levels are provided with the course materials. For most projects, the recommended team size is two. To give you enough time, the topics should be distributed to the groups as soon as possible.

To finish the projects, you will have to show that you understood the basic principles of Symbian OS. Usually, it is also required to do some research on one of the many APIs offered by Symbian OS, S60 or UIQ.

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Resources

54

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Recommended Reading

C++ reference books

• Stroustrup, B. (2000) The C++ Programming Language (Special 3rd Edition), Addison-Wesley Professional

• Meyers, S. (2005) Effective C++: 55 specific ways to improve your programs and designs, 3rd

Edition, Addison Wesley

Symbian books

• Stichbury, J & Jacobs, M. (2006) The Accredited Symbian Developer Primer, John Wiley & Sons

• Jipping, M. (2007) Smartphone Operating System Concepts with Symbian OS, John Wiley & Sons

• Harrison, R. & Shackman M. (2007) Symbian OS C++ for Mobile Phones Volume 3, John Wiley & Sons

• Heath, C. (2006) Symbian OS Platform Security: Software development using the Symbian OS security architecture, John Wiley & Sons

• Morris, B. (2006) The Symbian OS Architecture Sourcebook: Design and evolution of a mobile phone OS, John Wiley & Sons

55

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Symbian Press Titles

For information on other Symbian Press titles visit developer.symbian.com/main/learning/press

56

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Regional Books

Symbian Press books translated into Chinese (PT Press)• http://www.ptpress.com.cn/

Symbian Press books in India• http://www.wileyindia.com/

Symbian Press books in Japanese• http://developer.symbian.com/main/learning/press/translated/japanese.jsp

57

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Useful Links

Symbian Developer Network

• http://developer.symbian.com

Symbian Academy• http://developer.symbian.com/main/academy/

Developer Tools and SDKs• http://developer.symbian.com/main/tools/

Forum Nokia for Universities• http://forum.nokia.com/main/forum_nokia_for_universities/index.html

58

IntroductionFundamentals of Symbian OS

Copyright © 2001-2007 Symbian Software Ltd.

Good Luck and Have Fun!

60