|
1 /* |
|
2 * Copyright (c) 2008-2009 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: This class browses file system |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include "glxcollectionpluginbase.h" |
|
24 |
|
25 #include <f32file.h> |
|
26 #include <glxfilterfactory.h> |
|
27 #include <glxlog.h> |
|
28 #include <glxmediageneraldefs.h> |
|
29 #include <glxthumbnailattributeinfo.h> |
|
30 #include <mpxcollectionmessagedefs.h> |
|
31 #include <mpxcollectionpath.h> |
|
32 #include <mpxcollectionpluginobserver.h> |
|
33 #include <mpxmedia.h> |
|
34 #include <mpxmediadrmdefs.h> |
|
35 #include <mpxmediageneraldefs.h> |
|
36 #include <mpxmessagegeneraldefs.h> |
|
37 #include <glxtracer.h> |
|
38 |
|
39 #include "glxcommandrequest.h" |
|
40 #include "glxgetrequest.h" |
|
41 #include "glxidlistrequest.h" |
|
42 #include "glxrequest.h" |
|
43 #include "glxstringcache.h" |
|
44 #include "glxthumbnailrequest.h" |
|
45 #include "mglxdatasource.h" |
|
46 |
|
47 |
|
48 // CONSTANTS |
|
49 const TGlxThumbnailRequest::TPriorityMode KGlxDefaultThumbnailPriority = TGlxThumbnailRequest::EPrioritizeQuality; |
|
50 |
|
51 // ============================ LOCAL FUNCTIONS ============================== |
|
52 |
|
53 // ============================ MEMBER FUNCTIONS ============================== |
|
54 |
|
55 // ---------------------------------------------------------------------------- |
|
56 // Constructor |
|
57 // ---------------------------------------------------------------------------- |
|
58 // |
|
59 EXPORT_C CGlxCollectionPluginBase::CGlxCollectionPluginBase() |
|
60 { |
|
61 TRACER("CGlxCollectionPluginBase::CGlxCollectionPluginBase()"); |
|
62 } |
|
63 // ---------------------------------------------------------------------------- |
|
64 // Destructor |
|
65 // ---------------------------------------------------------------------------- |
|
66 // |
|
67 EXPORT_C CGlxCollectionPluginBase::~CGlxCollectionPluginBase() |
|
68 { |
|
69 TRACER("CGlxCollectionPluginBase::~CGlxCollectionPluginBase()"); |
|
70 if (iDataSource) |
|
71 { |
|
72 iDataSource->Close(*this); |
|
73 } |
|
74 delete iPath; |
|
75 delete iStringCache; |
|
76 } |
|
77 |
|
78 |
|
79 // ---------------------------------------------------------------------------- |
|
80 // Executes a command on the selected collection |
|
81 // ---------------------------------------------------------------------------- |
|
82 // |
|
83 EXPORT_C void CGlxCollectionPluginBase::CommandL(TMPXCollectionCommand /*aCmd*/, TInt /*aArg*/) |
|
84 { |
|
85 TRACER("void CGlxCollectionPluginBase::CommandL(TMPXCollectionCommand /*aCmd*/, TInt /*aArg*/)"); |
|
86 User::Leave(KErrNotSupported); |
|
87 } |
|
88 |
|
89 // ---------------------------------------------------------------------------- |
|
90 // Executes a command on the selected collection |
|
91 // ---------------------------------------------------------------------------- |
|
92 // |
|
93 EXPORT_C void CGlxCollectionPluginBase::CommandL(CMPXCommand& aCmd) |
|
94 { |
|
95 TRACER("void CGlxCollectionPluginBase::CommandL(CMPXCommand& aCmd)"); |
|
96 CGlxCommandRequest* request = CGlxCommandRequest::NewL(aCmd, Uid(), *this); |
|
97 iDataSource->DataSourceRequestL(request, *this); |
|
98 } |
|
99 |
|
100 // ---------------------------------------------------------------------------- |
|
101 // Navigates to the given path |
|
102 // ---------------------------------------------------------------------------- |
|
103 // |
|
104 EXPORT_C void CGlxCollectionPluginBase::OpenL(const CMPXCollectionPath& aPath, |
|
105 const TArray<TMPXAttribute>& /*aAttrs*/, |
|
106 CMPXFilter* aFilter) |
|
107 { |
|
108 TRACER("void CGlxCollectionPluginBase::OpenL()"); |
|
109 iPath = CMPXCollectionPath::NewL(aPath); |
|
110 if(aFilter) |
|
111 { |
|
112 if(aFilter->IsSupported(KGlxFilterGeneralNavigationalStateOnly)) |
|
113 { |
|
114 RArray<TMPXItemId> mpxIds; |
|
115 CleanupClosePushL(mpxIds); |
|
116 iPath->AppendL(mpxIds.Array()); |
|
117 iObs->HandleOpen(iPath, KErrNone); |
|
118 CleanupStack::PopAndDestroy(&mpxIds); |
|
119 delete iPath; |
|
120 iPath = NULL; |
|
121 return; |
|
122 } |
|
123 } |
|
124 |
|
125 TGlxMediaId targetId(aPath.Id()); |
|
126 if (aPath.Levels() == KGlxCollectionRootLevel) |
|
127 { |
|
128 targetId = TGlxMediaId(KGlxCollectionRootId); |
|
129 } |
|
130 TInt level = aPath.Levels() + 1; // filter applies to new level we are retrieving |
|
131 CMPXFilter* filter = TGlxFilterFactory::CreateCombinedFilterL(DefaultFilter(level), aFilter, EFalse); |
|
132 CleanupStack::PushL(filter); |
|
133 CGlxIdListRequest* request = CGlxIdListRequest::NewL(targetId, Uid(), filter, *iPath); |
|
134 CleanupStack::PopAndDestroy(filter); |
|
135 iDataSource->DataSourceRequestL(request, *this); |
|
136 } |
|
137 |
|
138 // ---------------------------------------------------------------------------- |
|
139 // Extended properties of the current file (async) |
|
140 // ---------------------------------------------------------------------------- |
|
141 // |
|
142 EXPORT_C void CGlxCollectionPluginBase::MediaL(const CMPXCollectionPath& aPath, |
|
143 const TArray< TMPXAttribute >& aAttrs, |
|
144 const TArray<TCapability>& aCaps, |
|
145 CMPXAttributeSpecs* aSpecs) |
|
146 { |
|
147 TRACER("void CGlxCollectionPluginBase::MediaL()"); |
|
148 __ASSERT_DEBUG(aPath.Count(), Panic(EGlxPanicMediaRequestedWithEmptyPath)); |
|
149 |
|
150 TInt bitmapId = 0; |
|
151 |
|
152 TInt count = aAttrs.Count(); |
|
153 for( TInt i = 0; i < count; ++i ) |
|
154 { |
|
155 if( KGlxMediaIdThumbnail == aAttrs[i].ContentId() ) |
|
156 { |
|
157 bitmapId = aAttrs[i].AttributeId(); |
|
158 } |
|
159 } |
|
160 |
|
161 CGlxRequest* request = NULL; |
|
162 if(aSpecs && bitmapId) |
|
163 { |
|
164 TBool clientHasDRM = EFalse; |
|
165 for ( TInt i = 0; i < aCaps.Count(); ++i) |
|
166 { |
|
167 if(aCaps[i] == ECapabilityDRM) |
|
168 { |
|
169 clientHasDRM = ETrue; |
|
170 break; |
|
171 } |
|
172 } |
|
173 TSize size(0,0); |
|
174 TGlxThumbnailRequest::TPriorityMode priority = KGlxDefaultThumbnailPriority; |
|
175 TGlxThumbnailFilter filter = EGlxThumbnailFilterNone; |
|
176 TInt bitmapHandle = 0; |
|
177 TRect cropRect; |
|
178 const TMPXAttributeData sizeAttrib = { KGlxMediaIdThumbnail , KGlxAttribSpecThumbnailSize }; |
|
179 const TMPXAttributeData priorityAttrib = { KGlxMediaIdThumbnail , KGlxAttribSpecThumbnailQualityOverSpeed }; |
|
180 const TMPXAttributeData bitmapAttrib = { KGlxMediaIdThumbnail , KGlxAttribSpecThumbnailBitmapHandle }; |
|
181 const TMPXAttributeData cropAttrib = { KGlxMediaIdThumbnail , KGlxAttribSpecThumbnailCroppingRect }; |
|
182 const TMPXAttributeData filterAttrib = { KGlxMediaIdThumbnail , KGlxAttribSpecThumbnailFiltering }; |
|
183 |
|
184 if(aSpecs->IsSupported(sizeAttrib)) |
|
185 { |
|
186 size = aSpecs->ValueTObjectL<TSize>(sizeAttrib); |
|
187 } |
|
188 if(aSpecs->IsSupported(priorityAttrib)) |
|
189 { |
|
190 priority = aSpecs->ValueTObjectL<TBool>(priorityAttrib) ? TGlxThumbnailRequest::EPrioritizeQuality : TGlxThumbnailRequest::EPrioritizeSpeed; |
|
191 } |
|
192 if(aSpecs->IsSupported(bitmapAttrib)) |
|
193 { |
|
194 bitmapHandle = aSpecs->ValueTObjectL<TInt>(bitmapAttrib); |
|
195 } |
|
196 if(aSpecs->IsSupported(cropAttrib)) |
|
197 { |
|
198 cropRect = aSpecs->ValueTObjectL<TRect>(cropAttrib); |
|
199 } |
|
200 if(aSpecs->IsSupported(filterAttrib)) |
|
201 { |
|
202 filter = aSpecs->ValueTObjectL<TGlxThumbnailFilter>(filterAttrib); |
|
203 } |
|
204 |
|
205 |
|
206 TGlxThumbnailRequest tnRequest(TGlxMediaId(aPath.Id()), size, priority, bitmapHandle, clientHasDRM, cropRect, filter); |
|
207 CMPXFilter* defFilter = TGlxFilterFactory::CreateCombinedFilterL(DefaultFilter(aPath.Levels()), NULL, EFalse); |
|
208 CleanupStack::PushL(defFilter); |
|
209 request = CGlxThumbnailRequest::NewL(tnRequest, Uid(), bitmapId, defFilter); |
|
210 CleanupStack::PopAndDestroy(defFilter); |
|
211 |
|
212 CleanupStack::PushL(request); |
|
213 |
|
214 CGlxtnFileInfo* tnFileInfo = new (ELeave) CGlxtnFileInfo; |
|
215 CleanupStack::PushL(tnFileInfo); |
|
216 |
|
217 TInt countInfo(0); |
|
218 |
|
219 if(aSpecs->IsSupported(KMPXMediaGeneralSize)) |
|
220 { |
|
221 tnFileInfo->iFileSize = aSpecs->ValueTObjectL<TInt>(KMPXMediaGeneralSize); |
|
222 countInfo++; |
|
223 } |
|
224 if(aSpecs->IsSupported(KGlxMediaGeneralLastModifiedDate)) |
|
225 { |
|
226 tnFileInfo->iFileTime = aSpecs->ValueTObjectL<TInt64>(KGlxMediaGeneralLastModifiedDate); |
|
227 countInfo++; |
|
228 } |
|
229 if(aSpecs->IsSupported(KMPXMediaDrmProtected)) |
|
230 { |
|
231 tnFileInfo->iIsProtected = aSpecs->ValueTObjectL<TBool>(KMPXMediaDrmProtected); |
|
232 countInfo++; |
|
233 } |
|
234 if(aSpecs->IsSupported(KMPXMediaGeneralUri)) |
|
235 { |
|
236 tnFileInfo->SetFilePathL(aSpecs->ValueText(KMPXMediaGeneralUri)); |
|
237 countInfo++; |
|
238 } |
|
239 if(aSpecs->IsSupported(KMPXMediaGeneralCategory)) |
|
240 { |
|
241 TMPXGeneralCategory category = aSpecs->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory); |
|
242 if( EMPXVideo == category ) |
|
243 { |
|
244 tnFileInfo->iIsVideo = ETrue; |
|
245 countInfo++; |
|
246 } |
|
247 else if( EMPXImage == category ) |
|
248 { |
|
249 tnFileInfo->iIsVideo = EFalse; |
|
250 countInfo++; |
|
251 } |
|
252 } |
|
253 |
|
254 const TInt KGlxRequiredCountInfo = 5; |
|
255 CGlxThumbnailRequest* requestTn = static_cast<CGlxThumbnailRequest*>(request); |
|
256 if( KGlxRequiredCountInfo == countInfo ) |
|
257 { |
|
258 requestTn->SetThumbnailInfo(tnFileInfo); |
|
259 CleanupStack::Pop(tnFileInfo); |
|
260 } |
|
261 else |
|
262 { |
|
263 CleanupStack::PopAndDestroy(tnFileInfo); |
|
264 } |
|
265 |
|
266 CleanupStack::Pop(request); |
|
267 } |
|
268 else |
|
269 { |
|
270 request = GetRequestFactoryL(aPath, aAttrs); |
|
271 } |
|
272 iDataSource->DataSourceRequestL(request, *this); |
|
273 |
|
274 } |
|
275 |
|
276 // ---------------------------------------------------------------------------- |
|
277 // Cancel outstanding request |
|
278 // ---------------------------------------------------------------------------- |
|
279 // |
|
280 EXPORT_C void CGlxCollectionPluginBase::CancelRequest() |
|
281 { |
|
282 TRACER("void CGlxCollectionPluginBase::CancelRequest()"); |
|
283 iDataSource->CancelRequest(*this); |
|
284 } |
|
285 |
|
286 // ---------------------------------------------------------------------------- |
|
287 // Adds an item to the collection |
|
288 // ---------------------------------------------------------------------------- |
|
289 // |
|
290 EXPORT_C void CGlxCollectionPluginBase::AddL(const CMPXMedia& /*aNewMedia*/) |
|
291 { |
|
292 TRACER("void CGlxCollectionPluginBase::AddL()"); |
|
293 User::Leave(KErrNotSupported); |
|
294 } |
|
295 |
|
296 // ---------------------------------------------------------------------------- |
|
297 // Remove an item or items under a group from the collection |
|
298 // ---------------------------------------------------------------------------- |
|
299 // |
|
300 EXPORT_C void CGlxCollectionPluginBase::RemoveL(const CMPXCollectionPath& /*aPath*/) |
|
301 { |
|
302 TRACER("void CGlxCollectionPluginBase::RemoveL()"); |
|
303 User::Leave(KErrNotSupported); |
|
304 } |
|
305 |
|
306 // ---------------------------------------------------------------------------- |
|
307 // Remove an item or items under a group from the collection |
|
308 // ---------------------------------------------------------------------------- |
|
309 // |
|
310 EXPORT_C void CGlxCollectionPluginBase::RemoveL(const CMPXMedia& /*aMedia*/) |
|
311 { |
|
312 TRACER("void CGlxCollectionPluginBase::RemoveL()"); |
|
313 User::Leave(KErrNotSupported); |
|
314 } |
|
315 |
|
316 // ---------------------------------------------------------------------------- |
|
317 // Sets/updates the media for the item |
|
318 // ---------------------------------------------------------------------------- |
|
319 // |
|
320 EXPORT_C void CGlxCollectionPluginBase::SetL(const CMPXMedia& /*aMedia*/) |
|
321 { |
|
322 TRACER("void CGlxCollectionPluginBase::SetL(const CMPXMedia& /*aMedia*/)"); |
|
323 User::Leave(KErrNotSupported); |
|
324 } |
|
325 |
|
326 // ---------------------------------------------------------------------------- |
|
327 // FindAllL |
|
328 // ---------------------------------------------------------------------------- |
|
329 // |
|
330 EXPORT_C void CGlxCollectionPluginBase::FindAllL(const CMPXMedia& /*aCriteria*/, const TArray<TMPXAttribute>& /*aAttrs*/) |
|
331 { |
|
332 TRACER("void CGlxCollectionPluginBase::FindAllL()"); |
|
333 User::Leave(KErrNotSupported); |
|
334 } |
|
335 |
|
336 // ---------------------------------------------------------------------------- |
|
337 // FindAllL |
|
338 // ---------------------------------------------------------------------------- |
|
339 // |
|
340 EXPORT_C CMPXMedia* CGlxCollectionPluginBase::FindAllSyncL(const CMPXMedia& /*aCriteria*/, |
|
341 const TArray<TMPXAttribute>& /*aAttrs*/) |
|
342 { |
|
343 TRACER("CMPXMedia* CGlxCollectionPluginBase::FindAllSyncL()"); |
|
344 User::Leave(KErrNotSupported); |
|
345 return NULL; |
|
346 } |
|
347 |
|
348 |
|
349 // ---------------------------------------------------------------------------- |
|
350 // GetCapabilities |
|
351 // ---------------------------------------------------------------------------- |
|
352 // |
|
353 EXPORT_C TCollectionCapability CGlxCollectionPluginBase::GetCapabilities() |
|
354 { |
|
355 TRACER("TCollectionCapability CGlxCollectionPluginBase::GetCapabilities()"); |
|
356 return 0; |
|
357 } |
|
358 |
|
359 EXPORT_C void CGlxCollectionPluginBase::HandleResponse(CMPXMedia* aResponse, CGlxRequest* aRequest, const TInt& aError) |
|
360 { |
|
361 TRACER("void CGlxCollectionPluginBase::HandleResponse()"); |
|
362 |
|
363 if (dynamic_cast<CGlxIdListRequest*>(aRequest)) |
|
364 // iRequest is a CGlxIdListRequest |
|
365 { |
|
366 iObs->HandleOpen(iPath, aError); |
|
367 delete iPath; |
|
368 iPath = NULL; |
|
369 } |
|
370 else if (dynamic_cast<CGlxThumbnailRequest*>(aRequest)) |
|
371 // iRequest is a CGlxThumbnailRequest |
|
372 { |
|
373 iObs->HandleMedia(aResponse, aError); |
|
374 } |
|
375 else if (dynamic_cast<CGlxGetRequest*>(aRequest)) |
|
376 // iRequest is a CGlxGetRequest |
|
377 { |
|
378 TInt error = aError; |
|
379 CGlxGetRequest* getRequest = static_cast<CGlxGetRequest*>(aRequest); |
|
380 TBool b = getRequest->CpiAttributesSet(); |
|
381 if(b && ( KErrNone == error )) |
|
382 { |
|
383 TRAP(error, HandleCpiAttributeResponseL(aResponse, getRequest->CpiAttributes(), getRequest->MediaIds().Array())); |
|
384 } |
|
385 iObs->HandleMedia(aResponse, error); |
|
386 } |
|
387 else if (dynamic_cast<CGlxCommandRequest*>(aRequest)) |
|
388 // iRequest is a CGlxCommandRequest |
|
389 { |
|
390 iObs->HandleCommandComplete(aResponse, aError); |
|
391 } |
|
392 else |
|
393 { |
|
394 // Other request types not handled |
|
395 Panic(EGlxPanicLogicError); |
|
396 } |
|
397 } |
|
398 |
|
399 CGlxRequest* CGlxCollectionPluginBase::GetRequestFactoryL(const CMPXCollectionPath& aPath, const TArray<TMPXAttribute>& aAttrs) |
|
400 { |
|
401 TRACER("CGlxRequest* CGlxCollectionPluginBase::GetRequestFactoryL()"); |
|
402 TBool doNotNeedDataSource = EFalse; |
|
403 RArray<TGlxMediaId> mediaIdArray; |
|
404 |
|
405 CleanupClosePushL(mediaIdArray); |
|
406 |
|
407 if( aPath.Levels() == KGlxCollectionRootLevel) |
|
408 { |
|
409 __ASSERT_DEBUG(Uid().iUid == (TUint32)aPath.Id(), Panic(EGlxPanicIllegalArgument)); |
|
410 mediaIdArray.AppendL(TGlxMediaId(KGlxCollectionRootId)); |
|
411 doNotNeedDataSource = ETrue; |
|
412 } |
|
413 else |
|
414 { |
|
415 // Add the media Ids to the iMediaIdArray |
|
416 TArray<TInt> selection = aPath.Selection(); |
|
417 TInt selectedCount = selection.Count(); |
|
418 if (selectedCount) |
|
419 // Items are selected; We require the attributes for the selected items. |
|
420 { |
|
421 for (TInt i = 0; i < selectedCount; i++) |
|
422 { |
|
423 const TMPXItemId& itemId = aPath.IdOfIndex(selection[i]); |
|
424 mediaIdArray.AppendL(TGlxMediaId(itemId)); |
|
425 } |
|
426 } |
|
427 else // No items are selected; We will use the current item |
|
428 { |
|
429 mediaIdArray.AppendL(TGlxMediaId(aPath.Id())); |
|
430 } |
|
431 |
|
432 } |
|
433 |
|
434 // Add the attributes to the attributeArray |
|
435 RArray<TMPXAttribute> attributeArray; |
|
436 CleanupClosePushL(attributeArray); |
|
437 RArray<TMPXAttribute> cpiAttributeArray; |
|
438 CleanupClosePushL(cpiAttributeArray); |
|
439 |
|
440 for (TInt i = 0; i < aAttrs.Count(); i++) |
|
441 { |
|
442 if( KGlxMediaIdCollectionPluginSpecific == aAttrs[i].ContentId()) |
|
443 { |
|
444 cpiAttributeArray.AppendL(aAttrs[i]); |
|
445 CpiAttributeAdditionalAttributes(aAttrs[i], attributeArray); |
|
446 doNotNeedDataSource = EFalse; |
|
447 } |
|
448 else |
|
449 { |
|
450 if ( aAttrs[i] == KMPXMediaGeneralCount ) |
|
451 { |
|
452 doNotNeedDataSource = EFalse; |
|
453 } |
|
454 attributeArray.AppendL(aAttrs[i]); |
|
455 } |
|
456 } |
|
457 |
|
458 CMPXFilter* filter = TGlxFilterFactory::CreateCombinedFilterL(DefaultFilter(aPath.Levels()), NULL, EFalse); |
|
459 CleanupStack::PushL(filter); |
|
460 CGlxRequest* request = CGlxGetRequest::NewL(mediaIdArray, attributeArray, cpiAttributeArray, Uid(), filter, doNotNeedDataSource); // Array contents ownership transferred |
|
461 CleanupStack::PopAndDestroy(filter); |
|
462 CleanupStack::Pop(&cpiAttributeArray); |
|
463 CleanupStack::Pop(&attributeArray); |
|
464 CleanupStack::Pop(&mediaIdArray); |
|
465 return request; |
|
466 } |
|
467 |
|
468 |
|
469 EXPORT_C void CGlxCollectionPluginBase::HandleMessage(CMPXMessage& aMessage) |
|
470 { |
|
471 TRACER("void CGlxCollectionPluginBase::HandleMessage(CMPXMessage& aMessage)"); |
|
472 aMessage.SetTObjectValueL<TUid>(KMPXMessageCollectionId, Uid()); |
|
473 iObs->HandleMessage(&aMessage, KErrNone); |
|
474 } |
|
475 |
|
476 EXPORT_C TBool CGlxCollectionPluginBase::IsUpdateMessageIgnored(CMPXMessage& /*aMessage*/) |
|
477 { |
|
478 TRACER("TBool CGlxCollectionPluginBase::IsUpdateMessageIgnored(CMPXMessage& /*aMessage*/)"); |
|
479 // Default implementation ignores all update messages |
|
480 return ETrue; |
|
481 } |
|
482 |
|
483 EXPORT_C void CGlxCollectionPluginBase::CpiAttributeAdditionalAttributes(const TMPXAttribute& /*aCpiAttribute*/, RArray<TMPXAttribute>& /*aAttributeArray*/) |
|
484 { |
|
485 TRACER("void CGlxCollectionPluginBase::CpiAttributeAdditionalAttributes()"); |
|
486 // Default implementation does not require additional attributes |
|
487 } |
|
488 |
|
489 EXPORT_C void CGlxCollectionPluginBase::HandleCpiAttributeResponseL(CMPXMedia* /*aResponse*/, TArray<TMPXAttribute> /*aCpiAttributes*/, TArray<TGlxMediaId> /* aMediaIds */) |
|
490 { |
|
491 TRACER("void CGlxCollectionPluginBase::HandleCpiAttributeResponseL()"); |
|
492 // Base class does not support CPI specific attributes, deriving class must override. |
|
493 User::Leave(KErrNotSupported); |
|
494 } |
|
495 |
|
496 EXPORT_C HBufC* CGlxCollectionPluginBase::LoadLocalizedStringLC(const TDesC& aResourceFile, const TInt aResourceId) |
|
497 { |
|
498 TRACER("void CGlxCollectionPluginBase::LoadLocalizedStringLC()"); |
|
499 |
|
500 if (!iStringCache) |
|
501 { |
|
502 iStringCache = CGlxStringCache::NewL(); |
|
503 } |
|
504 return (iStringCache->LoadLocalizedStringLC(aResourceFile,aResourceId)); |
|
505 } |
|
506 |
|
507 |
|
508 EXPORT_C TGlxFilterProperties CGlxCollectionPluginBase::DefaultFilter(TInt /*aLevel*/) |
|
509 { |
|
510 TRACER("TGlxFilterProperties CGlxCollectionPluginBase::DefaultFilter(TInt /*aLevel*/)"); |
|
511 TGlxFilterProperties filterProperties; |
|
512 filterProperties.iSortOrder = EGlxFilterSortOrderCaptureDate; |
|
513 filterProperties.iSortDirection = EGlxFilterSortDirectionDescending; |
|
514 |
|
515 return filterProperties; |
|
516 } |
|
517 |
|
518 |
|
519 |
|
520 // End of file |