Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Symbian C++ Programming

Similar presentations


Presentation on theme: "Introduction to Symbian C++ Programming"— Presentation transcript:

1 Introduction to Symbian C++ Programming
Huang, Chi-Chia Based on Symbian OS Basics Workbook 3.1 Context-Aware Group, Intelligent Agents Lab, NTU

2 Context-Aware Group, Intelligent Agents Lab
Outline Setting up development environment Basic concept of Symbian C++ Porting to Cell phone Context-Aware Group, Intelligent Agents Lab

3 Development Environment
Java runtime environment Carbide C++ Download from Forum.Nokia.com Account needed ActivePerl Active Perl build 631 SDK S60 3rd Edition, Feature Pack 1 Context-Aware Group, Intelligent Agents Lab

4 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

5 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

6 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

7 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

8 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

9 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

10 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

11 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

12 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

13 Context-Aware Group, Intelligent Agents Lab
Carbide C++ Context-Aware Group, Intelligent Agents Lab

14 Context-Aware Group, Intelligent Agents Lab
Emulator Context-Aware Group, Intelligent Agents Lab

15 Basic Concept of Symbian C++
Stack and Heap Leaves Two Phase construction Active Object Context-Aware Group, Intelligent Agents Lab

16 Context-Aware Group, Intelligent Agents Lab
Stack and Heap Stack Object are delete automatically Default size is 8kb Heap Object must deleted by programmer using delete Example Context-Aware Group, Intelligent Agents Lab

17 Context-Aware Group, Intelligent Agents Lab
Leaves Leaves are used instead of C++ exception When there is a resource failure, the code “leave” The new operator has been overload to leave if insufficient memory is available Use new (ELeave) Functions that can leave should end in “L” Context-Aware Group, Intelligent Agents Lab

18 Two Phase Construction
C++ constructor must never leave as the destructor will not be called Context-Aware Group, Intelligent Agents Lab

19 Context-Aware Group, Intelligent Agents Lab
Active Object Events are scheduled by the active scheduler Events are handled by active object Each application has an active scheduler The active scheduler runs in a loop in the application’s main loop Active objects have a: TRequestStatus bas class member, iStatus, that is passed inro asynchronous functions RunL() Function that is called when the action completes DoCancel() function that is called when the action is cancelled Context-Aware Group, Intelligent Agents Lab

20 Context-Aware Group, Intelligent Agents Lab

21 Context-Aware Group, Intelligent Agents Lab
Active Object Context-Aware Group, Intelligent Agents Lab

22 Context-Aware Group, Intelligent Agents Lab
Porting to Cell Phone Context-Aware Group, Intelligent Agents Lab

23 Context-Aware Group, Intelligent Agents Lab
Porting to Cell Phone Context-Aware Group, Intelligent Agents Lab

24 Context-Aware Group, Intelligent Agents Lab
Porting to Cell Phone Context-Aware Group, Intelligent Agents Lab

25 Context-Aware Group, Intelligent Agents Lab
Porting to Cell Phone Context-Aware Group, Intelligent Agents Lab

26 Context-Aware Group, Intelligent Agents Lab
Porting to Cell Phone Context-Aware Group, Intelligent Agents Lab

27 Context-Aware Group, Intelligent Agents Lab
Porting to Cell Phone Symbian Signed Context-Aware Group, Intelligent Agents Lab


Download ppt "Introduction to Symbian C++ Programming"

Similar presentations


Ads by Google