The Symbian OS (779886), страница 59
Текст из файла (страница 59)
The cryptographic algorithms are supplied in twovariants: export-restricted (strong) and non-export-restricted (weak). Notethe change since Symbian OS v7, which provided an export-restrictedand an RSA-based library, with no non-export-restricted variant.268THE BASE SERVICES LAYERSubcomponents of the library include:• random-number server, an implementation of a random-number generator• random-number library DLL, providing an API for generation of cryptographically strong random numbers• hash library DLL, providing an API for generating cryptographichashes, supporting MD2, MD5, SHA1 and HMAC• password encryption API DLL supporting key generation from password (PKCS#5 key-derivation function) and key-based encryption anddecryption• cryptographic library, providing non-RSA cryptographic algorithms,supplied in weak and strong versions (depending on possible exportrestrictions) and implementing symmetric and asymmetric ciphers,padding schemes, and big integers.Clients link against the Cryptography Library for all functions.
Calls aretransparently forwarded to whichever version of the library implementation is present at run time (strong if present, weak if not; this is determinedat ROM build time). The weak version is limited to symmetric cryptographic operations with a maximum key size of 56 bits and asymmetriccryptographic operations with a maximum key size of 512 bits.Zip Compression LibraryPort of the zlib compression library (see relevant RFCs, for example,RFC1950) used to support compression and decompression of SIS files(Symbian native installable-application format) and Java Archive (.JAR)files, and for PNG decompression.Shutdown ServerThe Shutdown Server provides a notification service to clients to provide‘save data’ and ‘release resources’ notifications in case of switch-offor low memory and similar events, enabling a client to save data (forexample, if it is an application) and possibly also close itself (to free upresources).It consists of a client-side library that clients use to request notifications,the Shutdown Server that provides ‘save data’ notifications and whichmay be derived from to create bespoke shutdown servers (for example,Uikon implements a customized shutdown server), and a server launcher(executable) that launches the service.ARCHITECTURE269Feature RegistryThe Feature Registry (introduced in Symbian OS v9.2) provides an APIenabling run-time queries to discover whether known but optionalfeatures are supported on the particular running platform (device oremulator).A ‘feature’ is a Symbian OS or user interface variant API (or set of APIs)identified by a Feature UID.A configuration file listing features present is generated at ROM buildtime (on real devices) or provided as part of the emulator support in thelicensee SDK and is held in a Publish and Subscribe property queried bythe Query API.
A Notify API is also provided but not currently enabled,with the intention that in future releases the feature set will be updatableat run time (the Symbian OS v9.2 implementation fixes the feature set atROM build time).Text Shell and Text-Window ServerTogether, the Text Shell and the Text-Window Server that supports itmake the base layers of the operating system independent of higherlevel services (for example graphics and windowing support as well asthe GUI-based application support), allowing functional text-mode-onlybuilds of the base to support porting and other low-level development.This enables a minimal but functional system to be built for and runon new hardware as a first step to providing full hardware support.
Inprinciple, all hardware dependencies are encapsulated within the baselayers of the system; once the base port is complete, the rest of the systemcan be moved over to run on top of it without any further adaptationbeing required. In practice, the situation is a little more complex; CommsServices, in particular, are hardware-dependent at the lowest level ofhardware abstraction and interface. In practice therefore porting is atwo-stage activity: once the base port is complete, a communicationsport is needed to interface the communications stacks to the devicehardware. When the communications port is complete, the remainingsystem services can be moved over.The Text Shell provides a console-like (command-line) interface tobasic operating system services, for example navigating the file systemand launching executables, when standard graphics, application, andGUI support are not available.
The Text Shell is also available on theemulator, where it is used, for example, when developing servers that runwithout a user interface.The Text-Window Server supports the Text Shell, using a text-modedisplay driver to provide standard VGA/LCD screen displays on localhardware as well as VT100 terminal emulation over a serial line.270THE BASE SERVICES LAYERLow Level Librariesand FrameworksCharacterConversionBaseServicesMedia DeviceFrameworkUser Libraryand FileServerPersistentStorageXMLTextModeShellUser SideHardwareAbstractionFigure 10.2 Component collections in the Base Services layer10.6Component CollectionsThe Base Services layer (see Figure 10.2) contains several collections ofcomponents.• The User Library and File Server and User-Side Hardware Abstractioncollections contain essential system services providing file-systemsupport and essential user libraries.• The Text-Mode Shell provides character-based text services thatenable the lowest two layers of the system to be built independentlyof graphics frameworks.• The Low-Level Libraries and Frameworks, Character Conversion, Persistent Storage and XML collections contain frameworks and librariesuseful to applications, as well as to other system components.User Library and File Server CollectionThe User Library and the File Server implement essential basic functionality that should be considered central to the operating system.
Theyinterface to the kernel in a uniform way using the standard client–servermodel. Because they run user-side, the kernel is protected both fromprogramming errors by users of the basic libraries (including resourceexhaustion) and from timing latencies introduced on the user side enablingreal-time guarantees to be met. See Figure 10.3.• The User Library component provides much of the signature functionality of Symbian OS to (system) programs and to applications,Low Level Libraries and FrameworksCrypto.LibraryFeatureReg.Figure 10.3ZIPCompressionLibraryPluginFrmwk.Pw.
&ShutdownMgmt.ApplicationUtilitiesUser Library and File Server componentsCOMPONENT COLLECTIONS271Table 10.1 User Library and File Server ComponentsComponent NameDevelopment NameUser LibraryEUSERFile ServerF32 EKA2Filesystem Plug-insFILSYSFAT FilenameConversion Plug-insFATCHARSETCONVincluding native data types, clean up and clean-up-aware base classes,active objects, descriptors, as well as the system–language bindingincluding DLL stub mechanisms, IPC and similar mechanisms, andgenerally useful low-level services including (since Symbian OS v8)Publish and Subscribe.• The File Server component manages all file access through clientside file-server sessions.
It is a framework of file-system plug-ins andextensions which supports the implementation of custom file systems.The server is responsible for brokering client requests and passingthem through to the file system, where the real work is performed.The file server includes an embedded ROM file system.• The Filesystems component provides file-system plug-in implementations of LFFS and FAT file systems.
FAT is the native format forexternally visible drives, for example those implemented on removable media.• The FAT Filename Conversion Plug-ins support filename conversionfrom and to Unicode.User-Side Hardware Abstraction CollectionThis API provides Get and Set functions to query and set informationabout specific hardware features from the user-side, providing a way toaccess and control many device-specific features independently of thehardware platform. See Figure 10.4.User Side HardwareAbstractionUserHALFigure 10.4 User-Side Hardware Abstraction components272THE BASE SERVICES LAYERTable 10.2 User-Side Hardware Abstraction ComponentsComponent NameUser HALDevelopment NameHAL EKA2This component is deprecated for application use. The intended usersare system components running on the user-side and needing to accesshardware properties, for example fault and exception, memory-page size,timer-tick period, screen properties (whether a screen backlight is presentor not, setting the display contrast), and so on.Text-Mode Shell CollectionTogether, the Text Shell and the Text Window Server that supports itmake the base layers of the operating system independent of higherlevel services (for example graphics and windowing support as well asGUI-based application support), allowing functional builds of the base tosupport porting and other low-level development.
See Figure 10.5.Table 10.3 Text Mode Shell ComponentsComponent NameDevelopment NameText Window ServerEWSRVText ShellESHELL• The Text-Window Server supports the Text Shell, using a text-modedisplay driver to provide standard VGA/LCD screen displays on localhardware as well as VT100 terminal emulation over a serial line.• The Text Shell provides a console-like (command-line) interface tobasic operating system services, for example navigating the file systemand launching executables, for use in porting, testing, and low-leveldevelopment in which only the base layers of the system are built.Low-Level Libraries and Frameworks CollectionThis collection contains a number of basic system frameworks andlibraries which are used throughout the system as well as by applications.Text ModeShellTextWindowServerTextShellFigure 10.5 Text-Mode Shell componentsCOMPONENT COLLECTIONS273It includes the Plug-in Framework, which provides a uniform and secureplug-in definition and loading mechanism, Store, which implements theSymbian OS persistence model, and a varied collection of system utilities.These include a cryptography library, which implements both weak andstrong versions of standard cryptography algorithms, a Zip compressionlibrary, and a basic application utilities library (BAFL).Table 10.4 Low-Level Libraries and FrameworksComponent NameDevelopment NameCryptography LibraryCRYPTOGRAPHYZip Compression LibraryEZLIBPlug-in FrameworkECOM ONGOINGPower and ShutdownManagementDOMAINApplication UtilitiesBAFLFeature RegistryFEATREGAmong the more recent components (new in Symbian OS v8) isthe Central Repository which is provided to store state and settingsinformation that need to be persistent for clients, for example defaultfilenames, locale settings, user preferences, etc.