did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780470021309

Symbian OS Explained Effective C++ Programming for Smartphones

by
  • ISBN13:

    9780470021309

  • ISBN10:

    0470021306

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2005-01-04
  • Publisher: WILEY
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $69.33 Save up to $0.35
  • Buy New
    $68.98
    Add to Cart Free Shipping Icon Free Shipping

    PRINT ON DEMAND: 2-4 WEEKS. THIS ITEM CANNOT BE CANCELLED OR RETURNED.

Supplemental Materials

What is included with this book?

Summary

This book explains the key features of Symbian OS and will help you to write effective C++ code. It focuses on aspects of good C++ style that apply particularly to Symbian OS.21 items are used to target particular aspects of the operating system and provide a simple and straightforward exploration of coding fundamentals. Using example code and descriptions of best practice to deconstruct Symbian OS, the items guide you to what you should and should not do (and why), pointing out commonly-made mistakes along the way.Technologies covered include: client-server architecture descriptors and dynamic containers active objects, threads and processes leaves, cleanup stack and 2-phase construction thin templates, good API design, memory optimization, debug and test macros the ECOM plug-in framework Symbian OS Explained can be read cover-to-cover or dipped into as a reference that will improve your code style when programming with Symbian OS.

Author Biography

Jo Stichbury was educated at Magdalene College, Cambridge, where she held the Stothert Bye-Fellowship. She has an MA in Natural Sciences (Chemistry) and a PhD in the chemistry of organometallic Molybdenum complexes. After a brief spell in postdoctoral research at Imperial College, she joined Psion Software in 1997, when Symbian OS was still known fondly as EPOC32. She has worked with the operating system ever since, within the Vase, Connectivity and Security teams of Symbian, and also for Advansys, Sony Ericsson and Nokia.

As the contents of this book will reveal, Jo has a somewhat unhealthy interest in the Clangers and Greek mythology. She currently lives in Vancouver with her partner and two cats.

Table of Contents

