Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Localised Names of Plug-ins Overview


Purpose

This API should be used by applications that display names of plug-ins to users. Some devices allow users to switch between different languages. On such a device, lists of plug-in names displayed to users need to be localised. Localising a list of plug-in names involves:

[Top]


Architectural relationships

This API consists of a single class, CBaNamedPlugins. This is a descriptor array which implements the MDesCArray interface.

It uses the following APIs:

Interface to Resource Files. Localised plug-in names are provided in resource files.

File Server Client Side and Application Utilities. A CBaNamedPlugins object populates its named plug-in list by searching the file sytem for localised versions of resource files, then opens them for reading. It requires a connected session with the file server to do this. BaflUtils::NearestLanguageFile() is used internally to create the correct language extension for each resource file.

Descriptors. The list can be sorted using a default algorithm, (TDesC::CompareC()). It also allows you to define and use a custom algorithm instead.

This API is used by the Character Conversion API's CCnvCharacterSetNames class to generate a localised list of character set conversion plug-ins.

[Top]


Description

The API is used as follows.

The parameters for the named plug-in list are packaged together into an object of type CBaNamedPlugins::CParameters, which is passed to CBaNamedPlugins::NewL() or NewLC().

Minimally, two parameters must be provided in this object — a list of CBaNamedPlugins::TResourceFiles, and a connected session with the file server. Each TResourceFile object contains the language-independent name of a resource file and a unique identifier for the plug-in it names. One resource file should be specified for each plug-in.

Other parameters are optional. They include:

Default implementations for both of these functions are provided: see the documentation of class CBaNamedPlugins for details.

When the list has been populated, it is sorted using the second function, then items in the list can be retrieved using the implementation of the MDesCArray interface — MdcaCount() and MdcaPoint().

[Top]


See also

Interface to Resource Files

File Server Client Side

Application Utilities

Descriptors