engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp
changeset 58 383b67fbdb11
parent 44 aa2fa096cbfb
equal deleted inserted replaced
54:0f0f3f26f787 58:383b67fbdb11
    45 #include "mglxdatasource.h"
    45 #include "mglxdatasource.h"
    46 
    46 
    47 
    47 
    48 // CONSTANTS
    48 // CONSTANTS
    49 const TGlxThumbnailRequest::TPriorityMode KGlxDefaultThumbnailPriority = TGlxThumbnailRequest::EPrioritizeQuality;
    49 const TGlxThumbnailRequest::TPriorityMode KGlxDefaultThumbnailPriority = TGlxThumbnailRequest::EPrioritizeQuality;
       
    50 const TInt KFavoriteAlbumId = 1 ;
       
    51 const TInt KCapturedAlbumId = 2 ;
    50 
    52 
    51 // ============================ LOCAL FUNCTIONS ==============================
    53 // ============================ LOCAL FUNCTIONS ==============================
    52     
    54     
    53 // ============================ MEMBER FUNCTIONS ==============================
    55 // ============================ MEMBER FUNCTIONS ==============================
    54 
    56 
   445 		// Items are selected; We require the attributes for the selected items.
   447 		// Items are selected; We require the attributes for the selected items.
   446 			{
   448 			{
   447 			for (TInt i = 0; i < selectedCount; i++)
   449 			for (TInt i = 0; i < selectedCount; i++)
   448 				{
   450 				{
   449 				const TMPXItemId& itemId = aPath.IdOfIndex(selection[i]);
   451 				const TMPXItemId& itemId = aPath.IdOfIndex(selection[i]);
   450 				mediaIdArray.AppendL(TGlxMediaId(itemId));
   452 				if(itemId.operator ==(KCapturedAlbumId))//captured
       
   453 				    {
       
   454                     mediaIdArray.Insert(TGlxMediaId(itemId),0);
       
   455 				    }
       
   456 				else if(itemId.operator ==(KFavoriteAlbumId))//favourites
       
   457 				    {
       
   458                     mediaIdArray.Insert(TGlxMediaId(itemId),0);
       
   459 				    }
       
   460 				else
       
   461 				    {
       
   462                     mediaIdArray.AppendL(TGlxMediaId(itemId));
       
   463 				    }
   451 				}
   464 				}
   452 			}
   465 			}
   453 		else // No items are selected; We will use the current item
   466 		else // No items are selected; We will use the current item
   454 			{
   467 			{
   455 			mediaIdArray.AppendL(TGlxMediaId(aPath.Id()));
   468 			mediaIdArray.AppendL(TGlxMediaId(aPath.Id()));