Index

abld 36 AVRecorder 270 with 40 abld freeze 226 IDE 32 abort() 74, 400, 402 MFC 214 abstract base class 46 Base Class (BCL) Mutex 388–391 active objects 31, 94–99, 237 C classes 53, 79, 85, 87 381 battery 10, 14, 43 C Wrappers 339–340 Active Template Library Bazaar 392–393 CActive 95, 97 (ATL) 134 BCL. See Base Class Library CActiveScheduler Adapter pattern 384 Binary Runtime Environment Add() 95–96 Alerts API 166 for Wireless Start() 141 AllFiles 130, 349, 355 (BREW) 253–254 CAknAppUi 155 Alloc() 64 Blackberry 11, 17–18 calendar 186, 251 ALLOC panic 45–46, 399 bld.inf 35, 36, 38, callbacks 147, 324, 381 AllocL() 64 115–116, 186, camera 165, 185, 253 All-Tcb 117 211, 292, 293, 316 Cancel() 98 Android 11, 12, 17–18, bldmake 36, 211 capabilities 228, 348–355 244–253, Bluetooth 127, 138 Android 369–371 369–371 Boost 107, 197 trusted applications ANSI C++ standardCOPYRIGHTED 386 BREW. See Binary MATERIAL Runtime 362–363 68–71, 103–131 Environment for untrusted applications applications, portable Wireless 363–364 375–396 CAPABILITY 37, 355 ARM RealView Compilation capitalization guidelines Tools (RVCT) 34, C 21, 28, 40, 103–131, 50–51 112 214 Carbide.c++ 32, 38, 72, ATL See Active Template C++ 21, 28, 31, 50, 59, 147, 211, 214, Library 61–66, 103–131, 368–369 auto_ptr 85, 143, 144 CArray 58 391–392 abstract base class 46 CArrayFixFlat 58 412 INDEX

CArrayFixSeg 58 Common Language Runtime DLL. See dynamic link CArrayVarSeg 58 (CLR) 236 library CArrayXSeg 58 compilers 34, 39–40, Document Object Model catch 72 318–322 (DOM) 184 CBase 53, 54, 82, Component Object Model DOM. See Document 100–101, 230 (COM) 230–233 Object Model CBluetoothSocket 138 Compressed Audio API Draw() 150 CCalEntry 138 165 DrawNow() 153 CCirBuf 59 COM:X 126 DRM 349, 355 CCoeControl 147, 215 Concurrent Version System dynamic link library (DLL) CConsoleBase 144–145 (CVS) 392 37, 40–41, 109, CContactDatabase 138 configuration management 352–353 CContactItem 138 392–395 COM 230 CEikConsoleScreen configure 35, 307 MFC 229 144–145 const char* 257–258 209 certificates 233–234, Container 197 RVCT 112 359–366 CountComponent- Windows 226 character size 60 Controls() Windows Mobile 234 CHeartbeat 142 149 WSD 99–100, 111, circular buffers 59 CPeriodic 142 343–345 _cplusplus classes 40 CPolicyServer API design 382–384 352 Createpackage E32Main() 109, 246, CActive 95 286 CreateWindowEx() 248, 334 capitalization 50 208 CSendAPPUi E32USER-CBase 46 92 descriptors 61–66 138, 139 ctime 277 E32USER-CBase 71 77 naming 51–55 CTimer 142 E32USER-CBASE 90 92 cleanup stack 78–86, 393, CurrentTrust() 234 Eclipse Public License (EPL) 400 27 Check() CVS. See Concurrent 81 ECOM. See Epoc PopAndDestroy Version System Component Object (test) 80 Model PushL(TAny*) 82–83 data caging 130, 357–359 ELeave 73, 75–76 PushL(TClean- data types 41, 386–387 EPL. See Eclipse Public upItem) 84 databases 205, 222–223, License CleanupClosePushL() 253 Epoc Component Object 85 DBMS 205, 358 Model (ECOM) Close() 54, 79, 84, 85 dependencies 30, 40, 381 230–233 CLR. See Common DEPLOYMENT 286 EPOCALLOWDLLDATA 100 Language Runtime descriptors 59–60, 68–71 EPOCHEAPSIZE 123 CLSI. See Local System classes 61–66 epocheapsize 42 Interface class function parameters epocstacksize 42, 92 CMdaAudioInputStream 66–68 errno 128, 343 154 P.I.P.S. 124 error handling 71–93, Cocoa 135, 261–266, destructors 85, 90, 97–98, 128, 268 98–100, 143 142–144 code signing 227, digital signatures 359–361 eshell 119–120 359–361 DirectX 136, 203 EventReady() 303 COM. See Component DispatchMessage() exceptions 71–78, 383 Object Model 216 C++ 74 INDEX 413

