|
1 /* |
|
2 * Copyright (c) 2002-2007 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: Phonebook2 Adaptive Search Grid |
|
15 * helper class |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2DELAYEDWAITNOTE_H |
|
20 #define CPBK2DELAYEDWAITNOTE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 #include <MPbk2ProcessDecorator.h> |
|
26 |
|
27 /** |
|
28 * Utility class that implements the wait logic and |
|
29 * process decoration if needed. |
|
30 */ |
|
31 class CPbk2DelayedWaitNote : public CTimer, |
|
32 private MPbk2ProcessDecoratorObserver |
|
33 { |
|
34 public: // Construction and destruction |
|
35 |
|
36 /** |
|
37 * Creates a new instance of this class. |
|
38 * |
|
39 * @return A new instance of this class. |
|
40 */ |
|
41 static CPbk2DelayedWaitNote* NewL( MPbk2ProcessDecoratorObserver& aObserver, TInt aResourceId ); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 ~CPbk2DelayedWaitNote(); |
|
47 |
|
48 public: // Interface |
|
49 |
|
50 /** |
|
51 * Starts the timer and after it expires, will display the |
|
52 * wait note decorator. |
|
53 */ |
|
54 void Start(); |
|
55 /** |
|
56 * Stops displaying the wait note decorator or just stops the timer |
|
57 * if the wait note is not yet shown. |
|
58 * Call to Stop will always result to ProcessDismissed call of the observer. |
|
59 */ |
|
60 void Stop(); |
|
61 |
|
62 private: // From CTimer |
|
63 void RunL(); |
|
64 TInt RunError( TInt aError ); |
|
65 |
|
66 private: // From MPbk2ProcessDecoratorObserver |
|
67 void ProcessDismissed( TInt aCancelCode ); |
|
68 |
|
69 private: // Implementation |
|
70 CPbk2DelayedWaitNote( MPbk2ProcessDecoratorObserver& aObserver, TInt aResourceId ); |
|
71 void ConstructL(); |
|
72 void DismissWaitNote(); |
|
73 |
|
74 private: // Data |
|
75 /// Own: Decorator for the wait note process |
|
76 MPbk2ProcessDecorator* iDecorator; |
|
77 // Notifiy if wait note is on |
|
78 TBool iStarted; |
|
79 // Ref: |
|
80 MPbk2ProcessDecoratorObserver& iObserver; |
|
81 TInt iResourceId; |
|
82 }; |
|
83 |
|
84 #endif // CPBK2DELAYEDWAITNOTE_H |
|
85 |
|
86 // End of File |