equal
deleted
inserted
replaced
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
21 #include "vimpstutilswaitnote.h" |
21 #include "vimpstutilswaitnote.h" |
22 |
22 |
23 #include <vimpstuires.rsg> |
23 #include <vimpstuires.rsg> |
|
24 #include "uiservicetabtracer.h" |
24 |
25 |
25 // ============================ MEMBER FUNCTIONS =============================== |
26 // ============================ MEMBER FUNCTIONS =============================== |
26 |
27 |
27 // ----------------------------------------------------------------------------- |
28 // ----------------------------------------------------------------------------- |
28 // CVIMPSTUtilsWaitNote::CVIMPSTUtilsWaitNote |
29 // CVIMPSTUtilsWaitNote::CVIMPSTUtilsWaitNote |
42 EXPORT_C void CVIMPSTUtilsWaitNote::ConstructL( const TDesC& aText, |
43 EXPORT_C void CVIMPSTUtilsWaitNote::ConstructL( const TDesC& aText, |
43 TBool aShowImmediately, |
44 TBool aShowImmediately, |
44 TBool aCanBeCanceledByUser, |
45 TBool aCanBeCanceledByUser, |
45 MVIMPSTUtilsWaitNoteObserver* aObserver ) |
46 MVIMPSTUtilsWaitNoteObserver* aObserver ) |
46 { |
47 { |
|
48 TRACER_AUTO; |
47 // don't give dialog pointer as a parameter because |
49 // don't give dialog pointer as a parameter because |
48 // it gets invalid after deletion of this instance |
50 // it gets invalid after deletion of this instance |
49 iWaitDialog = new( ELeave )CAknWaitDialog( NULL, aShowImmediately ); |
51 iWaitDialog = new( ELeave )CAknWaitDialog( NULL, aShowImmediately ); |
50 if( aCanBeCanceledByUser ) |
52 if( aCanBeCanceledByUser ) |
51 { |
53 { |
71 EXPORT_C CVIMPSTUtilsWaitNote* CVIMPSTUtilsWaitNote::ShowWaitNoteL( const TDesC& aText, |
73 EXPORT_C CVIMPSTUtilsWaitNote* CVIMPSTUtilsWaitNote::ShowWaitNoteL( const TDesC& aText, |
72 TBool aShowImmediately /*= EFalse*/, |
74 TBool aShowImmediately /*= EFalse*/, |
73 TBool aCanBeCanceledByUser /*= EFalse*/, |
75 TBool aCanBeCanceledByUser /*= EFalse*/, |
74 MVIMPSTUtilsWaitNoteObserver* aObserver /*= NULL*/ ) |
76 MVIMPSTUtilsWaitNoteObserver* aObserver /*= NULL*/ ) |
75 { |
77 { |
|
78 TRACER_AUTO; |
76 CVIMPSTUtilsWaitNote* self = ShowWaitNoteLC(aText,aShowImmediately,aCanBeCanceledByUser,aObserver); |
79 CVIMPSTUtilsWaitNote* self = ShowWaitNoteLC(aText,aShowImmediately,aCanBeCanceledByUser,aObserver); |
77 CleanupStack::Pop( self ); |
80 CleanupStack::Pop( self ); |
78 return self; |
81 return self; |
79 } |
82 } |
80 |
83 |
86 EXPORT_C CVIMPSTUtilsWaitNote* CVIMPSTUtilsWaitNote::ShowWaitNoteLC( const TDesC& aText, |
89 EXPORT_C CVIMPSTUtilsWaitNote* CVIMPSTUtilsWaitNote::ShowWaitNoteLC( const TDesC& aText, |
87 TBool aShowImmediately /*= EFalse*/, |
90 TBool aShowImmediately /*= EFalse*/, |
88 TBool aCanBeCanceledByUser /*= EFalse*/, |
91 TBool aCanBeCanceledByUser /*= EFalse*/, |
89 MVIMPSTUtilsWaitNoteObserver* aObserver /*= NULL*/ ) |
92 MVIMPSTUtilsWaitNoteObserver* aObserver /*= NULL*/ ) |
90 { |
93 { |
|
94 TRACER_AUTO; |
91 CVIMPSTUtilsWaitNote* self = new( ELeave ) CVIMPSTUtilsWaitNote(); |
95 CVIMPSTUtilsWaitNote* self = new( ELeave ) CVIMPSTUtilsWaitNote(); |
92 CleanupStack::PushL( self ); |
96 CleanupStack::PushL( self ); |
93 self->ConstructL( aText, aShowImmediately, aCanBeCanceledByUser, aObserver ); |
97 self->ConstructL( aText, aShowImmediately, aCanBeCanceledByUser, aObserver ); |
94 return self; |
98 return self; |
95 } |
99 } |
102 EXPORT_C CVIMPSTUtilsWaitNote* CVIMPSTUtilsWaitNote::ShowWaitNoteLC( TInt aTextResource, |
106 EXPORT_C CVIMPSTUtilsWaitNote* CVIMPSTUtilsWaitNote::ShowWaitNoteLC( TInt aTextResource, |
103 TBool aShowImmediately /*= EFalse*/, |
107 TBool aShowImmediately /*= EFalse*/, |
104 TBool aCanBeCanceledByUser /*= EFalse*/, |
108 TBool aCanBeCanceledByUser /*= EFalse*/, |
105 MVIMPSTUtilsWaitNoteObserver* aObserver /*= NULL*/ ) |
109 MVIMPSTUtilsWaitNoteObserver* aObserver /*= NULL*/ ) |
106 { |
110 { |
|
111 TRACER_AUTO; |
107 CVIMPSTUtilsWaitNote* self = new( ELeave ) CVIMPSTUtilsWaitNote(); |
112 CVIMPSTUtilsWaitNote* self = new( ELeave ) CVIMPSTUtilsWaitNote(); |
108 CleanupStack::PushL( self ); |
113 CleanupStack::PushL( self ); |
109 |
114 |
110 HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aTextResource ); |
115 HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aTextResource ); |
111 self->ConstructL( *text, aShowImmediately, aCanBeCanceledByUser, aObserver ); |
116 self->ConstructL( *text, aShowImmediately, aCanBeCanceledByUser, aObserver ); |
122 EXPORT_C CVIMPSTUtilsWaitNote* CVIMPSTUtilsWaitNote::ShowWaitNoteL( TInt aTextResource, |
127 EXPORT_C CVIMPSTUtilsWaitNote* CVIMPSTUtilsWaitNote::ShowWaitNoteL( TInt aTextResource, |
123 TBool aShowImmediately /*= EFalse*/, |
128 TBool aShowImmediately /*= EFalse*/, |
124 TBool aCanBeCanceledByUser /*= EFalse*/, |
129 TBool aCanBeCanceledByUser /*= EFalse*/, |
125 MVIMPSTUtilsWaitNoteObserver* aObserver /*= NULL*/ ) |
130 MVIMPSTUtilsWaitNoteObserver* aObserver /*= NULL*/ ) |
126 { |
131 { |
|
132 TRACER_AUTO; |
127 CVIMPSTUtilsWaitNote* self = ShowWaitNoteLC( aTextResource, |
133 CVIMPSTUtilsWaitNote* self = ShowWaitNoteLC( aTextResource, |
128 aShowImmediately, |
134 aShowImmediately, |
129 aCanBeCanceledByUser, |
135 aCanBeCanceledByUser, |
130 aObserver ); |
136 aObserver ); |
131 |
137 |
149 // (other items were commented in a header). |
155 // (other items were commented in a header). |
150 // ----------------------------------------------------------------------------- |
156 // ----------------------------------------------------------------------------- |
151 // |
157 // |
152 EXPORT_C void CVIMPSTUtilsWaitNote::DialogDismissedL( TInt aButtonId ) |
158 EXPORT_C void CVIMPSTUtilsWaitNote::DialogDismissedL( TInt aButtonId ) |
153 { |
159 { |
|
160 TRACER_AUTO; |
154 iWaitDialog = NULL; |
161 iWaitDialog = NULL; |
155 if( iObserver ) |
162 if( iObserver ) |
156 { |
163 { |
157 iObserver->NoteCanceled( aButtonId ); |
164 iObserver->NoteCanceled( aButtonId ); |
158 } |
165 } |
164 // (other items were commented in a header). |
171 // (other items were commented in a header). |
165 // ----------------------------------------------------------------------------- |
172 // ----------------------------------------------------------------------------- |
166 // |
173 // |
167 EXPORT_C void CVIMPSTUtilsWaitNote::DismissDialog() |
174 EXPORT_C void CVIMPSTUtilsWaitNote::DismissDialog() |
168 { |
175 { |
|
176 TRACER_AUTO; |
169 if( iWaitDialog ) |
177 if( iWaitDialog ) |
170 { |
178 { |
171 iWaitDialog->SetCallback( NULL ); |
179 iWaitDialog->SetCallback( NULL ); |
172 TRAPD( err, iWaitDialog->ProcessFinishedL() ); |
180 TRAPD( err, iWaitDialog->ProcessFinishedL() ); |
173 |
181 |