floating points 198 GetUserDefaultUI- HOME 337 trap handler 85 Language API HSPA. See high-speed EXE. See executables 229 packet access exec 124, 197, 265 Git 393 HTC Dream 245 executables (EXE) 109, glib 106, 334 HTTP 252, 263 118, 350–352 glue code 109, 142, hybrid code 133–157 trusted applications 362 334–335 Windows 226 GNOME Mobile and exit() 335 Embedded 12 IAPs. See Internet Access Exiv2 311, 316–318, GNU Public License (GPL) Points 320–322 27, 135, 312 IDE. See integrated Expat 311, 315–316, Google 11, 12, 17–18, development 318–319 245. See also environment EXPORT_C 40–41, 111, Android IDispatch 221 GPL. See GNU Public 112, 119 IDL. See interface definition License extensions 185–186, language GPS 6, 14, 309–331 281–286 Images API 164 extern Net60 Mobility 111, 140, 298 ImageView 247 extern "C" Framework 236 40 IMEI 366 selective availability 8 IMPORT_C 40–41, 111, graphical user interface 112, 119 fabs() 153 (GUI) 37, 78, indirection layers 378–380 Fac¸ade pattern 384–385 379–380 Input API 167 FCL. See Framework Class graphics 14, 162 input method editors 221 Library GROUP 126 int 57 FIFOs 124, 126 GSensor 282–284 integrated development File Table 341–342 GSM 3, 9, 166, 193, 194, float 56 252, 366 environment (IDE) floating point 56, 129, GStreamer 137 Build 39 198, 386–387 GTK+ 13, 135, 146–147, C++ 32 Flush() 144 203 SIS 39 fopen() 144 GUI. See graphical user Windows 210–211 Intent FOPEN_MAX 121 interface 246 IntentFilter fork 23, 124, 197 Guitune application 247 Framework Class Library 145–157 interface definition language (FCL) 237 (IDL) 221, 230 free() 123, 402 interleaving 129, 144 FreeBSD 335 HandleCommandL() 155 Internet Access Points (IAPs) functions 41, 381–382 HandleCompletionL() 127, 185 C 51 97 inter-process capitalization 50 HandleEventL() 97 communication L 51 HandleResource- (IPC) 198–199, fwrite() 144 Change() 154 223–226 HBufC 64, 67, 82 inter- communication HBufC* 213, 219 (ITC) 223–226 Garden 301 heap 75–76, 122, I/O APIs 251, 261–262 GCC-E 34, 226, 297, 298 340–341, ioctl() 127 Geospatial Data Abstraction 399–407 IOStreams 107, 197 Library (GDAL) high-speed packet access IPC. See inter-process 289, 300 (HSPA) 14 communication 414 INDEX

IPC server 338–339 libssl 196, 334 Mercurial 393 iPhone 11, 14, 18–19, libtiff 297, 298 message type modules 254–270, LiMo Foundation 12–13, (MTMs) 139 255–256 17–18, 193–195 messaging 139, 185, 252 security 371–372 linked lists 59 meta object compiler (MOC) UI 266–269 11–13, 17, 32, 180, 183, 256 UIKit 135 195–198, 204 MFC. See Microsoft ISO 14882 386 database 205 Foundation Classes ITC. See inter-thread security 204–205 Microsoft Compact communication UI 202–203 Framework 239 Iterator 197 Linux Phone Standards Microsoft Foundation (LiPS) 12 Classes (MFC) LiPS. See Linux Phone 134, 214, 216 JSON-C 311, 316, Standards MID. See mobile 319–320 literal descriptors 65–66 information device LoadString() 229 middleware 289–307 Local System Interface class MiniWeb 311 KERN-EXEC 46 92 (CLSI) 340 mkdir() 121 KErrAccessDenied LocalServices 129, mmap() 121, 317 352, 354 349, 364, 365 MMF 36–37 KErrNone 77, 97 Location 349, 354, 363, MMP KErrNotSupported 111 365, 367 bld.inf 316 KErrXX error 73 Location API 192 GDAL 289, 290–300 Keypad Capabilities API long 386 GUI 37 167 long int 56 libcrt0.lib 110 key_t 125 MACRO 300 KNullDesC 65 SYSTEMINCLUDE 116 M classes 54 MMP_RULES 286 MACRO 286, 300 MOAP(S) 11, 33–34 _L 65–66 Maemo 12, 13, 191–192, Mobile and Internet Linux _LEAVE_EQUALS_THROW_ 371 Project (Moblin) 74 main() 109, 264, 334, 12, 192–193 leaves 45, 71–78 335 mobile information device cleanup stack 84–86 MaiscBufferCopied() (MID) 191 PushL() 80 149 Mobile Linux 11, LeaveScan 50, 72 makekeys 368 189–206, 190 Length() 62–63, 69–70 malloc() 122–123, 398 Mobile to Market 234 Li, Harry 35 Math class 55 Moblin. See Mobile and LIB. See MaxLength() 62, 69–70 Internet Linux libc 104, 115, 121, 124, MDI. See multiple document Project 196, 333, 335 interface MOC. See meta object libcrypt 196, 333 MEikCommandObserver compiler libcrypto 196, 333 216 Model–View–Controller libdl 129, 196, 333, 336 Mem class 55 (MVC) 268, 385 libglib 196 memory management 60, modular code 378 libm 115, 129, 196, 333, 71–93 Mosaic 8 336 limitations and Motorola 9, 10 libpthread 105, 114, workarounds mousePressEvent() 196, 198, 333 122–124 268 INDEX 415

