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) |
|
|
1 | (2) |
|
|
3 | (1) |
|
|
4 | (2) |
|
|
6 | (1) |
|
|
7 | (4) |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
Leaves: Symbian OS Exceptions |
|
|
13 | (16) |
|
|
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) |
|
|
26 | (1) |
|
|
27 | (2) |
|
|
29 | (20) |
|
|
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) |
|
|
46 | (1) |
|
An Incidental Note on the Use of Casts |
|
|
46 | (1) |
|
|
47 | (2) |
|
|
49 | (6) |
|
Descriptors: Symbian OS Strings |
|
|
55 | (20) |
|
Non-Modifiable Descriptors |
|
|
56 | (2) |
|
|
58 | (2) |
|
|
60 | (3) |
|
Stack-Based Buffer Descriptors |
|
|
63 | (2) |
|
Heap-Based Buffer Descriptors |
|
|
65 | (4) |
|
|
69 | (3) |
|
|
72 | (3) |
|
|
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) |
|
|
86 | (1) |
|
Useful Classes for Descriptor Manipulation |
|
|
87 | (1) |
|
|
88 | (3) |
|
Dynamic Arrays and Buffers |
|
|
91 | (20) |
|
|
92 | (5) |
|
RArray<class T> and RPointerArray<class T> |
|
|
97 | (5) |
|
Why Use RArray Instead of CArrayX? |
|
|
102 | (1) |
|
Dynamic Descriptor Arrays |
|
|
103 | (1) |
|
|
104 | (2) |
|
|
106 | (3) |
|
|
109 | (2) |
|
Event-Driven Multitasking Using Active Objects |
|
|
111 | (16) |
|
|
111 | (1) |
|
Event-Driven Multitasking |
|
|
112 | (3) |
|
Working with Active Objects |
|
|
115 | (5) |
|
|
120 | (3) |
|
Threads Without an Active Scheduler |
|
|
123 | (1) |
|
Application Code and Active Objects |
|
|
123 | (1) |
|
|
124 | (3) |
|
Active Objects under the Hood |
|
|
127 | (24) |
|
|
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) |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
138 | (5) |
|
|
143 | (3) |
|
|
146 | (2) |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
150 | (1) |
|
Symbian OS Threads and Processes |
|
|
151 | (16) |
|
|
152 | (3) |
|
|
155 | (2) |
|
Stopping a Running Thread |
|
|
157 | (5) |
|
Inter-Thread Data Transfer |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
164 | (2) |
|
|
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) |
|
|
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) |
|
|
186 | (1) |
|
|
187 | (2) |
|
The Client--Server Framework in Practice |
|
|
189 | (28) |
|
Client--Server Request Codes |
|
|
190 | (1) |
|
|
191 | (7) |
|
Starting the Server and Connecting to It from the Client |
|
|
198 | (5) |
|
|
203 | (2) |
|
|
205 | (8) |
|
|
213 | (1) |
|
|
214 | (1) |
|
|
214 | (3) |
|
|
217 | (16) |
|
|
217 | (1) |
|
|
218 | (2) |
|
|
220 | (3) |
|
|
223 | (3) |
|
|
226 | (1) |
|
|
226 | (2) |
|
|
228 | (2) |
|
|
230 | (3) |
|
|
233 | (14) |
|
|
233 | (3) |
|
Features of an ECOM Interface |
|
|
236 | (1) |
|
|
237 | (3) |
|
Implementing an ECOM Interface |
|
|
240 | (2) |
|
|
242 | (3) |
|
|
245 | (1) |
|
|
246 | (1) |
|
|
247 | (8) |
|
|
248 | (1) |
|
|
249 | (1) |
|
Symbian OS Panic Categories |
|
|
250 | (1) |
|
|
251 | (2) |
|
Faults, Leaves and Panics |
|
|
253 | (1) |
|
|
253 | (2) |
|
Bug Detection Using Assertions |
|
|
255 | (10) |
|
|
256 | (5) |
|
|
261 | (2) |
|
|
263 | (2) |
|
Debug Macros and Test Classes |
|
|
265 | (12) |
|
|
265 | (5) |
|
|
270 | (3) |
|
Console Tests Using RTest |
|
|
273 | (3) |
|
|
276 | (1) |
|
|
277 | (16) |
|
Forward and Backward Compatibility |
|
|
278 | (1) |
|
|
279 | (1) |
|
|
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) |
|
|
292 | (1) |
|
|
293 | (6) |
|
Expose a Comprehensive and Comprehensible API |
|
|
299 | (18) |
|
|
300 | (1) |
|
|
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) |
|
|
315 | (2) |
|
|
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) |
|
|
330 | (1) |
|
|
331 | (2) |
Appendix Code Checklist |
|
333 | (6) |
Glossary |
|
339 | (8) |
Bibliography and Online Resources |
|
347 | (4) |
Index |
|
351 | |