|
1 /* |
|
2 * Copyright (c) 2009 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: Class to hold the character to key mappings and provide |
|
15 * conversion of strings to their numerical mappings. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __CPCSKEYMAP_H__ |
|
20 #define __CPCSKEYMAP_H__ |
|
21 |
|
22 |
|
23 ///// Since the real Orbit keymap code crashes, |
|
24 ///// use this hardcoded keymap for now |
|
25 |
|
26 |
|
27 // INCLUDES |
|
28 #include <e32base.h> |
|
29 |
|
30 // CLASS DECLARATION |
|
31 NONSHARABLE_CLASS(CPcsKeyMap) : public CBase |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * Two phase construction |
|
36 */ |
|
37 static CPcsKeyMap* NewL(); |
|
38 |
|
39 /** |
|
40 * Destructor |
|
41 */ |
|
42 virtual ~CPcsKeyMap(); |
|
43 |
|
44 /** |
|
45 * Converts a string to a numeric string. |
|
46 * aSource String to be converted |
|
47 * aPlainConversion ETrue do a simple conversion, without special |
|
48 * handling for sepator characters |
|
49 * EFalse add a separator character at the beginning |
|
50 * and convert spaces to separator characters |
|
51 * returns Conversion result, ownership is transferred |
|
52 */ |
|
53 HBufC* GetNumericKeyStringL(const TDesC& aSource, |
|
54 TBool aPlainConversion) const; |
|
55 |
|
56 private: |
|
57 TChar GetNumericValueForChar(TChar input) const; |
|
58 |
|
59 /** |
|
60 * Constructor |
|
61 */ |
|
62 CPcsKeyMap(); |
|
63 |
|
64 /** |
|
65 * Second phase constructor |
|
66 */ |
|
67 void ConstructL(); |
|
68 }; |
|
69 |
|
70 #endif // __CPCSKEYMAP_H__ |
|
71 |
|
72 // End of file |