author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:27:01 +0100 | |
branch | Symbian2 |
changeset 3 | e1b950c65cb4 |
parent 0 | 061f57f2323e |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@2 | 4 |
// 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 | 5 |
// which accompanies this distribution, and is available |
williamr@2 | 6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
#if !defined(__CONVNAMES_H__) |
williamr@2 | 17 |
#define __CONVNAMES_H__ |
williamr@2 | 18 |
|
williamr@2 | 19 |
#if !defined(__E32STD_H__) |
williamr@2 | 20 |
#include <e32std.h> |
williamr@2 | 21 |
#endif |
williamr@2 | 22 |
|
williamr@2 | 23 |
#if !defined(__E32BASE_H__) |
williamr@2 | 24 |
#include <e32base.h> |
williamr@2 | 25 |
#endif |
williamr@2 | 26 |
|
williamr@2 | 27 |
#if !defined(__BAMDESCA_H__) |
williamr@2 | 28 |
#include <bamdesca.h> |
williamr@2 | 29 |
#endif |
williamr@2 | 30 |
|
williamr@2 | 31 |
#if !defined(__CHARCONV_H__) |
williamr@2 | 32 |
#include <charconv.h> |
williamr@2 | 33 |
#endif |
williamr@2 | 34 |
|
williamr@2 | 35 |
class RFs; |
williamr@2 | 36 |
class CBaNamedPlugins; |
williamr@2 | 37 |
|
williamr@2 | 38 |
|
williamr@2 | 39 |
class CCnvCharacterSetNames : public CBase, public MDesCArray |
williamr@2 | 40 |
/** |
williamr@2 | 41 |
A localised list of the names of non-Unicode character set encodings supported |
williamr@2 | 42 |
on the phone. |
williamr@2 | 43 |
|
williamr@2 | 44 |
For each character conversion plug-in DLL, there are one or more resource |
williamr@2 | 45 |
files which contain the name of the encoding translated into a different language. |
williamr@2 | 46 |
|
williamr@2 | 47 |
This class populates a list of the names of all encodings supported on the |
williamr@2 | 48 |
phone by reading the appropriate resource file for each one. The list is sorted |
williamr@2 | 49 |
according to the collation rules for the device's current locale. |
williamr@2 | 50 |
|
williamr@2 | 51 |
The virtual functions MdcaCount() (returns the number of items in the list) |
williamr@2 | 52 |
and MdcaPoint() (returns a TPtrC for the item at the given index) are implemented |
williamr@2 | 53 |
privately in this class. Users of this class can call them through the MDesCArray |
williamr@2 | 54 |
interface. |
williamr@2 | 55 |
@publishedAll |
williamr@2 | 56 |
@released |
williamr@2 | 57 |
*/ |
williamr@2 | 58 |
{ |
williamr@2 | 59 |
public: |
williamr@2 | 60 |
IMPORT_C static CCnvCharacterSetNames* NewL(RFs& aFileServerSession, const TArray<CCnvCharacterSetConverter::SCharacterSet>& aArrayOfCharacterSetsAvailable); |
williamr@2 | 61 |
IMPORT_C static CCnvCharacterSetNames* NewLC(RFs& aFileServerSession, const TArray<CCnvCharacterSetConverter::SCharacterSet>& aArrayOfCharacterSetsAvailable); |
williamr@2 | 62 |
IMPORT_C virtual ~CCnvCharacterSetNames(); |
williamr@2 | 63 |
IMPORT_C TInt IndexOfIdentifier(TUint aIdentifier) const; |
williamr@2 | 64 |
IMPORT_C TUint IdentifierAtIndex(TInt aIndex) const; |
williamr@2 | 65 |
|
williamr@2 | 66 |
private: |
williamr@2 | 67 |
CCnvCharacterSetNames(); |
williamr@2 | 68 |
void ConstructL(RFs& aFileServerSession, const TArray<CCnvCharacterSetConverter::SCharacterSet>& aArrayOfCharacterSetsAvailable); |
williamr@2 | 69 |
// from MDesCArray |
williamr@2 | 70 |
virtual TInt MdcaCount() const; |
williamr@2 | 71 |
virtual TPtrC MdcaPoint(TInt aIndex) const; |
williamr@2 | 72 |
static void DestroyResourceFileArray(TAny* aArrayOfCharconvResourceFiles); |
williamr@2 | 73 |
|
williamr@2 | 74 |
private: |
williamr@2 | 75 |
CBaNamedPlugins* iNamedPlugins; |
williamr@2 | 76 |
}; |
williamr@2 | 77 |
|
williamr@2 | 78 |
#endif |