|
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: Implementation of ECOM plug-in service interface. Provides |
|
15 * key event service. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CHTIKEYEVENTSERVICEPLUGIN_H |
|
21 #define CHTIKEYEVENTSERVICEPLUGIN_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <HtiServicePluginInterface.h> |
|
25 #include <w32std.h> |
|
26 #include <centralrepository.h> |
|
27 #include <cenrepnotifyhandler.h> |
|
28 |
|
29 |
|
30 // CONSTANTS |
|
31 const TInt KKeyEventServiceUidValue = 0x1020DEC1; // ECOM Implementation UID |
|
32 const TUid KKeyEventServiceUid = { KKeyEventServiceUidValue }; |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CKeyEventHandler; |
|
36 class CPointerEventHandler; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * Implementation of ECOM plug-in service interface. |
|
42 */ |
|
43 class CHtiKeyEventServicePlugin : public CHTIServicePluginInterface |
|
44 ,public MCenRepNotifyHandlerCallback |
|
45 { |
|
46 public: |
|
47 |
|
48 static CHtiKeyEventServicePlugin* NewL(); |
|
49 |
|
50 // Interface implementation |
|
51 void ProcessMessageL( const TDesC8& aMessage, |
|
52 THtiMessagePriority aPriority ); |
|
53 |
|
54 protected: |
|
55 |
|
56 CHtiKeyEventServicePlugin(); |
|
57 void ConstructL(); |
|
58 |
|
59 virtual ~CHtiKeyEventServicePlugin(); |
|
60 |
|
61 // from MCenRepNotifyHandlerCallback |
|
62 void HandleNotifyInt( TUint32 aId, TInt aNewValue ); |
|
63 void HandleNotifyError( TUint32 aId, TInt error, |
|
64 CCenRepNotifyHandler* aHandler ); |
|
65 |
|
66 private: |
|
67 |
|
68 CKeyEventHandler* iKeyHandler; |
|
69 CPointerEventHandler* iPointerHandler; |
|
70 |
|
71 TInt iLightTimeout; |
|
72 CRepository* iCenRepSession; |
|
73 CCenRepNotifyHandler* iLightTimeoutSettingHandler; |
|
74 }; |
|
75 |
|
76 #endif // CHTIKEYEVENTSERVICEPLUGIN_H |
|
77 |