MTMs. See message type NSOperationQueue Openmoko 12, 13, 192, modules 265–266 371 multimedia 136–138, NSOutputStream 261, OpenSL 113–114 164–166, 204 262 OpenVG 174–175 multiple document interface NSScanner 259 operator[] 58 (MDI) 221 NSSortDescriptor 261 operator new 73, 75 munmap() 317 NSStream 261 out-of-memory (OOM) 72, Mutex 388–391 NSString 261 123, 397–408 MVC. See Model–View– NSUrlCache 263 Controller NSUrlConnection 262–263 paintEvent() 268 NSUrlCredential- Palm OS 11 namespace clashes 381 Storage 263 PAMP. See Personal naming guidelines 51–52 NTT DoCoMo 11, 33–34 Apache-MySQL- National Marine Electronics PHP Association Panic() 115 (NMEA) 314 Objective-C 135, 256 panics 91–93. See also native application 133 OHA. See Open Handset specific panics .NET 210, 239–240 Alliance parameters 51, 381–382 .NET Compact Framework onCreate() 247 patterns 384–385 236 OOM. See out-of-memory payment systems 16 Net60 Mobility Framework open() 121, 126 PCM. See pulse code 236 Open C 106–107, modulation Netscape Communications 120–131 perm 121, 126 Corporation 8 libpthread 198 Personal Apache-MySQL- networking 262–264 Linux 196–198 PHP (PAMP) limitations and S60 106 189–190, 205 workarounds Open C++ 107–108 Phonon 137, 185 126–127 Open C/C++ 21, 28 PIM 138–139 Linux 204 descriptors 60 mapping 251 mapping 252 interleaving 144 Net60 Mobility NetworkServices 129, Linux 195–196 Framework 236 349, 350–353, Microsoft Windows P.I.P.S. 21, 104–105, 355, 364, 365, 367 207–209 333–346 New File Service Client API plug-ins 161 heap 340–341 313 RGA 160–161 limitations and new(ELeave) 75 STL 55 workarounds NewL() 88–89 Open Handset Alliance 120–131 NMEA. See National Marine (OHA) 12, S60 106 Electronics 244–253 timers 127–128 Association Open Signed 39, 366–368 UIQ 106 Nokia 9–12, 21, 33–34 Open Signed Offline WSD 333 Open C 106–107 367–368 PKI. See public key Sensor Plug-in 282 Open Signed Online infrastructure NSArray 259 366–367 Playback Rate 114 NSInputStream 261, OpenGL ES 136, platform independence 262 171–174, 236 387–388 NSMutableString 257 OpenKODE 169–176, 203 Pls() 343–344 NSObject 257 OpenMAX 137, 175–176 plug-ins 33–34, 161 416 INDEX poll() 141 #pragma 40 QObjectPrivate 283 Pop() 81, 88–89 prefixes 51–52 Q_OS_MAC 280 PopAndDestroy() 81, private inheritance 391 Q_OS_SYMBIAN 277, 304 84 problems 41 Q_OS_UNIX 277, 280 popen() 124, 198 process identity 356–357 QPainter 181 portable code 375–396 processing power 42 QReadWriteLock 265 Portable PROT_EXEC 121, 122 QScriptEngine 183 Interface (POSIX) ProtServ 366, 367 QSoftMenuBar 280 21, 28, 103–131 P&S. See publish and QSslSocket 264 porting 2 subscribe QString 180, 257–259 analyzing code 28 pthreads 114, 123, 142, QSvgWidget 184 applications 216–220, 144, 198, 345 13, 21, 135, 177–187, 271–288, Ptr() 63, 149 271–286 309–331 public key infrastructure Cocoa 256–266 build files 115–118 (PKI) 360–361 descriptors 60 build process 35–36 publish and subscribe (P&S) HTTP 263 build system 34–35 248, 359 I/O APIs 261–262 compiling 39–41 Publisher ID 364–365 networking 262–264 complex applications pulse code modulation S60 301–304 309–331 (PCM) 115, 146 threads 264–266 debugging 45–46 PushL() 80, 88–89 views 267–269 development PWD 335 widgets 267–269 QtCore 178–181 environment Pyramid 301 QTcpSocket 262, 264 31–34 Python 298–299, 393 QTextStream 259 iPhone 255–256 QThreadPool 265 Microsoft Windows QThread::run() 264 207–241 QAbstractListModel QThreadStorage 265 middleware 289–307 268 QToolBar 280 Mobile Linux 189–206 QAbstractSocket 264 QTOPIA_PHONE 278–279 .NET 239–240 QAuthenticator 263 QTreeView 268 Objective-C 256 QBuffer 262 QtScript 182–183 packing 38–39 QChar 259 QtSql 183 QCharRef process 23–47 259 QtSvg 183–184 projects 24–27 QDataStream 262 QtWebKit 184 re-architecting 29–31 Q_DECLARE_PRIVATE QtXml 184–185 re-integrating 46–47 283 QValidator 328 running and testing QFile 262 QWidget 181, 267–268 44–45 QIODevice 262 Q_WS_S60 304 simple applications QLineEdit 328 271–288 QListView 268 system requirements 31 QMainWindow 267 R classes 53–54, 79, 85 UI 266–269 qmake 292, 293, 305–306 RAllocator 402 porting layer 30–31 QMenuBar 280 RAM 42, 398 Position() 150 QModelIndex 268 Raptor 34 POSIX. See Portable QNetworkAccess- RArray 57–58 Operating System Manager R_AVKON_SOFTKEYS Interface 262–263 _EXIT 155 posix_spawn() 124 QObject 179, 180, 184, RBase 53 PowerMgmt 366, 367 257, 265 RBuf 64–65, 67, 149 INDEX 417

RChunks 338–339 RReadStream 216 semget() 125 RDA. See Remote Device RSendAs 139 Send() 200–201 Access RSendAsMessage 139 services 249 RDbNamedDatabase 358 RSessionBase 95 SetActive() 97 RDF. See resource RSockServ 340 SetContainer- description RSqlDatabase 359 WindowL() framework RThread 122, 123, 142, 215 ReadDeviceData 349, 144 setDefault() 280 366, 367 RTimer 127 setgid() 121 ReadUserData 129, 349, RunError() 97–98 SetLength() 70 363, 367 RunL() 97, 141 SetMax() 70 real-time graphics and audio runtime_error 119 setpgid() 121 (RGA) 60, 136, RVCT. See ARM RealView SetPls() 345 137, 159–168 Compilation Tools; setsockopt() 127 Realview toolchain (RVCT) Realview toolchain setuid() 121 226 RWindow 215 setvbuf() 122 Receive() 201–202 RWindowGroup 303 shmget() 125, 339 RWriteStream Redland 397–408 216 short int 56 RWsSession RedrawReady() 303 216, 304 SID. See Secure ID registry 221–222 SIGALRM 127 Release() 79, 84 SIGKILL 342 S60 60, 106, 161–162, Remote Device Access SIGKILL/SIGQUIT 125 301–304 (RDA) 246 signed char 56 Samsung GSensor removable media data signing 233–236 282–284 caging 358 SIGSTOP 342 SAX. See Simple API for XML requests 96–97 Simple API for XML (SAX) scalable vector graphics Research in Motion (RIM) 184 (SVG) 183–184 Blackberry, 11, scope-resolution operator Simple DirectMedia Layer 17–18 55 (SDL) 168–169 resource description screen resolution 43–44 SIS 38, 39, 126, 229 framework (RDF) SDKs 31, 33–34 Carbide.c++ 368–369 397 C 214 Open Signed Online revision-control systems Symbian Developer 366–367 392–393 Library 41 Size() 69, 150 RFastLock 224 Windows 210–214 SizeChanged() 149 RFCOMM 127 SDL. See Simple sizeHint() 268 RFile 54, 60, 144 DirectMedia Layer sockets 124, 127, 223 RFs::NotifyChange() Secure ID (SID) 130, 356 soft input panels 221 304 security 117–118, SoundStretch 115–120 RGA. See real-time graphics 129–131, SoundTouch 36, 37, and audio 347–373 115–120 RHandle 213 Android 369–371 SourceForge 190 RHashMap 59 iPhone 371–372 SPARQL 397 RHeap 122–123, 399 Linux 204–205 sparse files 122 RIM. See Research in Motion Maemo 371 SQL 183, 359 RMessagePtr2 92, 351 Openmoko 371 Standard Template Library RPointerArray 57, 58 Windows 210 (STL) 55, RProcess 234 Windows Mobile 234, 107–108 RProperty 248, 359 372–373 static library (LIB) 109 418 INDEX st_atime 121 Target-Action 268 TRect 213 std::bad_alloc 76 TBool 57, 213 TRequestStatus 93, 96, stdcpp 333 TBuf 63–64, 67, 149 127, 142 STDDLL 40–41, 112–113, TCB. See Trusted Computing TRgb 150 117, 336 Base True Type fonts (TTF) 164 stderr 45, 119–120, TCB 117, 350, 355 trusted applications 121, 334, 338 TCHAR 219, 322 362–366 STDEXE 112–113, 142, TCP/IP 6, 8, 223 Trusted Computing Base 336 TDblQue 59 (TCB) 350, 355 stdin 121, 334, 337 TDblQueLink 59 TrustedUI 366, 367 stdio 126, 335, 337–338 TDD. See test-driven try...catch 143, 391 stdioserver 120, 126 development TSecurityPolicy 359 STDLIB 112–113 TDes 61–63, 67 TTF. See True Type fonts STDLIBS-INIT panic TDesC::Ptr()switch, TUint 56, 61, 213 123 63 two-phase construction stdout 45, 121, 126, telephony 139, 185, 251 86–91 334, 337 Temple 301 typedef 64, 386 std::runtime_error Tempo 114 TZ 335 115 test-driven development STL. See Standard Template (TDD) 44 Library text editor 32 Ubuntu Mobile 12 STLport 110, 293, 296 Themes API 167 _UHEAP_MARKEND 399 st_mtime 121 this 382 _UHEAP_SETFAIL 72 strcpy() 343 thread local storage (TLS) UI. See user interface string handling 59–60 100, 335, 403 UIAccelerometer 270 StringLoader 229 threads uic 305 struct 52, 82, 343–345 active objects 94–95 UID 37, 117, 228 Subversion 392 Cocoa 264–266 EXE 118 suffixes 51–52 ECOM 230 Symbian Signed 38 SurroundingsDD 366, heaps 122 UID3 356 367 Qt 264–266 UIImagePicker 270 Suspend() 128 timestamps 121 UIKit 135, 267–269 SVG. See scalable vector TInt 56, 61, 92 UIQ 10, 33–34, 106 graphics TLeave 76 UITableView 268 SwEvent 161, 366, 367 TLitC 67 unsigned int 56 Symbian Developer Library TLocale 335 untrusted applications 41, 57 TLS. See thread local storage 363–364 Symbian Signed 234–235 TMPDIR 335 USER 11 certificates 364–366 panic 60, 64, TPoint 150, 213 Open Signed 39 92 TPriority USER 42 testing 398 95 panic 82, 90 TPtr USER 129 UID 38 63, 67, 153 panic 57 _SYMBIAN32_ 46, 294 Trac 300 user interface (UI) 33–34, symlink() 122 transient server 337 134–136, TranslateMessage() system() 124 266–269. See also SYSTEMINCLUDE 116 216 graphical user trap handlers 45, 72, 73, interface 76–78, 85, 90, DLL 29 T classes 52, 79 110, 143, 285 engine 29 TAny 56–57, 213 TReal 56 fragmentation 10–12 INDEX 419

games 136 Virtual Code API 168 WINSCW 34 Linux 202–203 virtual memory 398 _WINSCW_ 284 reunification 12–13 Visual Studio 32, WndProc() 314 Windows Mobile 211–212, 237 World Wide Web 238–239 vsnprintf() 319 Consortium (W3C) UserEnvironment 154, 397 349, 364, 365 writeable static data (WSD) User::Free() 82, 84 wait() 124, 198 99–100, 111, User::Leave() 73, 74 waitpid() 124, 198 343–345 User::LeaveIfError() wcelibex 312 constructors 99 73 wchar 197 P.I.P.S. 333–334, User::Panic() 92 wchar_t 320 343–346 User::ResetIn- widgets 267–269 WriteDeviceData 349, activityTime() Win32 293, 294, 295, 366, 367 155 297, 299, 318 WriteUserData 129, User::SetCritical() Windows 7, 207–241 349, 363, 367 91 Windows Mobile 11, WSD. See writeable static User::SwitchHeap() 18–19, 211–212, data 123 223–226, 234 utility APIs 166–168 debugging 213–214 XLeaveException 74, security 234, 372–373 85, 90 UI 238–239 VARIANT 230 UIDs 228 Vendor ID (VID) 356–357 Windows Vista 31 zlib 294, 295, 296 views 267–269 Windows XP 32 Zsh 119