60 if ( sessionCount > 0) |
65 if ( sessionCount > 0) |
61 { |
66 { |
62 if( --sessionCount == 0 ) |
67 if( --sessionCount == 0 ) |
63 { |
68 { |
64 TN_DEBUG1( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - Disconnect FBS" ); |
69 TN_DEBUG1( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - Disconnect FBS" ); |
|
70 OstTrace0( TRACE_NORMAL, DUP1_CTHUMBNAILMANAGERIMPL_CTHUMBNAILMANAGERIMPL, "CThumbnailManagerImpl::~CThumbnailManagerImpl - Disconnect FBS" ); |
65 iFbsSession.Disconnect(); |
71 iFbsSession.Disconnect(); |
66 } |
72 } |
67 TN_DEBUG2( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - update sessionCount == %d to TLS", sessionCount ); |
73 TN_DEBUG2( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - update sessionCount == %d to TLS", sessionCount ); |
|
74 OstTrace1( TRACE_NORMAL, DUP2_CTHUMBNAILMANAGERIMPL_CTHUMBNAILMANAGERIMPL, "CThumbnailManagerImpl::~CThumbnailManagerImpl - update sessionCount == %d to TLS", sessionCount ); |
68 Dll::SetTls( (TAny*)sessionCount ); |
75 Dll::SetTls( (TAny*)sessionCount ); |
69 } |
76 } |
70 |
77 |
71 delete iMimeTypeList; |
78 delete iMimeTypeList; |
72 iMimeTypeList = NULL; |
79 iMimeTypeList = NULL; |
73 |
80 |
74 TN_DEBUG1( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - end" ); |
81 TN_DEBUG1( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - end" ); |
|
82 OstTrace0( TRACE_NORMAL, DUP3_CTHUMBNAILMANAGERIMPL_CTHUMBNAILMANAGERIMPL, "CThumbnailManagerImpl::~CThumbnailManagerImpl - end" ); |
75 } |
83 } |
76 |
84 |
77 |
85 |
78 // --------------------------------------------------------------------------- |
86 // --------------------------------------------------------------------------- |
79 // CThumbnailManagerImpl::NewLC() |
87 // CThumbnailManagerImpl::NewLC() |
100 KThumbnailDefaultDisplayMode ), iFlags( EDefaultFlags ), iQualityPreference |
108 KThumbnailDefaultDisplayMode ), iFlags( EDefaultFlags ), iQualityPreference |
101 ( EOptimizeForQuality ), iRequestId( 0 ) |
109 ( EOptimizeForQuality ), iRequestId( 0 ) |
102 { |
110 { |
103 // No implementation required |
111 // No implementation required |
104 TN_DEBUG1( "CThumbnailManagerImpl::CThumbnailManagerImpl()" ); |
112 TN_DEBUG1( "CThumbnailManagerImpl::CThumbnailManagerImpl()" ); |
|
113 OstTrace0( TRACE_NORMAL, DUP4_CTHUMBNAILMANAGERIMPL_CTHUMBNAILMANAGERIMPL, "CThumbnailManagerImpl::CThumbnailManagerImpl" ); |
105 } |
114 } |
106 |
115 |
107 |
116 |
108 // --------------------------------------------------------------------------- |
117 // --------------------------------------------------------------------------- |
109 // CThumbnailManagerImpl::ConstructL() |
118 // CThumbnailManagerImpl::ConstructL() |
123 // We need to connect to Fbs (first user in this thread) |
133 // We need to connect to Fbs (first user in this thread) |
124 // Maintain a reference count in TLS |
134 // Maintain a reference count in TLS |
125 User::LeaveIfError( iFbsSession.Connect()); |
135 User::LeaveIfError( iFbsSession.Connect()); |
126 Dll::SetTls( (TAny*)1 ); |
136 Dll::SetTls( (TAny*)1 ); |
127 TN_DEBUG2( "CThumbnailManagerImpl::ConstructL() - update sessionCount == %d to TLS", 1 ); |
137 TN_DEBUG2( "CThumbnailManagerImpl::ConstructL() - update sessionCount == %d to TLS", 1 ); |
|
138 OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILMANAGERIMPL_CONSTRUCTL, "CThumbnailManagerImpl::ConstructL - update sessionCount == %d to TLS", 1 ); |
128 } |
139 } |
129 else |
140 else |
130 { |
141 { |
131 TInt sessionCount = (TInt)Dll::Tls(); |
142 TInt sessionCount = (TInt)Dll::Tls(); |
132 if( sessionCount++ > 0 ) |
143 if( sessionCount++ > 0 ) |
133 { |
144 { |
134 // Increase the reference count in TLS |
145 // Increase the reference count in TLS |
135 Dll::SetTls( (TAny*)sessionCount ); |
146 Dll::SetTls( (TAny*)sessionCount ); |
136 TN_DEBUG2( "CThumbnailManagerImpl::ConstructL() - update sessionCount == %d to TLS", sessionCount ); |
147 TN_DEBUG2( "CThumbnailManagerImpl::ConstructL() - update sessionCount == %d to TLS", sessionCount ); |
|
148 OstTrace1( TRACE_NORMAL, DUP2_CTHUMBNAILMANAGERIMPL_CONSTRUCTL, "CThumbnailManagerImpl::ConstructL - update sessionCount == %d to TLS", sessionCount ); |
137 } |
149 } |
138 else |
150 else |
139 { |
151 { |
140 // Fbs connection was available in the beginning, no need to |
152 // Fbs connection was available in the beginning, no need to |
141 // increase the reference count |
153 // increase the reference count |
142 TN_DEBUG1( "CThumbnailManagerImpl::ConstructL - no need to update sessionCount"); |
154 TN_DEBUG1( "CThumbnailManagerImpl::ConstructL - no need to update sessionCount"); |
|
155 OstTrace0( TRACE_NORMAL, DUP3_CTHUMBNAILMANAGERIMPL_CONSTRUCTL, "CThumbnailManagerImpl::ConstructL - no need to update sessionCount" ); |
143 } |
156 } |
144 } |
157 } |
145 |
158 |
146 // request processor |
159 // request processor |
147 iRequestQueue = CThumbnailRequestQueue::NewL(); |
160 iRequestQueue = CThumbnailRequestQueue::NewL(); |
148 |
161 |
149 TN_DEBUG1( "CThumbnailManagerImpl::ConstructL - end"); |
162 TN_DEBUG1( "CThumbnailManagerImpl::ConstructL - end"); |
|
163 OstTrace0( TRACE_NORMAL, DUP4_CTHUMBNAILMANAGERIMPL_CONSTRUCTL, "CThumbnailManagerImpl::ConstructL - end" ); |
150 } |
164 } |
151 |
165 |
152 |
166 |
153 // --------------------------------------------------------------------------- |
167 // --------------------------------------------------------------------------- |
154 // CThumbnailManagerImpl::GetThumbnailL |
168 // CThumbnailManagerImpl::GetThumbnailL |
159 CThumbnailObjectSource& aObjectSource, TAny* aClientData /*= NULL*/, const |
173 CThumbnailObjectSource& aObjectSource, TAny* aClientData /*= NULL*/, const |
160 TInt aPriority, TBool aGeneratePersistentSizesOnly) |
174 TInt aPriority, TBool aGeneratePersistentSizesOnly) |
161 { |
175 { |
162 iRequestId++; |
176 iRequestId++; |
163 TN_DEBUG4( "CThumbnailManagerImpl::GetThumbnailL() URI==%S, iThumbnailSize==%d, req %d", &aObjectSource.Uri(), iThumbnailSize, iRequestId ); |
177 TN_DEBUG4( "CThumbnailManagerImpl::GetThumbnailL() URI==%S, iThumbnailSize==%d, req %d", &aObjectSource.Uri(), iThumbnailSize, iRequestId ); |
|
178 OstTraceExt3( TRACE_NORMAL, CTHUMBNAILMANAGERIMPL_GETTHUMBNAILL, "CThumbnailManagerImpl::GetThumbnailL;aObjectSource.Uri()=%S;iThumbnailSize=%d;iRequestId=%d", aObjectSource.Uri(), iThumbnailSize, iRequestId ); |
164 |
179 |
165 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
180 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
166 |
181 |
167 TInt priority = ValidatePriority(aPriority); |
182 TInt priority = ValidatePriority(aPriority); |
168 |
183 |
170 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, priority, iRequestQueue ); |
185 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, priority, iRequestQueue ); |
171 CleanupStack::PushL( getThumbnailActive ); |
186 CleanupStack::PushL( getThumbnailActive ); |
172 |
187 |
173 if(aObjectSource.Id() > 0) |
188 if(aObjectSource.Id() > 0) |
174 { |
189 { |
175 getThumbnailActive->GetThumbnailL( aObjectSource.Uri(), aObjectSource.Id(), iFlags, |
190 getThumbnailActive->GetThumbnailL( aObjectSource.Uri(), aObjectSource.Id(), |
176 iQualityPreference, iSize, iDisplayMode, priority, aClientData, aGeneratePersistentSizesOnly, |
191 aObjectSource.MimeType(),iFlags, iQualityPreference, iSize, iDisplayMode, |
177 KNullDesC, iThumbnailSize); |
192 priority, aClientData, aGeneratePersistentSizesOnly, KNullDesC, iThumbnailSize); |
178 } |
193 } |
179 else if ( aObjectSource.Uri().Length()) |
194 else if ( aObjectSource.Uri().Length()) |
180 { |
195 { |
181 getThumbnailActive->GetThumbnailL( aObjectSource.Uri(), aObjectSource.Id(), iFlags, |
196 getThumbnailActive->GetThumbnailL( aObjectSource.Uri(), aObjectSource.Id(), |
182 iQualityPreference, iSize, iDisplayMode, priority, aClientData, aGeneratePersistentSizesOnly, |
197 aObjectSource.MimeType(), iFlags, iQualityPreference, iSize, iDisplayMode, |
183 KNullDesC, iThumbnailSize ); |
198 priority, aClientData, aGeneratePersistentSizesOnly, KNullDesC, iThumbnailSize ); |
184 } |
199 } |
185 else |
200 else |
186 { |
201 { |
187 getThumbnailActive->GetThumbnailL( aObjectSource.FileHandle(), aObjectSource.Id(), iFlags, |
202 getThumbnailActive->GetThumbnailL( aObjectSource.FileHandle(), aObjectSource.Id(), |
188 iQualityPreference, iSize, iDisplayMode, priority, aClientData, aGeneratePersistentSizesOnly, |
203 aObjectSource.MimeType(), iFlags, iQualityPreference, iSize, iDisplayMode, |
189 KNullDesC, iThumbnailSize ); |
204 priority, aClientData, aGeneratePersistentSizesOnly, KNullDesC, iThumbnailSize ); |
190 } |
205 } |
191 |
206 |
192 iRequestQueue->AddRequestL( getThumbnailActive ); |
207 iRequestQueue->AddRequestL( getThumbnailActive ); |
193 CleanupStack::Pop( getThumbnailActive ); |
208 CleanupStack::Pop( getThumbnailActive ); |
194 |
209 |
195 iRequestQueue->Process(); |
210 iRequestQueue->Process(); |
196 |
211 |
197 TN_DEBUG2( "CThumbnailManagerImpl::GetThumbnailL() - request ID: %d", iRequestId ); |
212 TN_DEBUG2( "CThumbnailManagerImpl::GetThumbnailL() - request ID: %d", iRequestId ); |
|
213 OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILMANAGERIMPL_GETTHUMBNAILL, "CThumbnailManagerImpl::GetThumbnailL;iRequestId=%u", iRequestId ); |
198 |
214 |
199 return iRequestId; |
215 return iRequestId; |
200 } |
216 } |
201 |
217 |
202 // --------------------------------------------------------------------------- |
218 // --------------------------------------------------------------------------- |
220 TThumbnailRequestId CThumbnailManagerImpl::GetThumbnailL( const TThumbnailId |
236 TThumbnailRequestId CThumbnailManagerImpl::GetThumbnailL( const TThumbnailId |
221 aThumbnailId, TAny* aClientData /*= NULL*/, TInt aPriority) |
237 aThumbnailId, TAny* aClientData /*= NULL*/, TInt aPriority) |
222 { |
238 { |
223 iRequestId++; |
239 iRequestId++; |
224 TN_DEBUG4( "CThumbnailManagerImpl::GetThumbnailL() aThumbnailId==%d, iThumbnailSize==%d, req %d", aThumbnailId, iThumbnailSize, iRequestId ); |
240 TN_DEBUG4( "CThumbnailManagerImpl::GetThumbnailL() aThumbnailId==%d, iThumbnailSize==%d, req %d", aThumbnailId, iThumbnailSize, iRequestId ); |
|
241 OstTraceExt3( TRACE_NORMAL, DUP2_CTHUMBNAILMANAGERIMPL_GETTHUMBNAILL, "CThumbnailManagerImpl::GetThumbnailL;aThumbnailId=%u;iThumbnailSize=%u;iRequestId=%u", aThumbnailId, iThumbnailSize, iRequestId ); |
225 |
242 |
226 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
243 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
227 |
244 |
228 TInt priority = ValidatePriority(aPriority); |
245 TInt priority = ValidatePriority(aPriority); |
229 |
246 |
230 CThumbnailRequestActive* getThumbnailActive = CThumbnailRequestActive::NewL |
247 CThumbnailRequestActive* getThumbnailActive = CThumbnailRequestActive::NewL |
231 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, priority, iRequestQueue ); |
248 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, priority, iRequestQueue ); |
232 CleanupStack::PushL( getThumbnailActive ); |
249 CleanupStack::PushL( getThumbnailActive ); |
233 |
250 |
234 getThumbnailActive->GetThumbnailL( KNullDesC, aThumbnailId, iFlags, |
251 getThumbnailActive->GetThumbnailL( KNullDesC, aThumbnailId, KNullDesC8, |
235 iQualityPreference, iSize, iDisplayMode, priority, aClientData, |
252 iFlags, iQualityPreference, iSize, iDisplayMode, priority, aClientData, |
236 EFalse, KNullDesC, iThumbnailSize ); |
253 EFalse, KNullDesC, iThumbnailSize ); |
237 |
254 |
238 iRequestQueue->AddRequestL( getThumbnailActive ); |
255 iRequestQueue->AddRequestL( getThumbnailActive ); |
239 CleanupStack::Pop( getThumbnailActive ); |
256 CleanupStack::Pop( getThumbnailActive ); |
240 |
257 |
241 iRequestQueue->Process(); |
258 iRequestQueue->Process(); |
242 |
259 |
243 TN_DEBUG2( "CThumbnailManagerImpl::GetThumbnailL() - request ID: %d", iRequestId ); |
260 TN_DEBUG2( "CThumbnailManagerImpl::GetThumbnailL() - request ID: %d", iRequestId ); |
|
261 OstTrace1( TRACE_NORMAL, DUP3_CTHUMBNAILMANAGERIMPL_GETTHUMBNAILL, "CThumbnailManagerImpl::GetThumbnailL;iRequestId=%u", iRequestId ); |
244 |
262 |
245 return iRequestId; |
263 return iRequestId; |
246 } |
264 } |
247 |
265 |
248 |
266 |
265 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, priority, iRequestQueue ); |
283 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, priority, iRequestQueue ); |
266 CleanupStack::PushL( getThumbnailActive ); |
284 CleanupStack::PushL( getThumbnailActive ); |
267 |
285 |
268 if ( aObjectSource.Uri().Length()) |
286 if ( aObjectSource.Uri().Length()) |
269 { |
287 { |
270 getThumbnailActive->GetThumbnailL( aObjectSource.Uri(), aObjectSource.Id(), iFlags, |
288 getThumbnailActive->GetThumbnailL( aObjectSource.Uri(), aObjectSource.Id(), |
271 iQualityPreference, iSize, iDisplayMode, priority, aClientData, |
289 aObjectSource.MimeType(), iFlags, iQualityPreference, iSize, iDisplayMode, |
272 EFalse, aTargetUri, iThumbnailSize ); |
290 priority, aClientData, EFalse, aTargetUri, iThumbnailSize ); |
273 } |
291 } |
274 else |
292 else |
275 { |
293 { |
276 getThumbnailActive->GetThumbnailL( aObjectSource.FileHandle(), aObjectSource.Id(), |
294 getThumbnailActive->GetThumbnailL( aObjectSource.FileHandle(), aObjectSource.Id(), |
277 iFlags, iQualityPreference, iSize, iDisplayMode, priority, aClientData, |
295 aObjectSource.MimeType(), iFlags, iQualityPreference, iSize, iDisplayMode, |
278 EFalse, aTargetUri, iThumbnailSize ); |
296 priority, aClientData, EFalse, aTargetUri, iThumbnailSize ); |
279 } |
297 } |
280 |
298 |
281 iRequestQueue->AddRequestL( getThumbnailActive ); |
299 iRequestQueue->AddRequestL( getThumbnailActive ); |
282 CleanupStack::Pop( getThumbnailActive ); |
300 CleanupStack::Pop( getThumbnailActive ); |
283 |
301 |
284 iRequestQueue->Process(); |
302 iRequestQueue->Process(); |
285 |
303 |
286 TN_DEBUG2( "CThumbnailManagerImpl::ImportThumbnailL() - request ID: %d", iRequestId ); |
304 TN_DEBUG2( "CThumbnailManagerImpl::ImportThumbnailL() - request ID: %d", iRequestId ); |
|
305 OstTrace1( TRACE_NORMAL, CTHUMBNAILMANAGERIMPL_IMPORTTHUMBNAILL, "CThumbnailManagerImpl::ImportThumbnailL;iRequestId=%u", iRequestId ); |
287 |
306 |
288 return iRequestId; |
307 return iRequestId; |
289 } |
308 } |
290 |
309 |
291 // --------------------------------------------------------------------------- |
310 // --------------------------------------------------------------------------- |
350 TThumbnailRequestId CThumbnailManagerImpl::CreateThumbnails( |
370 TThumbnailRequestId CThumbnailManagerImpl::CreateThumbnails( |
351 CThumbnailObjectSource& aObjectSource, TInt aPriority ) |
371 CThumbnailObjectSource& aObjectSource, TInt aPriority ) |
352 { |
372 { |
353 TRAPD(err, |
373 TRAPD(err, |
354 TN_DEBUG2( "CThumbnailManagerImpl::CreateThumbnails() aObjectSource==%S ", &aObjectSource.Uri() ); |
374 TN_DEBUG2( "CThumbnailManagerImpl::CreateThumbnails() aObjectSource==%S ", &aObjectSource.Uri() ); |
|
375 OstTraceExt1( TRACE_NORMAL, CTHUMBNAILMANAGERIMPL_CREATETHUMBNAILS, "CThumbnailManagerImpl::CreateThumbnails;aObjectSource.Uri()=%S", aObjectSource.Uri() ); |
355 iRequestId++; |
376 iRequestId++; |
356 |
377 |
357 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
378 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
358 |
379 |
359 TInt priority = ValidatePriority(aPriority); |
380 TInt priority = ValidatePriority(aPriority); |
372 aObjectSource.Uri(), EUnknownThumbnailSize, EFalse); |
393 aObjectSource.Uri(), EUnknownThumbnailSize, EFalse); |
373 } |
394 } |
374 else if( !aObjectSource.Buffer() ) |
395 else if( !aObjectSource.Buffer() ) |
375 { |
396 { |
376 getThumbnailActive->GetThumbnailL( aObjectSource.Id(), |
397 getThumbnailActive->GetThumbnailL( aObjectSource.Id(), |
377 aObjectSource.Uri(), iFlags, iQualityPreference, iSize, |
398 aObjectSource.Uri(), aObjectSource.MimeType(), iFlags, |
378 iDisplayMode, priority, NULL, ETrue, aObjectSource.Uri(), |
399 iQualityPreference, iSize, iDisplayMode, priority, NULL, |
379 EUnknownThumbnailSize); |
400 ETrue, aObjectSource.Uri(), EUnknownThumbnailSize); |
380 } |
401 } |
381 else |
402 else |
382 { |
403 { |
383 // from buffer |
404 // from buffer |
384 getThumbnailActive->SetThumbnailL( aObjectSource.GetBufferOwnership(), |
405 getThumbnailActive->SetThumbnailL( aObjectSource.GetBufferOwnership(), |
515 aObjectSource ) |
537 aObjectSource ) |
516 { |
538 { |
517 TRAP_IGNORE( |
539 TRAP_IGNORE( |
518 iRequestId++; |
540 iRequestId++; |
519 TN_DEBUG2( "CThumbnailManagerImpl::DeleteThumbnails() URI==%S ", &aObjectSource.Uri() ); |
541 TN_DEBUG2( "CThumbnailManagerImpl::DeleteThumbnails() URI==%S ", &aObjectSource.Uri() ); |
|
542 OstTraceExt1( TRACE_NORMAL, CTHUMBNAILMANAGERIMPL_DELETETHUMBNAILS, "CThumbnailManagerImpl::DeleteThumbnails;aObjectSource.Uri()=%S", aObjectSource.Uri() ); |
520 |
543 |
521 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
544 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
522 |
545 |
523 CThumbnailRequestActive* getThumbnailActive = CThumbnailRequestActive::NewL |
546 CThumbnailRequestActive* getThumbnailActive = CThumbnailRequestActive::NewL |
524 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, CActive::EPriorityIdle, |
547 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, CActive::EPriorityIdle, |
558 void CThumbnailManagerImpl::DeleteThumbnails( const TThumbnailId aItemId ) |
581 void CThumbnailManagerImpl::DeleteThumbnails( const TThumbnailId aItemId ) |
559 { |
582 { |
560 TRAP_IGNORE( |
583 TRAP_IGNORE( |
561 iRequestId++; |
584 iRequestId++; |
562 TN_DEBUG2( "CThumbnailManagerImpl::DeleteThumbnails() aItemId==%d ", aItemId ); |
585 TN_DEBUG2( "CThumbnailManagerImpl::DeleteThumbnails() aItemId==%d ", aItemId ); |
|
586 OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILMANAGERIMPL_DELETETHUMBNAILS, "CThumbnailManagerImpl::DeleteThumbnails;aItemId=%u", aItemId ); |
563 |
587 |
564 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
588 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
565 |
589 |
566 CThumbnailRequestActive* getThumbnailActive = CThumbnailRequestActive::NewL |
590 CThumbnailRequestActive* getThumbnailActive = CThumbnailRequestActive::NewL |
567 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, CActive::EPriorityIdle, |
591 ( iFs, iSession, iObserver, iRequestObserver, iRequestId, CActive::EPriorityIdle, |
606 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
631 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
607 |
632 |
608 TInt priority = ValidatePriority(aNewPriority); |
633 TInt priority = ValidatePriority(aNewPriority); |
609 |
634 |
610 TN_DEBUG2( "CThumbnailManagerImpl::ChangePriority() - request ID: %d", aId ); |
635 TN_DEBUG2( "CThumbnailManagerImpl::ChangePriority() - request ID: %d", aId ); |
|
636 OstTrace1( TRACE_NORMAL, CTHUMBNAILMANAGERIMPL_CHANGEPRIORITY, "CThumbnailManagerImpl::ChangePriority;aId=%u", aId ); |
611 |
637 |
612 return iRequestQueue->ChangePriority(aId, priority); |
638 return iRequestQueue->ChangePriority(aId, priority); |
613 } |
639 } |
614 |
640 |
615 // --------------------------------------------------------------------------- |
641 // --------------------------------------------------------------------------- |
644 const TInt aOrientation, const TInt64 aModified, |
670 const TInt aOrientation, const TInt64 aModified, |
645 TInt aPriority ) |
671 TInt aPriority ) |
646 { |
672 { |
647 iRequestId++; |
673 iRequestId++; |
648 TN_DEBUG4( "CThumbnailManagerImpl::UpdateThumbnailsL() URI==%S, aItemId==%d, req %d", &aPath, aItemId, iRequestId); |
674 TN_DEBUG4( "CThumbnailManagerImpl::UpdateThumbnailsL() URI==%S, aItemId==%d, req %d", &aPath, aItemId, iRequestId); |
|
675 OstTraceExt3( TRACE_NORMAL, CTHUMBNAILMANAGERIMPL_UPDATETHUMBNAILSL, "CThumbnailManagerImpl::UpdateThumbnailsL;aPath=%S;aItemId=%d;iRequestId=%d", aPath, aItemId, iRequestId ); |
649 |
676 |
650 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
677 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
651 |
678 |
652 TInt priority = ValidatePriority(aPriority); |
679 TInt priority = ValidatePriority(aPriority); |
653 |
680 |
672 TThumbnailRequestId CThumbnailManagerImpl::RenameThumbnailsL( const TDesC& aCurrentPath, |
699 TThumbnailRequestId CThumbnailManagerImpl::RenameThumbnailsL( const TDesC& aCurrentPath, |
673 const TDesC& aNewPath, TInt aPriority ) |
700 const TDesC& aNewPath, TInt aPriority ) |
674 { |
701 { |
675 iRequestId++; |
702 iRequestId++; |
676 TN_DEBUG3( "CThumbnailManagerImpl::RenameThumbnailsL() URI==%S, req %d", &aCurrentPath, iRequestId); |
703 TN_DEBUG3( "CThumbnailManagerImpl::RenameThumbnailsL() URI==%S, req %d", &aCurrentPath, iRequestId); |
|
704 OstTraceExt1( TRACE_NORMAL, CTHUMBNAILMANAGERIMPL_RENAMETHUMBNAILSL, "CThumbnailManagerImpl::RenameThumbnailsL;aCurrentPath=%S", aCurrentPath ); |
677 |
705 |
678 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
706 __ASSERT_DEBUG(( iRequestId > 0 ), ThumbnailPanic( EThumbnailWrongId )); |
679 |
707 |
680 TInt priority = ValidatePriority(aPriority); |
708 TInt priority = ValidatePriority(aPriority); |
681 |
709 |
727 TInt CThumbnailManagerImpl::ValidatePriority( const TInt aPriority ) |
755 TInt CThumbnailManagerImpl::ValidatePriority( const TInt aPriority ) |
728 { |
756 { |
729 if (aPriority < CActive::EPriorityIdle) |
757 if (aPriority < CActive::EPriorityIdle) |
730 { |
758 { |
731 TN_DEBUG2( "CThumbnailManagerImpl::ValidatePriority() - priority %d too low for CActive", aPriority ); |
759 TN_DEBUG2( "CThumbnailManagerImpl::ValidatePriority() - priority %d too low for CActive", aPriority ); |
|
760 OstTrace1( TRACE_NORMAL, CTHUMBNAILMANAGERIMPL_VALIDATEPRIORITY, "CThumbnailManagerImpl::ValidatePriority - priority too low for CActive;aPriority=%d", aPriority ); |
732 return CActive::EPriorityIdle; |
761 return CActive::EPriorityIdle; |
733 } |
762 } |
734 else if (aPriority > CActive::EPriorityHigh) |
763 else if (aPriority > CActive::EPriorityHigh) |
735 { |
764 { |
736 TN_DEBUG2( "CThumbnailManagerImpl::ValidatePriority() - priority %d too high for CActive", aPriority ); |
765 TN_DEBUG2( "CThumbnailManagerImpl::ValidatePriority() - priority %d too high for CActive", aPriority ); |
|
766 OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILMANAGERIMPL_VALIDATEPRIORITY, "CThumbnailManagerImpl::ValidatePriority - priority too high for CActive;aPriority=%d", aPriority ); |
737 return CActive::EPriorityHigh; |
767 return CActive::EPriorityHigh; |
738 } |
768 } |
739 else |
769 else |
740 { |
770 { |
741 return aPriority; |
771 return aPriority; |