photosgallery/contentharvesterplugin/src/glxcontentharvesterpluginalbums.cpp
branchRCL_3
changeset 13 bcb43dc84c44
parent 12 ce1c7ad1f18b
child 14 2dac0fdba72b
equal deleted inserted replaced
12:ce1c7ad1f18b 13:bcb43dc84c44
     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:    Updates CPS storage for albums collection
       
    15  *
       
    16  */
       
    17 
       
    18 // INCLUDE FILES
       
    19 
       
    20 #include <mmf/common/mmfcontrollerpluginresolver.h>
       
    21 #include <liwservicehandler.h>
       
    22 
       
    23 #include <glxuistd.h>
       
    24 #include <glxicons.mbg>   // Glx Icons
       
    25 #include <glxcollectionpluginalbums.hrh> //for  KGlxCollectionPluginAlbumsImplementationUid
       
    26 #include <glxthumbnailattributeinfo.h>  // for KGlxMediaIdThumbnail
       
    27 #include <glxattributecontext.h>
       
    28 #include <glxthumbnailcontext.h>
       
    29 #include <glxtracer.h>                //for tracer
       
    30 #include <glxlog.h>                   // for log
       
    31 #include <mglxmedialist.h>       // for MGlxMediaList
       
    32 #include <glxcollectiongeneraldefs.h>
       
    33 #include <glxgallery.hrh>               // for KGlxGalleryApplicationUid
       
    34 #include <glxmediaid.h>
       
    35 #include <glxerrormanager.h>      
       
    36 
       
    37 #include "glxcontentharvesterpluginalbums.h"
       
    38 #include "glxcontentharvesterplugin.hrh"
       
    39 #include "glxmapconstants.h"
       
    40 
       
    41 
       
    42 // ============================ MEMBER FUNCTIONS ==============================
       
    43 
       
    44 // ----------------------------------------------------------------------------
       
    45 // Constructor
       
    46 // ----------------------------------------------------------------------------
       
    47 //
       
    48 CGlxContentHarvesterPluginAlbums::CGlxContentHarvesterPluginAlbums( 
       
    49         MLiwInterface* aCPSInterface,
       
    50         MGlxContentHarvesterPlugin* aCHplugin )
       
    51     {
       
    52     TRACER( "CGlxContentHarvesterPluginAlbums::CGlxContentHarvesterPluginAlbums" );
       
    53     iCPSInterface = aCPSInterface;
       
    54     SetCHPlugin(aCHplugin);
       
    55     }
       
    56 
       
    57 // ----------------------------------------------------------------------------
       
    58 // Symbian 2nd phase constructor can leave.
       
    59 // ----------------------------------------------------------------------------
       
    60 //
       
    61 void CGlxContentHarvesterPluginAlbums::ConstructL()
       
    62     {
       
    63     TRACER( "CGlxContentHarvesterPluginAlbums::ConstructL" );
       
    64     
       
    65     //Call the base class ConstructL
       
    66     CGlxContentHarvesterPluginBase::ConstructL(EMbmGlxiconsQgn_prop_image_notcreated);
       
    67     iUriAttributeContext = new (ELeave) CGlxAttributeContext(&iThumbnailIterator); 
       
    68     iThumbnailAttributeContext = new (ELeave) CGlxAttributeContext(&iThumbnailIterator); 
       
    69     
       
    70     //Register/Subscribe with matrix menu for the notifications 
       
    71     GetInterfaceForNotificationL();
       
    72     SetupPublisherL(KItemIndexAlbums);
       
    73     RequestCpsNotificationL(KItemIndexAlbums);
       
    74     HandleStateChangeL(KItemIndexAlbums);
       
    75     }
       
    76 
       
    77 // ----------------------------------------------------------------------------
       
    78 // Two-phased constructor.
       
    79 // ----------------------------------------------------------------------------
       
    80 //
       
    81 CGlxContentHarvesterPluginAlbums* CGlxContentHarvesterPluginAlbums::NewLC( 
       
    82         MLiwInterface* aCPSInterface,
       
    83         MGlxContentHarvesterPlugin* aCHplugin )
       
    84     {
       
    85     TRACER( "CGlxContentHarvesterPluginAlbums::NewL" );
       
    86     CGlxContentHarvesterPluginAlbums* self = new ( ELeave ) CGlxContentHarvesterPluginAlbums( aCPSInterface,aCHplugin );
       
    87     CleanupStack::PushL(self);
       
    88     self->ConstructL();
       
    89     return self;
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------------------------
       
    93 // Destructor
       
    94 // ---------------------------------------------------------------------------
       
    95 //
       
    96 CGlxContentHarvesterPluginAlbums::~CGlxContentHarvesterPluginAlbums()
       
    97     {
       
    98     TRACER( "CGlxContentHarvesterPluginAlbums::~CGlxContentHarvesterPluginAlbums" );
       
    99 
       
   100     DestroyMedialist();
       
   101     }
       
   102 
       
   103 // ----------------------------------------------------------------------------
       
   104 // CGlxContentHarvesterPluginAlbums::UpdateDataL()
       
   105 // ----------------------------------------------------------------------------
       
   106 //
       
   107 void CGlxContentHarvesterPluginAlbums::UpdateDataL() 
       
   108     {
       
   109     TRACER( "CGlxContentHarvesterPluginAlbums::UpdateDataL" );
       
   110 
       
   111     if (!iMediaList)
       
   112         {
       
   113         return;
       
   114         }
       
   115 
       
   116     if (iMediaList->Count())
       
   117         {
       
   118         TInt ret = UpdateItem(KPreviewItemIndex);
       
   119         if (ret != KErrNotFound)
       
   120             {
       
   121             //Updates the thumbnail in the collection 
       
   122             UpdateDataInCPSL(ret);
       
   123             }
       
   124         }
       
   125     else
       
   126         {
       
   127         // Show previous thumbnail until the new thumbnail is
       
   128         // fecthed.Added this check to avoid flicker
       
   129         if (!GetCHPlugin()->IsRefreshNeeded() || (iMediaList->Count() == 0))
       
   130             {
       
   131             //Don't Show the Thumbnail/Show nothing
       
   132             GLX_LOG_INFO("CGlxContentHarvesterPluginAlbums::UpdateDataL() --O");
       
   133             UpdateDataInCPSL(GetBitmapHandle());
       
   134             }
       
   135         }
       
   136     }
       
   137 
       
   138 // ----------------------------------------------------------------------------
       
   139 // CGlxContentHarvesterPluginAlbums::HandleNotifyL()
       
   140 // ----------------------------------------------------------------------------
       
   141 //
       
   142 TInt CGlxContentHarvesterPluginAlbums::HandleNotifyL(
       
   143         TInt /* aCmdId*/,
       
   144         TInt/* aEventId */,
       
   145         CLiwGenericParamList& /*aEventParamList*/,
       
   146         const CLiwGenericParamList& /*aInParamList*/ )
       
   147     {
       
   148     TRACER( "CGlxContentHarvesterPluginAlbums::HandleNotifyL" );
       
   149     HandleStateChangeL(KItemIndexAlbums);
       
   150     return KErrNone;
       
   151     }
       
   152 
       
   153 // ----------------------------------------------------------------------------
       
   154 // CGlxContentHarvesterPluginAlbums::UpdateDataInCPSL()
       
   155 // ----------------------------------------------------------------------------
       
   156 // 
       
   157 void CGlxContentHarvesterPluginAlbums::UpdateDataInCPSL(TInt aHandle) 
       
   158     {
       
   159     TRACER( "CGlxContentHarvesterPluginAlbums::UpdateDataInCPSL" );
       
   160     //update data in CPS
       
   161     _LIT(KExamplePluginPub,"photossuite");
       
   162     _LIT(KContTypeText,"albums");
       
   163     _LIT(KContId1,"category1");
       
   164 
       
   165     if(iCPSInterface && iMediaList )
       
   166         {
       
   167         CLiwGenericParamList* inParamList = CLiwGenericParamList::NewLC();
       
   168         CLiwGenericParamList* outParamList = CLiwGenericParamList::NewLC();
       
   169 
       
   170         FillInputListWithDataL(inParamList, KExamplePluginPub, KContTypeText , 
       
   171                 KContId1, aHandle);
       
   172 
       
   173         iCPSInterface->ExecuteCmdL( KAdd,  *inParamList, *outParamList );
       
   174         CleanupStack::PopAndDestroy(outParamList);
       
   175         CleanupStack::PopAndDestroy(inParamList);
       
   176         }
       
   177     }
       
   178 
       
   179 // ----------------------------------------------------------------------------
       
   180 // CGlxContentHarvesterPluginAlbums::UpdateItem()
       
   181 // ----------------------------------------------------------------------------
       
   182 //
       
   183 TInt CGlxContentHarvesterPluginAlbums::UpdateItem(TInt aItemIndex)
       
   184     {
       
   185     TRACER( "CGlxContentHarvesterPluginAlbums::UpdateItem" );
       
   186     const TGlxMedia& item = iMediaList->Item(aItemIndex);
       
   187     TSize gridIconSize = GetGridIconSize();
       
   188     TMPXAttribute thumbnailAttribute(KGlxMediaIdThumbnail, 
       
   189             GlxFullThumbnailAttributeId( ETrue,  gridIconSize.iWidth, gridIconSize.iHeight ) );
       
   190     GLX_LOG_INFO1("CGlxContentHarvesterPluginAlbums::UpdateItem,aItemIndex=%d ",aItemIndex);
       
   191     const CGlxThumbnailAttribute* value = item.ThumbnailAttribute( thumbnailAttribute );
       
   192     if (value)
       
   193         {
       
   194         return value->iBitmap->Handle();
       
   195         }
       
   196     return KErrNotFound;
       
   197     }
       
   198 
       
   199 // ----------------------------------------------------------------------------
       
   200 // CGlxContentHarvesterPluginAlbums::ActivateL()
       
   201 // ----------------------------------------------------------------------------
       
   202 //
       
   203 void CGlxContentHarvesterPluginAlbums::ActivateL( TBool aOn )
       
   204     {
       
   205     TRACER( "CGlxContentHarvesterPluginAlbums::ActivateL" );
       
   206 
       
   207     GLX_LOG_INFO1("CGlxContentHarvesterPluginAlbums::ActivateL aOn =%d",aOn);
       
   208     SetFocus(aOn);
       
   209 
       
   210     if (IsMatrixMenuInForegroundL() && aOn )
       
   211         {
       
   212         if(GetCHPlugin()->IsRefreshNeeded())
       
   213             {
       
   214             //Update the rest of all the collections on receving the focus...
       
   215             GetCHPlugin()->UpdatePlugins(aOn);     
       
   216             }
       
   217         else
       
   218             {
       
   219             //As the collection is not updated by the contentharvester plugin
       
   220             //to update the thumbnails on the focus , need to call the below function
       
   221             UpdatePreviewThumbnailListL();
       
   222             }
       
   223         }
       
   224     else if ( !aOn )
       
   225         {
       
   226          if(!IsMatrixMenuInForegroundL())
       
   227             {
       
   228             //use case:Matrix Menu is exited, by entering into grid view,application view,capture mode...
       
   229             //Need to destroy all the collection's observers and context
       
   230             GLX_LOG_INFO1("CGlxContentHarvesterPluginAlbums::ActivateL !aOn =%d and matrix not in foreground",aOn);
       
   231             GetCHPlugin()->UpdatePlugins(aOn);
       
   232             }
       
   233         }
       
   234     }
       
   235 
       
   236 // ----------------------------------------------------------------------------
       
   237 // CGlxContentHarvesterPluginAlbums::HandleItemAddedL
       
   238 // ----------------------------------------------------------------------------
       
   239 //
       
   240 void CGlxContentHarvesterPluginAlbums::HandleItemAddedL(TInt /*aStartIndex*/, TInt /*aEndIndex*/, 
       
   241         MGlxMediaList* /*aList*/)
       
   242     {
       
   243     TRACER( "CGlxContentHarvesterPluginAlbums::HandleItemAddedL" );
       
   244     }
       
   245 
       
   246 // ---------------------------------------------------------------------------
       
   247 // CGlxContentHarvesterPluginAlbums::HandleMediaL
       
   248 // ---------------------------------------------------------------------------
       
   249 //
       
   250 void CGlxContentHarvesterPluginAlbums::HandleMediaL(TInt /*aListIndex*/, 
       
   251         MGlxMediaList* /*aList*/)
       
   252     {
       
   253     TRACER( "CGlxContentHarvesterPluginAlbums::HandleMediaL" );
       
   254     } 
       
   255 
       
   256 // ---------------------------------------------------------------------------
       
   257 // CGlxContentHarvesterPluginAlbums::HandleItemRemovedL
       
   258 // ---------------------------------------------------------------------------
       
   259 //
       
   260 void CGlxContentHarvesterPluginAlbums::HandleItemRemovedL(TInt /*aStartIndex*/, 
       
   261         TInt /* aEndIndex */, MGlxMediaList* /*aList*/)
       
   262     {
       
   263     TRACER( "CGlxContentHarvesterPluginAlbums::HandleItemRemovedL" );
       
   264     }
       
   265 
       
   266 // ---------------------------------------------------------------------------
       
   267 // CGlxContentHarvesterPluginAlbums::HandleItemModifiedL
       
   268 // ---------------------------------------------------------------------------
       
   269 //
       
   270 void CGlxContentHarvesterPluginAlbums::HandleItemModifiedL(
       
   271         const RArray<TInt>& /*aItemIndexes*/, 
       
   272         MGlxMediaList* /*aList*/)
       
   273     {
       
   274     TRACER( "CGlxContentHarvesterPluginAlbums::HandleItemModifiedL" );
       
   275     }
       
   276 
       
   277 // ---------------------------------------------------------------------------
       
   278 // CGlxContentHarvesterPluginAlbums::HandleAttributesAvailableL
       
   279 // ---------------------------------------------------------------------------
       
   280 //
       
   281 void CGlxContentHarvesterPluginAlbums::HandleAttributesAvailableL(TInt aItemIndex, 
       
   282         const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList)
       
   283     {
       
   284     TRACER( "CGlxContentHarvesterPluginAlbums::HandleAttributesAvailableL" );
       
   285     TSize gridIconSize = GetGridIconSize();
       
   286     TMPXAttribute thumbnailAttribute(KGlxMediaIdThumbnail, 
       
   287             GlxFullThumbnailAttributeId( ETrue,  gridIconSize.iWidth, gridIconSize.iHeight ) );
       
   288 
       
   289     TIdentityRelation< TMPXAttribute > match ( &TMPXAttribute::Match );
       
   290 
       
   291     GLX_LOG_INFO1("CGlxContentHarvesterPluginAlbums::HandleAttributesAvailableL =%d ",aItemIndex);
       
   292     
       
   293     if (KErrNotFound != aAttributes.Find( thumbnailAttribute, match ))
       
   294         {
       
   295         const TGlxMedia& item = aList->Item( aItemIndex );
       
   296         const CGlxThumbnailAttribute* value = item.ThumbnailAttribute( thumbnailAttribute );
       
   297         if (value)
       
   298             {
       
   299             GLX_LOG_INFO("CGlxContentHarvesterPluginAlbums::HandleAttributesAvailableL Thumbnail is present ");
       
   300 
       
   301 			// Update the preview thumbnail
       
   302 			//remove the observer as client need not listen to the callbacks
       
   303 			GLX_LOG_INFO("CGlxContentHarvesterPluginAll::HandleAttributesAvailableL,one thumbnail fetched");
       
   304 			UpdateDataInCPSL( value->iBitmap->Handle());
       
   305 			iMediaList->RemoveMediaListObserver( this );
       
   306             }//end of  check against value 
       
   307         }//end of  attribute match
       
   308     }
       
   309 
       
   310 // ---------------------------------------------------------------------------
       
   311 // CGlxContentHarvesterPluginAlbums::HandleFocusChangedL
       
   312 // ---------------------------------------------------------------------------
       
   313 //
       
   314 void CGlxContentHarvesterPluginAlbums::HandleFocusChangedL(
       
   315         NGlxListDefs::TFocusChangeType /*aType*/, 
       
   316         TInt /*aNewIndex*/, 
       
   317         TInt /*aOldIndex*/, 
       
   318         MGlxMediaList* /*aList*/)
       
   319     {
       
   320     TRACER( "CGlxContentHarvesterPluginAlbums::HandleFocusChangedL" );
       
   321     }
       
   322 
       
   323 
       
   324 // ---------------------------------------------------------------------------
       
   325 // CGlxContentHarvesterPluginAlbums::HandleItemSelectedL
       
   326 // ---------------------------------------------------------------------------
       
   327 //
       
   328 void CGlxContentHarvesterPluginAlbums::HandleItemSelectedL(TInt /*aIndex*/, 
       
   329         TBool /*aSelected*/, 
       
   330         MGlxMediaList* /*aList*/)
       
   331     {
       
   332     TRACER( "CGlxContentHarvesterPluginAlbums::HandleItemSelectedL" );
       
   333     }
       
   334 
       
   335 // ---------------------------------------------------------------------------
       
   336 // CGlxContentHarvesterPluginAlbums::HandleMessageL
       
   337 // ---------------------------------------------------------------------------
       
   338 //
       
   339 void CGlxContentHarvesterPluginAlbums::HandleMessageL(const CMPXMessage& /*aMessage*/, 
       
   340         MGlxMediaList* /*aList*/)
       
   341     {
       
   342     TRACER( "CGlxContentHarvesterPluginAlbums::HandleMessageL" );
       
   343     }   
       
   344 
       
   345 // ---------------------------------------------------------------------------
       
   346 // CGlxContentHarvesterPluginAlbums::DestroyMedialist
       
   347 // ---------------------------------------------------------------------------
       
   348 //
       
   349 void CGlxContentHarvesterPluginAlbums::DestroyMedialist()
       
   350     {
       
   351     TRACER( "CGlxContentHarvesterPluginAlbums::DestroyMedialist" );
       
   352     if( iMediaList )
       
   353         {
       
   354         GLX_LOG_INFO("CGlxContentHarvesterPluginAlbums::DestroyMedialist,media list deleted");
       
   355         RemoveContextAndObserver();
       
   356         
       
   357         delete iUriAttributeContext;
       
   358         iUriAttributeContext = NULL;
       
   359         delete iThumbnailAttributeContext;
       
   360         iThumbnailAttributeContext = NULL;
       
   361         
       
   362         iMediaList->Close();
       
   363         iMediaList = NULL;
       
   364         }
       
   365     }
       
   366 
       
   367 // ---------------------------------------------------------------------------
       
   368 // CGlxContentHarvesterPluginAlbums::CreateMedialistL
       
   369 // ---------------------------------------------------------------------------
       
   370 //
       
   371 void CGlxContentHarvesterPluginAlbums::CreateMedialistL( )
       
   372     {
       
   373     TRACER( "CGlxContentHarvesterPluginAlbums::CreateMedialistL" );
       
   374     if(!iMediaList)
       
   375         {
       
   376 		iThumbnailIterator.SetRange( KSinglePreviewThumbnail );
       
   377 
       
   378         iMediaList = CreateMedialistAndAttributeContextL( TGlxMediaId( 
       
   379                         KGlxCollectionPluginAlbumsImplementationUid ),
       
   380                         iUriAttributeContext,iThumbnailAttributeContext);         
       
   381         
       
   382         AddContextAndObserverL();
       
   383         }
       
   384     }
       
   385 
       
   386 // ---------------------------------------------------------------------------
       
   387 // CGlxContentHarvesterPluginAlbums::UpdatePreviewThumbnailListL
       
   388 // ---------------------------------------------------------------------------
       
   389 //
       
   390 void CGlxContentHarvesterPluginAlbums::UpdatePreviewThumbnailListL( )
       
   391     {
       
   392     TRACER( "CGlxContentHarvesterPluginAlbums::UpdatePreviewThumbnailListL" );
       
   393 
       
   394     //when there is an update of content in the collection
       
   395     //this function is executed or when the collection recives the focus. 
       
   396     if(!iMediaList)
       
   397         {
       
   398         //media list is not created yet,create it.
       
   399         CreateMedialistL( );
       
   400         UpdateDataL();
       
   401         }
       
   402     else
       
   403         {
       
   404         if(GetCHPlugin()->IsRefreshNeeded())
       
   405             {
       
   406             ContainerCacheCleanupL(iMediaList);
       
   407             }
       
   408 
       
   409 	        //1.if the content is deleted,then creating a context doesn't fetch the attributes
       
   410 	        //2.if the content is added and the content is not the latest as per the sorted order of the
       
   411 	        // media list,then the thumbnails are not fetched.
       
   412 	        // so show the first available thumbnail in the media list.
       
   413 
       
   414 	        UpdateDataL();
       
   415 
       
   416 	        //Adding the context doesn't gaurantee we get a call back for
       
   417 	        //Handle attributes available,if the latest item is already fetched.
       
   418 	        //and for the content added for this collection,if it is not latest
       
   419 	        //we will not recieve the attributes .so show the first available thumbnail 
       
   420 	        //in the media list.if there is any new latest content added,the thumbnail will be 
       
   421 	        //fetched and shown.
       
   422 
       
   423 	        iThumbnailIterator.SetRange( KSinglePreviewThumbnail );
       
   424 	        RemoveContextAndObserver();
       
   425 	        AddContextAndObserverL();
       
   426 			}
       
   427 
       
   428     }
       
   429 
       
   430 // ---------------------------------------------------------------------------
       
   431 // CGlxContentHarvesterPluginAlbums::AddContextAndObserverL
       
   432 // ---------------------------------------------------------------------------
       
   433 //
       
   434 void CGlxContentHarvesterPluginAlbums::AddContextAndObserverL()
       
   435     {
       
   436     TRACER( "CGlxContentHarvesterPluginAlbums::AddRemoveContextAndObserverL" );   
       
   437     if(iMediaList)
       
   438         {
       
   439         iMediaList->AddMediaListObserverL( this );
       
   440         iMediaList->AddContextL(iUriAttributeContext, KGlxFetchContextPriorityNormal);
       
   441         iMediaList->AddContextL(iThumbnailAttributeContext, KGlxFetchContextPriorityLow);        
       
   442         }
       
   443     }
       
   444 
       
   445 // ---------------------------------------------------------------------------c
       
   446 // CGlxContentHarvesterPluginAlbums::RemoveContextAndObserver
       
   447 // ---------------------------------------------------------------------------
       
   448 //
       
   449 void CGlxContentHarvesterPluginAlbums::RemoveContextAndObserver()
       
   450     {
       
   451     TRACER( "CGlxContentHarvesterPluginAlbums::RemoveContextAndObserver" );   
       
   452     if(iMediaList)
       
   453         {
       
   454         iMediaList->RemoveMediaListObserver( this );
       
   455         iMediaList->RemoveContext(iUriAttributeContext);
       
   456         iMediaList->RemoveContext(iThumbnailAttributeContext);        
       
   457         }
       
   458     }
       
   459 
       
   460 // ---------------------------------------------------------------------------
       
   461 // CGlxContentHarvesterPluginAlbums::HandleError
       
   462 // ---------------------------------------------------------------------------
       
   463 //
       
   464 void CGlxContentHarvesterPluginAlbums::HandleError(TInt /*aError*/)
       
   465     {
       
   466     TRACER( "CGlxContentHarvesterPluginAlbums::HandleError" );    
       
   467 
       
   468 #ifdef _DEBUG
       
   469     if(iMediaList)
       
   470         {
       
   471         TInt count=iMediaList->Count();
       
   472         GLX_LOG_INFO1("CGlxContentHarvesterPluginAlbums::HandleError,count=%d",count);
       
   473         for ( TInt i = 0; i < count ; i++ )
       
   474             {
       
   475             const TGlxMedia& item = iMediaList->Item( i );
       
   476             TInt thumbnailError = GlxErrorManager::HasAttributeErrorL(
       
   477                     item.Properties(), KGlxMediaIdThumbnail );
       
   478             GLX_LOG_INFO1("CGlxContentHarvesterPluginAlbums::HandleError,Error=%d ",thumbnailError);
       
   479 
       
   480             }
       
   481         }
       
   482 #endif
       
   483     }
       
   484 
       
   485 // ---------------------------------------------------------------------------
       
   486 // CGlxContentHarvesterPluginAlbums::Count
       
   487 // ---------------------------------------------------------------------------
       
   488 //
       
   489 TInt CGlxContentHarvesterPluginAlbums::Count()
       
   490     {
       
   491     TRACER( "CGlxContentHarvesterPluginAlbums::Count" );    
       
   492     TInt count = KErrNone;
       
   493     if(iMediaList)
       
   494         {
       
   495         count = iMediaList->Count();
       
   496         GLX_LOG_INFO1("GlxCHP:Albums::Count(%d)",count);
       
   497         }
       
   498     return count;
       
   499     }
       
   500 //  End of File
       
   501