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