Symbian OS Explained - Effective C++ Programming For Smartphones (2005) (779885), страница 71
Текст из файла (страница 71)
These are typically known asplug-ins and are loaded dynamically byanother program (usually a framework)using RLibrary::Load(). Compare withshared library.13, 14processThe unit of memory protection on SymbianOS. One user process may not accessanother’s memory. A process may containone or more threads.10recognizerA plug-in that examines data from a file andreturns its data (MIME) type, if recognized.13requestsemaphoreA semaphore associated with a thread,which is used to indicate the completion ofan asynchronous request.8, 9request statusAn object that indicates the completionstatus of a request, represented byTRequestStatus.8, 9ROMRead-Only Memory. This is permanentmemory that can be read but not (easily)written to.
It holds code and data that mustpersist when the phone is switched off. OnSymbian OS, it is usually identified as the Z:drive.13SDKSoftware Development Kit.segmentedbufferA dynamic buffer using segmented storage,which consists of a doubly-linked list ofsegments. Segments are added when thebuffer needs to expand and removed whenit is compressed. See also flat buffer.7344GLOSSARYTermDefinitionChapterserver callA call to the kernel in which the kernelserver thread runs on behalf of the userprogram. See this useful paper by JohnPagonis for more informationwww.symbian.com/developer/techlib/papers/userland/userland.pdf11, 12sessionThe channel of communication between aclient and a server.11, 12shared libraryA library that is loaded by the DLL loaderwhen an executable that links to it isloaded. Compare with polymorphicDLL.13static libraryOther executable code may link to thislibrary to resolve references to exportedfunctions.
Builds with a .libextension.13target hardwareA phone handset running Symbian OS(compare with emulator)10, 13thin templateAn idiom used to minimize code bloat fromthe use of standard C++ templates.19thread-localstorage (TLS)A machine word of memory that may beused to anchor information in the context ofa DLL or a thread. Used instead of writablestatic data, which is not supported forSymbian OS DLLs.13TRAP, TRAPDTrap harness macros within whichleaving code may be executed and anyleaves ”caught”.
Can be likened to acombination of try and catch in standardC++.2two-phaseconstructionAn idiom used on Symbian OS to ensurethat an object can be initialized safely usingleaving code.4UID (uniqueidentifier)A unique 32-bit number used in acompound identifier to identify an object,file type, etc. When users refer to ”UID”they often mean UID3, the identifier for aparticular program.13UID typeA set of three UIDs that, in combination,identify a Symbian OS object.13GLOSSARY345TermDefinitionChapterUID1The first UID in a compound identifier (UIDtype). It identifies the general type of aSymbian OS object and can be thought of asa system-level identifier; for exampleexecutables, DLLs and file stores are alldistinguished by UID1.13UID2The second UID in a compound identifier(UID type). It is used to distinguish within atype (e.g.
between types of DLL) and can bethought of as an interface identifier. Forexample, static interface and polymorphicinterface DLLs are distinguished by UID2.13UID3The third UID in a compound identifier(UID type). It identifies a particular subtypeand can be thought of as a project identifier(for example, UID3 may be shared by allobjects belonging to a given program,including library DLLs, framework DLLs,and all documents).13UnicodeA 16-bit character set that is used to assignunique character codes for a wide range oflanguages.5, 6Bibliography and Online ResourcesBooks on Symbian OSRichard Harrison (2003)Symbian OS C++ for Mobile PhonesPublisher: John Wiley and Sons LtdISBN: 0470856114Richard Harrison (2004)Symbian OS C++ for Mobile Phones Vol 2Publisher: John Wiley and Sons LtdISBN 0470871083Martin Tasker, Jonathan Allin, Jonathan Dixon, Mark Shackman, TimRichardson and John Forrest (2000)Professional Symbian Programming: Mobile Solutions on the EPOCPlatformPublisher: Wrox PressISBN: 186100303XLeigh Edwards and Richard Barker (2004)Developing Series 60 Applications: A Guide for Symbian OS C++DevelopersPublisher: Addison WesleyISBN: 0321227220J.
Jipping (2002)Symbian OS Communications ProgrammingPublisher: John Wiley and Sons LtdISBN: 0470849487348BIBLIOGRAPHY AND ONLINE RESOURCESBooks on C++Martin Fowler (1999)Refactoring: Improving the Design of Existing CodePublisher: Addison WesleyISBN: 0201485672Martin Fowler and Kendall Scott (2003)UML Distilled: A Brief Guide to the Standard Object ModelingPublisher: Addison WesleyISBN: 0321193687Stanley Lippman (1996)Inside the C++ Object ModelPublisher: Addison WesleyISBN: 0201834545Scott Meyers (1997)Effective C++: 50 Specific Ways to Improve Your Programs and Designs,2nd EditionPublisher: Addison WesleyISBN: 0201924889Scott Meyers (1996)More Effective C++: 35 New Ways to Improve Your Programs and DesignsPublisher: Addison WesleyISBN: 020163371XBjarne Stroustrup (2000)The C++ Programming Language, Special EditionPublisher: Addison WesleyISBN: 0201700735Herb Sutter (1999)Exceptional C++Publisher: Addison WesleyISBN: 0201615622Symbian OS on the InternetSymbian Press Websitewww.symbian.com/booksSymbian Developer Networkwww.symbian.com/developerSymbian Developer Network Support Forumswww.symbian.com/developer/public/index.htmlBIBLIOGRAPHY AND ONLINE RESOURCESJo Stichbury’s websitewww.WhoShavesTheBarber.comSony Ericsson Developer Worldhttp://developer.sonyericsson.comForum Nokiahttp://forum.nokia.com/main.html349Index3G networks xii.app files 218.cpp files 331.def files 218, 284, 287.dll files 218.fep files 218.lib files 81, 103–4, 169, 186,218, 225, 234–46, 277–92,301–3.mdl files 218–19.mmp files 228–30, 240–6.rss files 242–6__ASSERT_ALWAYS macro 58,103, 122–6, 145–6, 252,255, 261–4__ASSERT_DEBUG macro xvii,83–4, 255–64_chkstk 325_DECLARE_TEST macro 270–6_KHEAP_X macros 268_L macro 69, 71–2, 317–18_LIT macro 61–73, 102–3,121–6, 144–6, 154–5,159–61, 208, 214, 249, 252,256–7_RHEAP_X macros 268–76_S macro 69, 71–2_TEST_INVARIANT macro 258,270–6_UHEAP_CHECK macro 268–76_UHEAP_CHECKALL macro268–76_UHEAP_FAILNEXT macro265–76_UHEAP_MARK macro 214,265–76_UHEAP_MARKEND macro 214,265–76_UHEAP_RESET macro 265–76_UHEAP_SETFAIL macro265–76a prefixes, parameters xv–xviabld listing 331abstract classessee also base.
. .concepts 8–11, 78, 171, 175access specifiers, permittedchanges 287–8, 289acronyms, coding conventions xvactive objectssee also event-drivenprogramsapplication code 123–4,143–6asynchronous service 111–26,127–50, 212–13cancellations 118–19, 132–3,137–43CIdle 146–8classes 115–26, 128–31concepts 111–66, 178–80,182, 212–13constructors 115–16, 128–30,132–3cooperative qualities 149–50,151–2CPeriodic 148–9destructors 119–20, 133errors 119–26, 128–50examples 120–6, 129–50GUI applications 123–4,132–3, 149–50leaves 119, 133, 136long-running tasks 143–6mistakes 149–50pre-emption issues 116,129–31, 149–50, 151–2,182priorities 115–26, 128–33,143–9request completions 138352active objects (continued )request submissions 116–18,128–35, 150, 186responsibilities 131–5RunL 115–26, 127–50,178–215server-side active objects 182,193–215starting procedures 135,178–80state machines 138–43stray signals 120, 134–5,149–50working details 115–23,128–50active schedulersclient–server processes 178–9,204–15concepts 115–26, 127–50,151–2, 159–66, 204–15extensions 136nesting procedures 135–6responsibilities 131–2, 134–5starting procedures 135,178–80, 198–215stray signals 120, 134–5,149–50threads 123, 127–50, 151–66,204–15Add 121–6, 128–50, 159–66,293–4AddColorL 305–7AddFileSystem 186AddSession 205–15AddTaskL 95–109, 224–31After 121–6Alloc 66, 82–4, 268–76AllocL 66, 70–1, 82–4APIs see Application ProgrammingInterfacesAppend 58, 98–109, 295–7appendix 333–8AppendL 95–7, 103–9Application ProgrammingInterfaces (APIs) 4, 165–6,184, 189–215, 218–19, 250,253, 277–92, 295–7comprehensibility requirements312–16INDEXcomprehensivenessrequirements 299–316concepts 4, 165–6, 189–215,218–19, 250, 253,277–92, 295–7, 299–316application serverssee also client–server.