|
1 /* |
|
2 * Copyright (c) 2006, 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: Handles situation after timer expired |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "notetimer.h" |
|
20 #include "imageprintuiappui.h" |
|
21 #include "imageprintuidebug.h" |
|
22 |
|
23 CNoteTimer* CNoteTimer::NewL( CImagePrintUiAppUi* aAppUi) |
|
24 { |
|
25 CNoteTimer* self = CNoteTimer::NewLC( aAppUi); |
|
26 CleanupStack::Pop(self); |
|
27 return self; |
|
28 } |
|
29 |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 // --------------------------------------------------------------------------- |
|
33 // |
|
34 CNoteTimer* CNoteTimer::NewLC( CImagePrintUiAppUi* aAppUi) |
|
35 { |
|
36 FLOG(_L("[IMAGEPRINTUI] CNoteTimer: NewLC")); |
|
37 CNoteTimer* self = new (ELeave) CNoteTimer(); |
|
38 CleanupStack::PushL(self); |
|
39 self->ConstructL(aAppUi); |
|
40 return self; |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 CNoteTimer::CNoteTimer() |
|
48 : CTimer(EPriorityStandard) |
|
49 { |
|
50 CActiveScheduler::Add(this); |
|
51 } |
|
52 |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 CNoteTimer::~CNoteTimer() |
|
58 { |
|
59 FLOG(_L("[IMAGEPRINTUI]\t CNoteTimer::Destructor start")); |
|
60 Cancel(); |
|
61 FLOG(_L("[IMAGEPRINTUI]\t CNoteTimer::Destructor end")); |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------------------------- |
|
65 // |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 void CNoteTimer::ConstructL(CImagePrintUiAppUi* aAppUi) |
|
69 { |
|
70 iAppUi = aAppUi; |
|
71 CTimer::ConstructL(); |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 void CNoteTimer::RunL() |
|
79 { |
|
80 FLOG(_L("[IMAGEPRINTUI] CNoteTimer : RunL")); |
|
81 iAppUi->HandleTimeOutL(); |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // CNoteTimer::RunError |
|
86 // Standard active object error function. |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 |
|
90 TInt CNoteTimer::RunError(TInt aError) |
|
91 { |
|
92 FTRACE(FPrint(_L("[IMAGEPRINTUI] CNoteTimer::RunError: err %d from RunL"), aError)); |
|
93 |
|
94 TRAPD(err,iAppUi->HandleTimeErrorL(aError)); |
|
95 if(err) |
|
96 { |
|
97 FLOG(_L("[IMAGEPRINTUI] CNoteTimer :: err when call HandleTimeError")); |
|
98 } |
|
99 |
|
100 return KErrNone; |
|
101 } |