|
1 /* |
|
2 * Copyright (c) 2008 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: Declares main application class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CODESTORE_H |
|
20 #define __CODESTORE_H |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 |
|
25 // ---------------------------------------------------------------------- |
|
26 |
|
27 class CScanCodeStore : public CBase |
|
28 { |
|
29 public: |
|
30 static CScanCodeStore* NewL(); |
|
31 |
|
32 TInt Store(TInt aHidKey, TInt aUsagePage, TInt aScanCode); |
|
33 TInt Retrieve(TInt aHidKey, TInt aUsagePage); |
|
34 |
|
35 virtual ~CScanCodeStore(); |
|
36 |
|
37 private: |
|
38 CScanCodeStore(); |
|
39 |
|
40 private: |
|
41 class TKeyDownInfo |
|
42 { |
|
43 public: |
|
44 inline TKeyDownInfo(); |
|
45 inline TKeyDownInfo(TInt aHidKey, TInt aUsagePage, TInt aScanCode); |
|
46 |
|
47 TInt iHidKey; |
|
48 TInt iUsagePage; |
|
49 TInt iScanCode; |
|
50 }; |
|
51 |
|
52 RArray<TKeyDownInfo> iKeys; |
|
53 }; |
|
54 |
|
55 // ---------------------------------------------------------------------- |
|
56 |
|
57 inline CScanCodeStore::TKeyDownInfo::TKeyDownInfo() : |
|
58 iHidKey(0), iUsagePage(0), iScanCode(0) |
|
59 { |
|
60 // nothing else to do |
|
61 } |
|
62 |
|
63 inline CScanCodeStore::TKeyDownInfo::TKeyDownInfo(TInt aHidKey, |
|
64 TInt aUsagePage, TInt aScanCode) : |
|
65 iHidKey(aHidKey), iUsagePage(aUsagePage), iScanCode(aScanCode) |
|
66 { |
|
67 // nothing else to do |
|
68 } |
|
69 |
|
70 // ---------------------------------------------------------------------- |
|
71 |
|
72 #endif |
|
73 |