35 #include <glxfilterfactory.h> |
35 #include <glxfilterfactory.h> |
36 #include <glxuistd.h> |
36 #include <glxuistd.h> |
37 #include <glxthumbnailcontext.h> |
37 #include <glxthumbnailcontext.h> |
38 #include <glxmedialistiterator.h> |
38 #include <glxmedialistiterator.h> |
39 #include <mglxcache.h> |
39 #include <mglxcache.h> |
|
40 #include <glxthumbnailattributeinfo.h> |
40 |
41 |
41 #include "glxcontentharvesterplugin.h" |
42 #include "glxcontentharvesterplugin.h" |
42 #include "glxcontentharvesterpluginbase.h" |
43 #include "glxcontentharvesterpluginbase.h" |
43 #include "glxcontentharvesterplugin.hrh" |
44 #include "glxcontentharvesterplugin.hrh" |
44 #include "glxmapconstants.h" |
45 #include "glxmapconstants.h" |
445 cptype.Reset(); |
446 cptype.Reset(); |
446 |
447 |
447 } |
448 } |
448 |
449 |
449 // --------------------------------------------------------------------------- |
450 // --------------------------------------------------------------------------- |
450 // CreateMedialistAndThumbnailContextL |
451 // CreateMedialistAndAttributeContextL |
451 // --------------------------------------------------------------------------- |
452 // --------------------------------------------------------------------------- |
452 // |
453 // |
453 MGlxMediaList* CGlxContentHarvesterPluginBase::CreateMedialistAndThumbnailContextL(const TGlxMediaId& |
454 MGlxMediaList* CGlxContentHarvesterPluginBase::CreateMedialistAndAttributeContextL( |
454 aPluginId,CGlxThumbnailContext* aThumbnailContext) const |
455 const TGlxMediaId& aPluginId, |
455 { |
456 CGlxAttributeContext* aUriAttributeContext, |
456 TRACER( "CGlxContentHarvesterPluginBase::CreateMedialistAndThumbnailContextL" ); |
457 CGlxAttributeContext* aThumbnailAttributeContext) const |
457 |
458 { |
458 CMPXCollectionPath* path = CMPXCollectionPath::NewL(); |
459 TRACER( "CGlxContentHarvesterPluginBase::CreateMedialistAndThumbnailContextL" ); |
459 CleanupStack::PushL( path ); |
460 |
460 path->AppendL( aPluginId.Value() ); |
461 CMPXCollectionPath* path = CMPXCollectionPath::NewL(); |
461 |
462 CleanupStack::PushL( path ); |
462 CMPXFilter* filter = NULL; |
463 path->AppendL( aPluginId.Value() ); |
463 filter = TGlxFilterFactory::CreatePreviewFilterL(); |
464 |
464 CleanupStack::PushL( filter ); |
465 CMPXFilter* filter = NULL; |
465 |
466 filter = TGlxFilterFactory::CreatePreviewFilterL(); |
466 MGlxMediaList* mediaList = MGlxMediaList::InstanceL( *path, KGlxIdNone , filter); |
467 CleanupStack::PushL( filter ); |
467 CleanupStack::PopAndDestroy( filter ); |
468 |
468 CleanupStack::PopAndDestroy( path ); |
469 MGlxMediaList* mediaList = MGlxMediaList::InstanceL( *path, KGlxIdNone , filter); |
469 aThumbnailContext->SetDefaultSpec(iGridIconSize.iWidth,iGridIconSize.iHeight); |
470 CleanupStack::PopAndDestroy( filter ); |
470 return mediaList; |
471 CleanupStack::PopAndDestroy( path ); |
471 } |
472 |
|
473 // Two different contexts are added. One for URI with high priority |
|
474 // and for Thumbnail with low priority. Because URI attribute should be |
|
475 // fetched first before placing thumbnail fetch request |
|
476 |
|
477 aUriAttributeContext->AddAttributeL(KMPXMediaGeneralUri); |
|
478 |
|
479 TMPXAttribute attr( KGlxMediaIdThumbnail, |
|
480 GlxFullThumbnailAttributeId(ETrue, |
|
481 iGridIconSize.iWidth,iGridIconSize.iHeight) ); |
|
482 |
|
483 aThumbnailAttributeContext->SetDefaultSpec(iGridIconSize.iWidth, |
|
484 iGridIconSize.iHeight); |
|
485 |
|
486 aThumbnailAttributeContext->AddAttributeL(attr); |
|
487 |
|
488 return mediaList; |
|
489 } |
472 |
490 |
473 // --------------------------------------------------------------------------- |
491 // --------------------------------------------------------------------------- |
474 // CGlxContentHarvesterPluginBase::IsFocused |
492 // CGlxContentHarvesterPluginBase::IsFocused |
475 // --------------------------------------------------------------------------- |
493 // --------------------------------------------------------------------------- |
476 // |
494 // |