williamr@2: // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #if !defined(__CONVNAMES_H__) williamr@2: #define __CONVNAMES_H__ williamr@2: williamr@2: #if !defined(__E32STD_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #if !defined(__E32BASE_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #if !defined(__BAMDESCA_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #if !defined(__CHARCONV_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: class RFs; williamr@2: class CBaNamedPlugins; williamr@2: williamr@2: williamr@2: class CCnvCharacterSetNames : public CBase, public MDesCArray williamr@2: /** williamr@2: A localised list of the names of non-Unicode character set encodings supported williamr@2: on the phone. williamr@2: williamr@2: For each character conversion plug-in DLL, there are one or more resource williamr@2: files which contain the name of the encoding translated into a different language. williamr@2: williamr@2: This class populates a list of the names of all encodings supported on the williamr@2: phone by reading the appropriate resource file for each one. The list is sorted williamr@2: according to the collation rules for the device's current locale. williamr@2: williamr@2: The virtual functions MdcaCount() (returns the number of items in the list) williamr@2: and MdcaPoint() (returns a TPtrC for the item at the given index) are implemented williamr@2: privately in this class. Users of this class can call them through the MDesCArray williamr@2: interface. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: IMPORT_C static CCnvCharacterSetNames* NewL(RFs& aFileServerSession, const TArray& aArrayOfCharacterSetsAvailable); williamr@2: IMPORT_C static CCnvCharacterSetNames* NewLC(RFs& aFileServerSession, const TArray& aArrayOfCharacterSetsAvailable); williamr@2: IMPORT_C virtual ~CCnvCharacterSetNames(); williamr@2: IMPORT_C TInt IndexOfIdentifier(TUint aIdentifier) const; williamr@2: IMPORT_C TUint IdentifierAtIndex(TInt aIndex) const; williamr@2: williamr@2: private: williamr@2: CCnvCharacterSetNames(); williamr@2: void ConstructL(RFs& aFileServerSession, const TArray& aArrayOfCharacterSetsAvailable); williamr@2: // from MDesCArray williamr@2: virtual TInt MdcaCount() const; williamr@2: virtual TPtrC MdcaPoint(TInt aIndex) const; williamr@2: static void DestroyResourceFileArray(TAny* aArrayOfCharconvResourceFiles); williamr@2: williamr@2: private: williamr@2: CBaNamedPlugins* iNamedPlugins; williamr@2: }; williamr@2: williamr@2: #endif