|
1 /* |
|
2 * Copyright (c) 2002-2005 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: data converter utility |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPENINPUTDATACONVERTER_H |
|
20 #define C_CPENINPUTDATACONVERTER_H |
|
21 |
|
22 // System includes |
|
23 #include <e32cmn.h> |
|
24 #include <e32des16.h> |
|
25 #include <e32base.h> |
|
26 #include <e32def.h> |
|
27 |
|
28 /** |
|
29 * Peninput data converter utility |
|
30 * |
|
31 * @lib peninputcommonlayout.lib |
|
32 * @since S60 v3.2 |
|
33 */ |
|
34 class CPeninputDataConverter : public CBase |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Destructor |
|
41 * |
|
42 * @since S60 v3.2 |
|
43 * @return None |
|
44 */ |
|
45 IMPORT_C virtual ~CPeninputDataConverter(); |
|
46 |
|
47 /** |
|
48 * From integer to descriptor |
|
49 * |
|
50 * @since S60 v3.2 |
|
51 * @param aNum Integer number to be converted |
|
52 * @param aBuf Buffer to store converted number |
|
53 * @return None |
|
54 */ |
|
55 IMPORT_C static void IntToDesc( TUint aNum, |
|
56 TDes16& aBuf ); |
|
57 |
|
58 /** |
|
59 * From combination to descriptor |
|
60 * |
|
61 * @since S60 v3.2 |
|
62 * @param aBool Bool value to be converted |
|
63 * @param aNum Number to append to a Bool value |
|
64 * @param aBuf Buffer to store converted number |
|
65 * @return None |
|
66 */ |
|
67 IMPORT_C static void CombinationToDesc( TBool aBool, |
|
68 TUint aNum, |
|
69 TDes16& aBuf ); |
|
70 |
|
71 /** |
|
72 * From TAny* to TInt |
|
73 * |
|
74 * @since S60 v3.2 |
|
75 * @param aOrginal Orginal data |
|
76 * @return Converted descriptor |
|
77 */ |
|
78 IMPORT_C static TInt AnyToInt( TAny* aOrginal ); |
|
79 |
|
80 /** |
|
81 * Get shift and caps status by case |
|
82 * |
|
83 * @since S60 v3.2 |
|
84 * @param aCase The case |
|
85 * @param aShiftStatus The shift status |
|
86 * @param aCapsStatus The capslock status |
|
87 * @return None |
|
88 */ |
|
89 IMPORT_C static void ShiftCapslockByCase( TInt aCase, |
|
90 TInt& aShiftStatus, |
|
91 TInt& aCapsStatus ); |
|
92 |
|
93 /** |
|
94 * Get fep case by case id internal |
|
95 * |
|
96 * @since S60 v3.2 |
|
97 * @param aCaseId The internal case |
|
98 * @return The fep case |
|
99 */ |
|
100 IMPORT_C static TInt FepCaseByCaseId( TInt aCaseId ); |
|
101 |
|
102 protected: |
|
103 |
|
104 /** |
|
105 * 1st phase constructor |
|
106 * |
|
107 * @since S60 v3.2 |
|
108 * @return None |
|
109 */ |
|
110 IMPORT_C CPeninputDataConverter(); |
|
111 |
|
112 }; |
|
113 |
|
114 #endif // C_CPENINPUTDATACONVERTER_H |