Contents

Foreword: Peter Molin, Chief Technology Officer, UIQ Technology ix

Foreword: Mats Blomberg, Manager, Software Strategy, Sony Ericsson CTO Office xi

About the Authors xiii

About this Book xvii

Acknowledgements xxiii

1 Background 1 1.1 A Little History 1 1.2 About UIQ Technology 1 1.3 Overview of UIQ 3 3 1.4 UIQ 3 Application Suite 5 1.5 Technologies and Features in the UIQ Platform 6 COPYRIGHTED1.6 UIQ 3 Development PlatformMATERIAL 8 1.7 UIQ Ecosystem 9

2UIQ3Basics 13 2.1 UI Configuration 13 2.2 Building Blocks and Layout Manager 26 2.3 Command Processing Framework 29 vi CONTENTS

2.4 UIQ 3 Operational Model 37 2.5 View Layout Construction 38 2.6 Changes Between UIQ 2.1 and UIQ 3 41 2.7 Changes Between UIQ 3.0 and UIQ 3.1 46 2.8 UIQ 3.2 47 3 Quick Start 51 3.1 Introduction 51 3.2 The Development Environment 52 3.3 The QuickStart Example 56 3.4 Building from the Command Line 61 3.5 Running on the Emulator 62 3.6 Packaging for the Phone 65 3.7 Using Carbide.c++ 66 4 OS Essentials 69 4.1 What this Chapter Covers 69 4.2 Symbian OS Versions 69 4.3 Symbian OS Code Conventions 71 4.4 Symbian OS Class Types 74 4.5 Leaves and the Cleanup Stack 78 4.6 Panics, Assertions and Leaves Compared 90 4.7 Construction and Destruction 93 4.8 Descriptors: Symbian OS Strings 97 4.9 Arrays 113 4.10 Templates 119 4.11 Active Objects and Threads 121 4.13 System Information 138 4.14 Platform Security 141 4.15 Acknowledgements 146 5 Understanding User Interface Components 147 5.1 Controls and Windows 147 5.2 The Control Environment 152 5.3 Views and the View Server 157 5.4 Anatomy of the Screen 159 6 List Boxes 169 6.1 ListView1 Application 169 6.2 ListView2 Application 181 7 Commands and Categories 197 7.1 Commands Overview 197 7.2 Commands1 Example Application 199 7.3 Categories 224 7.4 Further Information 231 CONTENTS vii

8 Layout Managers and Building Blocks 233 8.1 Layout Managers 233 8.2 Building Blocks 236

9 Views and Dialogs 251 9.1 Overview 251 9.2 Working with Views 253 9.3 Dialogs in UIQ 266

10 Building an Application 275 10.1 Symbian Signed 275 10.2 Starting Our Project: SignedAppPhase1 278 10.3 SignedAppPhase2 292 10.4 Building your Application for Deployment 335

11 Multimedia 341 11.1 SignedAppPhase3 341 11.2 Symbian Signed Requirements 343 11.3 Images 344 11.4 Alternative Image Support: CQikContent 355 11.5 Camera 358 11.6 Multimedia Framework (MMF) 369 11.7 Audio 369 11.8 Video 378 11.9 Tuner API 383

12 Communications 389 12.1 Communications Technologies 389 12.2 Symbian OS Communications Architecture 396 12.3 Sockets 398 12.4 Bluetooth Technology 407 12.5 HyperText Transfer Protocol 422 12.6 Messaging Architecture 431 12.7 The Send As Interface 447 12.8 Telephony 448

13 Refining Your Application 451 13.1 Localization of Application Languages 451 13.2 Internationalization 461 13.3 Application Performance 463 13.4 Other Considerations 475

14 Symbian Signed 479 14.1 Symbian Signed Options 480 14.2 Further Considerations 480 viii CONTENTS

14.3 Application Origin 481 14.4 Capabilities 482 14.5 Routes to Symbian Sign an Application 489 14.6 Procedural Impact 497 14.7 Getting Started with Symbian Signed 497 14.8 Submission and Compliance Criteria 500 14.9 Symbian Signed Test Criteria 501 14.10 Lessons Learned 512

15 Testing, Debugging and Deploying 517 15.1 Back to Basics 517 15.2 An Example of Bad Behavior 519 15.3 Testing 519 15.4 Debugging 538 15.5 Deploying 545 15.6 Summary 550

16 Porting Applications 553 16.1 Where to Start 554 16.2 The Aims of Porting 555 16.3 General Porting Considerations 556 16.4 General Porting Techniques 565 16.5 Porting from a Standard C/POSIX Environment 568 16.6 Porting from Palm OS and 570 16.7 Porting from 3rd Edition 590 16.8 Summary 612

References and Resources 613

Glossary 617

Index 631