Foreword xi
About This Book xiii
Who Is It For? xiv
How to Use This Book xiv
Notation and Code Conventions Used in This Book xv
Introduction to Symbian OS xvii
Author Biography xxi
Author's Acknowledgments xxiii
Symbian Press Acknowledgments xxv
Class Name Conventions on Symbian OS
1(12)
Fundamental Types
1(2)
T Classes
3(1)
C Classes
4(2)
R Classes
6(1)
M Classes
7(4)
Static Classes
11(1)
Buyer Beware
11(1)
Summary
12(1)
Leaves: Symbian OS Exceptions
13(16)
Leaving Functions
13(3)
Heap Allocation Using new (ELeave)
16(1)
Constructors and Destructors
17(1)
Working with Leaving Functions
18(2)
Trapping a Leave Using Trap and Trapd
20(6)
LeaveScan
26(1)
Summary
27(2)
The Cleanup Stack
29(20)
Using the Cleanup Stack
31(4)
How Does the Cleanup Stack Work?
35(3)
Using the Cleanup Stack with Non-CBase Classes
38(6)
Using TCleanupItem for Customized Cleanup
44(2)
Portability
46(1)
An Incidental Note on the Use of Casts
46(1)
Summary
47(2)
Two-Phase Construction
49(6)
Descriptors: Symbian OS Strings
55(20)
Non-Modifiable Descriptors
56(2)
Modifiable Descriptors
58(2)
Pointer Descriptors
60(3)
Stack-Based Buffer Descriptors
63(2)
Heap-Based Buffer Descriptors
65(4)
Literal Descriptors
69(3)
Summary
72(3)
Good Descriptor Style
75(16)
Descriptors as Parameters and Return Types
75(3)
Common Descriptor Methods
78(4)
The Use of HBufC Heap Descriptors
82(2)
Externalizing and Internalizing Descriptors
84(2)
The Overuse of TFileName
86(1)
Useful Classes for Descriptor Manipulation
87(1)
Summary
88(3)
Dynamic Arrays and Buffers
91(20)
CArrayX Classes
92(5)
RArray<class T> and RPointerArray<class T>
97(5)
Why Use RArray Instead of CArrayX?
102(1)
Dynamic Descriptor Arrays
103(1)
Fixed-Length Arrays
104(2)
Dynamic Buffers
106(3)
Summary
109(2)
Event-Driven Multitasking Using Active Objects
111(16)
Multitasking Basics
111(1)
Event-Driven Multitasking
112(3)
Working with Active Objects
115(5)
Example Code
120(3)
Threads Without an Active Scheduler
123(1)
Application Code and Active Objects
123(1)
Summary
124(3)
Active Objects under the Hood
127(24)
Active Object Basics
128(3)
Responsibilities of an Active Object
131(2)
Responsibilities of an Asynchronous Service Provider
133(1)
Responsibilities of the Active Scheduler
134(1)
Starting the Active Scheduler
135(1)
Nesting the Active Scheduler
135(1)
Extending the Active Scheduler
136(1)
Cancellation
137(1)
Request Completion
138(1)
State Machines
138(5)
Long-Running Tasks
143(3)
Class CIdle
146(2)
Class CPeriodic
148(1)
Common Mistakes
149(1)
Summary
150(1)
Symbian OS Threads and Processes
151(16)
Class RThread
152(3)
Thread Priorities
155(2)
Stopping a Running Thread
157(5)
Inter-Thread Data Transfer
162(1)
Exception Handling
163(1)
Processes
164(2)
Summary
166(1)
The Client--Server Framework in Theory
167(22)
Why Have a Client--Server Framework?
168(1)
How Do the Client and Server Fit Together?
168(2)
How Do the Client and Server Communicate?
170(1)
What Classes Does the Client--Server Framework Use?
170(9)
How Do Synchronous and Asynchronous Requests Differ?
179(1)
How Is a Server Started?
179(1)
How Many Connections Can a Client Have?
180(1)
What Happens When a Client Disconnects?
180(1)
What Happens If a Client Dies?
181(1)
What Happens If a Server Dies?
181(1)
How Does Client--Server Communication Use Threads?
181(1)
What Are the Implications of Server-Side Active Objects?
182(1)
What Are the Advantages of a Local (Same-Process) Server?
182(1)
What Are the Overheads of Client--Server Communication?
183(3)
How Many Outstanding Requests Can a Client Make to a Server?
186(1)
Can Server Functionality Be Extended?
186(1)
Example Code
186(1)
Summary
187(2)
The Client--Server Framework in Practice
189(28)
Client--Server Request Codes
190(1)
Client Boilerplate Code
191(7)
Starting the Server and Connecting to It from the Client
198(5)
Server Startup Code
203(2)
Server Classes
205(8)
Server Shutdown
213(1)
Accessing the Server
214(1)
Summary
214(3)
Binary Types
217(16)
Symbian OS EXEs
217(1)
Symbian OS DLLs
218(2)
Writable Static Data
220(3)
Thread-Local Storage
223(3)
The DLL Loader
226(1)
UIDs
226(2)
The targettype Specifier
228(2)
Summary
230(3)
ECOM
233(14)
ECOM Architecture
233(3)
Features of an ECOM Interface
236(1)
Factory Methods
237(3)
Implementing an ECOM Interface
240(2)
Resource Files
242(3)
Example Client Code
245(1)
Summary
246(1)
Panics
247(8)
Just-In-Time Debugging
248(1)
Good Panic Style
249(1)
Symbian OS Panic Categories
250(1)
Panicking Another Thread
251(2)
Faults, Leaves and Panics
253(1)
Summary
253(2)
Bug Detection Using Assertions
255(10)
__Assert_Debug
256(5)
__Assert_Always
261(2)
Summary
263(2)
Debug Macros and Test Classes
265(12)
Heap-Checking Macros
265(5)
Object Invariance Macros
270(3)
Console Tests Using RTest
273(3)
Summary
276(1)
Compatibility
277(16)
Forward and Backward Compatibility
278(1)
Source Compatibility
279(1)
Binary Compatibility
280(1)
Preventing Compatibility Breaks
281(6)
What Can I Change Without Breaking Binary Compatibility?
287(2)
Best Practice: Planning for Future Changes
289(2)
Compatibility and the Symbian OS Class Types
291(1)
Summary
292(1)
Thin Templates
293(6)
Expose a Comprehensive and Comprehensible API
299(18)
Class Layout
300(1)
Import_C and Export_C
301(2)
Parameters and Return Values
303(6)
Member Data and Functional Abstraction
309(3)
Choosing Class, Method and Parameter Names
312(2)
Compiler--Generated Functions
314(1)
Summary
315(2)
Good Code Style
317(16)
Reduce the Size of Program Code
317(3)
Use Heap Memory Carefully
320(5)
Use Stack Memory Carefully
325(3)
Eliminate Sub-Expressions to Maximize Code Efficiency
328(2)
Optimize Late
330(1)
Summary
331(2)
Appendix Code Checklist 333(6)
Glossary 339(8)
Bibliography and Online Resources 347(4)
Index 351

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program