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