Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: convnames.h
Link against: convnames.lib

Class CCnvCharacterSetNames

CCnvCharacterSetNames

Support

Supported from 6.1

Description

A localised list of the names of non-Unicode character set encodings supported on the device.

For each character conversion plug-in DLL, there are one or more resource files which contain the name of the encoding translated into a different language.

This class populates a list of the names of all encodings supported on the device by reading the appropriate resource file for each one. The list is sorted according to the collation rules for the device's current locale.

The virtual functions MdcaCount() (returns the number of items in the list) and MdcaPoint() (returns a TPtrC for the item at the given index) are implemented privately in this class. Users of this class can call them through the MDesCArray interface.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCnvCharacterSetNamesA localised list of the names of non-Unicode character set encodings supported on the device
MDesC16ArrayInterface class for 16 bit descriptor arrays

Defined in CCnvCharacterSetNames:
IdentifierAtIndex(), IndexOfIdentifier(), NewL(), NewLC(), ~CCnvCharacterSetNames()

Inherited from CBase:
operator new()

Inherited from MDesC16Array:
MdcaCount(), MdcaPoint()


Construction and destruction


NewL()

static CCnvCharacterSetNames* NewL(RFs& aFileServerSession, const TArray<CCnvCharacterSetConverter::SCharacterSet>& aArrayOfCharacterSetsAvailable);

Description

Allocates and constructs a localised list of character set encoding names.

Parameters

RFs& aFileServerSession

A connected session with the file server.

const TArray<CCnvCharacterSetConverter::SCharacterSet>& aArrayOfCharacterSetsAvailable

The array of character sets available on the device. This can be created using CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL() or CreateArrayOfCharacterSetsAvailableLC().

Return value

CCnvCharacterSetNames*

Pointer to the newly created object.


NewLC()

static CCnvCharacterSetNames* NewLC(RFs& aFileServerSession, const TArray<CCnvCharacterSetConverter::SCharacterSet>& aArrayOfCharacterSetsAvailable);

Description

Allocates and constructs a localised list of character set encoding names. Puts a pointer to the object on the cleanup stack.

Parameters

RFs& aFileServerSession

A connected session with the file server.

const TArray<CCnvCharacterSetConverter::SCharacterSet>& aArrayOfCharacterSetsAvailable

The array of character sets available on the device. This can be created using CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL() or CreateArrayOfCharacterSetsAvailableLC().

Return value

CCnvCharacterSetNames*

Pointer to the newly created object.


~CCnvCharacterSetNames()

virtual ~CCnvCharacterSetNames();

Description

Deletes the array of named plug-ins owned by the object prior to its destruction.

[Top]


Character set identifiers


IndexOfIdentifier()

TInt IndexOfIdentifier(TUint aIdentifier) const;

Description

Gets the index into the sorted list of the character set identifier specified.

Parameters

TUint aIdentifier

The character set identifier. This must not be zero, or a panic occurs.

Return value

TInt

The index into the list of the character set identifier, or KErrNotFound if the identifier does not exist in the list.

See also:


IdentifierAtIndex()

TUint IdentifierAtIndex(TInt aIndex) const;

Description

Gets the character set identifier at the specified index into the list.

Parameters

TInt aIndex

The index into the list. Must be within the bounds of the array, or a panic occurs.

Return value

TUint

The character set identifier at the specified index.

See also: