|
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: |
|
15 * List container key timer. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include <aknkeys.h> // EKeyOk |
|
24 #include "MceMessageListContTimer.h" |
|
25 |
|
26 #include <PtiEngine.h> |
|
27 |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 const TInt KMceMultiTapTimeout = 1000000; // 1.0 s |
|
32 |
|
33 |
|
34 // ================= MEMBER FUNCTIONS ======================= |
|
35 |
|
36 |
|
37 |
|
38 // ---------------------------------------------------- |
|
39 // CMceMessageListContainerKeyTimer::NewL |
|
40 // Constructor |
|
41 // ---------------------------------------------------- |
|
42 CMceMessageListContainerKeyTimer* CMceMessageListContainerKeyTimer::NewL( CPtiEngine& aT9Interface ) |
|
43 { |
|
44 CMceMessageListContainerKeyTimer* self = |
|
45 new (ELeave) CMceMessageListContainerKeyTimer( |
|
46 aT9Interface ); |
|
47 CleanupStack::PushL( self ); |
|
48 self->ConstructL(); |
|
49 CleanupStack::Pop( self ); |
|
50 return self; |
|
51 } |
|
52 |
|
53 // ---------------------------------------------------- |
|
54 // CMceMessageListContainerKeyTimer::~CMceMessageListContainerKeyTimer |
|
55 // Destructor |
|
56 // ---------------------------------------------------- |
|
57 CMceMessageListContainerKeyTimer::~CMceMessageListContainerKeyTimer() |
|
58 { |
|
59 Cancel(); |
|
60 iTimer.Close(); |
|
61 } |
|
62 |
|
63 // ---------------------------------------------------- |
|
64 // CMceMessageListContainerKeyTimer::CMceMessageListContainerKeyTimer |
|
65 // Constructor |
|
66 // ---------------------------------------------------- |
|
67 CMceMessageListContainerKeyTimer::CMceMessageListContainerKeyTimer( |
|
68 CPtiEngine& aT9Interface ) |
|
69 : |
|
70 CActive( EPriorityStandard ), |
|
71 iT9Interface( aT9Interface ) |
|
72 { |
|
73 CActiveScheduler::Add( this ); |
|
74 } |
|
75 |
|
76 // ---------------------------------------------------- |
|
77 // CMceMessageListContainerKeyTimer::ConstructL |
|
78 // Creates key click timer |
|
79 // ---------------------------------------------------- |
|
80 void CMceMessageListContainerKeyTimer::ConstructL() |
|
81 { |
|
82 User::LeaveIfError( iTimer.CreateLocal() ); |
|
83 } |
|
84 |
|
85 // ---------------------------------------------------- |
|
86 // CMceMessageListContainerKeyTimer::Start |
|
87 // Starts key click timer |
|
88 // ---------------------------------------------------- |
|
89 void CMceMessageListContainerKeyTimer::Start() |
|
90 { |
|
91 const TTimeIntervalMicroSeconds32 timeInterval = KMceMultiTapTimeout; |
|
92 Cancel(); |
|
93 iTimer.After( iStatus, timeInterval ); |
|
94 SetActive(); |
|
95 } |
|
96 |
|
97 // ---------------------------------------------------- |
|
98 // CMceMessageListContainerKeyTimer::RunL |
|
99 // Runs key click timer |
|
100 // ---------------------------------------------------- |
|
101 void CMceMessageListContainerKeyTimer::RunL() |
|
102 { |
|
103 iT9Interface.ClearCurrentWord(); |
|
104 } |
|
105 |
|
106 // ---------------------------------------------------- |
|
107 // CMceMessageListContainerKeyTimer::DoCancel |
|
108 // Cancels key click timer |
|
109 // ---------------------------------------------------- |
|
110 void CMceMessageListContainerKeyTimer::DoCancel() |
|
111 { |
|
112 iTimer.Cancel(); |
|
113 } |
|
114 |
|
115 // End of File |