|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: SmsStrict implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <e32std.h> |
|
21 #include <charconv.h> |
|
22 #include <convgeneratedcpp.h> |
|
23 #include <ecom/implementationproxy.h> |
|
24 #include <charactersetconverter.h> |
|
25 // New Interface class |
|
26 class CSmsstrictImplementation : public CCharacterSetConverterPluginInterface |
|
27 { |
|
28 public: |
|
29 virtual const TDesC8& ReplacementForUnconvertibleUnicodeCharacters(); |
|
30 |
|
31 virtual TInt ConvertFromUnicode( |
|
32 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, |
|
33 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, |
|
34 TDes8& aForeign, |
|
35 const TDesC16& aUnicode, |
|
36 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters ); |
|
37 |
|
38 virtual TInt ConvertToUnicode( |
|
39 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, |
|
40 TDes16& aUnicode, |
|
41 const TDesC8& aForeign, |
|
42 TInt&, |
|
43 TInt& aNumberOfUnconvertibleCharacters, |
|
44 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter ); |
|
45 |
|
46 virtual TBool IsInThisCharacterSetL( |
|
47 TBool& aSetToTrue, |
|
48 TInt& aConfidenceLevel, |
|
49 const TDesC8& ); |
|
50 |
|
51 static CSmsstrictImplementation* NewL(); |
|
52 |
|
53 virtual ~CSmsstrictImplementation(); |
|
54 private: |
|
55 CSmsstrictImplementation(); |
|
56 }; |
|
57 |
|
58 EXPORT_C const TDesC8& CSmsstrictImplementation::ReplacementForUnconvertibleUnicodeCharacters() |
|
59 { |
|
60 return ReplacementForUnconvertibleUnicodeCharacters_internal(); |
|
61 } |
|
62 |
|
63 EXPORT_C TInt CSmsstrictImplementation::ConvertFromUnicode( |
|
64 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, |
|
65 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, |
|
66 TDes8& aForeign, |
|
67 const TDesC16& aUnicode, |
|
68 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters ) |
|
69 { |
|
70 return CCnvCharacterSetConverter::DoConvertFromUnicode( |
|
71 conversionData, |
|
72 aDefaultEndiannessOfForeignCharacters, |
|
73 aReplacementForUnconvertibleUnicodeCharacters, |
|
74 aForeign, |
|
75 aUnicode, |
|
76 aIndicesOfUnconvertibleCharacters ); |
|
77 } |
|
78 |
|
79 EXPORT_C TInt CSmsstrictImplementation::ConvertToUnicode( |
|
80 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, |
|
81 TDes16& aUnicode, |
|
82 const TDesC8& aForeign, |
|
83 TInt&, |
|
84 TInt& aNumberOfUnconvertibleCharacters, |
|
85 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter ) |
|
86 { |
|
87 return CCnvCharacterSetConverter::DoConvertToUnicode( |
|
88 conversionData, |
|
89 aDefaultEndiannessOfForeignCharacters, |
|
90 aUnicode, |
|
91 aForeign, |
|
92 aNumberOfUnconvertibleCharacters, |
|
93 aIndexOfFirstByteOfFirstUnconvertibleCharacter ); |
|
94 } |
|
95 |
|
96 |
|
97 EXPORT_C TBool CSmsstrictImplementation::IsInThisCharacterSetL( |
|
98 TBool& aSetToTrue, |
|
99 TInt& aConfidenceLevel, |
|
100 const TDesC8& ) |
|
101 { |
|
102 aSetToTrue=EFalse; |
|
103 aConfidenceLevel=0; |
|
104 return EFalse; |
|
105 } |
|
106 |
|
107 CSmsstrictImplementation* CSmsstrictImplementation::NewL() |
|
108 { |
|
109 CSmsstrictImplementation* self = new(ELeave) CSmsstrictImplementation; |
|
110 return self; |
|
111 } |
|
112 |
|
113 CSmsstrictImplementation::CSmsstrictImplementation() |
|
114 { |
|
115 //default constructor.. do nothing |
|
116 } |
|
117 |
|
118 CSmsstrictImplementation::~CSmsstrictImplementation() |
|
119 { |
|
120 //default destructor .. do nothing |
|
121 } |
|
122 |
|
123 // ECOM CREATION FUNCTION |
|
124 const TImplementationProxy ImplementationTable[] = |
|
125 { |
|
126 // Note: This is the same UID as defined in old mmp-file |
|
127 // Used also in 12221212.rss ( implementation_uid ) |
|
128 IMPLEMENTATION_PROXY_ENTRY( 0x101F85CD, CSmsstrictImplementation::NewL ) |
|
129 }; |
|
130 |
|
131 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) |
|
132 { |
|
133 aTableCount = sizeof( ImplementationTable ) / sizeof(TImplementationProxy); |
|
134 return ImplementationTable; |
|
135 } |
|
136 |
|
137 // End of file |