williamr@4: /* williamr@4: * Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: * All rights reserved. williamr@4: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@4: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: * williamr@4: * Initial Contributors: williamr@4: * Nokia Corporation - initial contribution. williamr@4: * williamr@4: * Contributors: williamr@4: * williamr@4: * Description: williamr@4: * williamr@4: */ williamr@4: 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 williamr@4: