
By Jo Stichbury
Fundamental Types
T Classes
C Classes
R Classes
M Classes
Static Classes
Leaving Functions
Heap Allocation Using new(ELeave)
Constructors and Destructors
Working with Leaving Functions
Trapping a Leave Using TRAP and TRAPD
LeaveScan
Using the Cleanup Stack
How Does the Cleanup Stack Work?
Using the Cleanup Stack with Non-CBase Classes
Using TCleanupItem for Customized Cleanup
Portability
Non-Modifiable Descriptors
Modifiable Descriptors
Pointer Descriptors
Stack-Based Buffer Descriptors
Heap-Based Buffer Descriptors
Literal Descriptors
Descriptors as Parameters and Return Types
Common Descriptor Methods
The Use of HBufC Heap Descriptors
Externalizing and Internalizing Descriptors
The Overuse of TFileName
Useful Classes for Descriptor Manipulation
CArrayX Classes
RArray<class T> and RPointerArray<class T>
Why Use RArray Instead of CArrayX?
Dynamic Descriptor Arrays 103
Fixed-Length Arrays 104
Dynamic Buffers 106
Multitasking Basics
Event-Driven Multitasking
Working with Active Objects
Example Code
Threads Without an Active Scheduler
Application Code and Active Objects
Active Object Basics
Responsibilities of an Active Object
Responsibilities of an Asynchronous Service Provider
Responsibilities of the Active Scheduler
Starting the Active Scheduler
Nesting the Active Scheduler
Extending the Active Scheduler
Cancellation
Request Completion
State Machines
Long-Running Tasks
Class CIdle
Class CPeriodic
Common Mistakes
Class RThread
Thread Priorities
Stopping a Running Thread
Inter-Thread Data Transfer
Exception Handling
Processes
Why Have a Client–Server Framework?
How Do the Client and Server Fit Together?
How Do the Client and Server Communicate?
What Classes Does the Client–Server Framework Use?
How Do Synchronous and Asynchronous Requests Differ?
How Is a Server Started?
How Many Connections Can a Client Have?
What Happens When a Client Disconnects?
What Happens If a Client Dies?
What Happens If a Server Dies?
How Does Client–Server Communication Use Threads?
What Are the Implications of Server-Side Active Objects?
What Are the Advantages of a Local (Same-Process) Server?
What Are the Overheads of Client–Server Communication?
How Many Outstanding Requests Can a Client Make to a Server?
Can Server Functionality Be Extended?
Example Code
Client–Server Request Codes
Client Boilerplate Code
Starting the Server and Connecting to It from the Client
Server Startup Code
Server Classes
Server Shutdown
Accessing the Server
Symbian OS EXEs
Symbian OS DLLs
Writable Static Data
Thread-Local Storage
The DLL Loader
UIDs
The targettype Specifier
ECOM Architecture
Features of an ECOM Interface
Factory Methods
Implementing an ECOM Interface
Resource Files
Example Client Code
Just-In-Time Debugging
Good Panic Style
Symbian OS Panic Categories
Panicking Another Thread
Faults, Leaves and Panics
__ASSERT_DEBUG
__ASSERT_ALWAYS
Heap-Checking Macros
Object Invariance Macros
.3 Console Tests Using RTest
Code Checklist
Glossary
Bibliography and Online Resources