--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideolist.cpp Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideolist.cpp Tue May 25 12:44:54 2010 +0300
@@ -106,6 +106,39 @@
}
// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CVcxHgMyVideosVideoList::HasSameItemsL( const CMPXMediaArray& aVideoList )
+ {
+ TInt count( iVideoList.Count() );
+ if ( aVideoList.Count() != count || count == 0 )
+ {
+ return EFalse;
+ }
+
+ TBool isSame( ETrue );
+ CMPXMedia* oldMedia = NULL;
+ CMPXMedia* newMedia = NULL;
+ for ( TInt i = 0; i < count; i++ )
+ {
+ oldMedia = iVideoList[i]->Media();
+ newMedia = aVideoList[i];
+ if ( oldMedia && oldMedia->IsSupported( KMPXMediaGeneralId )
+ && newMedia && newMedia->IsSupported( KMPXMediaGeneralId ) )
+ {
+ if ( oldMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) !=
+ newMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) )
+ {
+ isSame = EFalse;
+ break;
+ }
+ }
+ }
+ return isSame;
+ }
+
+// -----------------------------------------------------------------------------
// CVcxHgMyVideosVideoList::VideoCount()
// -----------------------------------------------------------------------------
//
@@ -115,37 +148,6 @@
}
// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoList::VideoDownloadState()
-// -----------------------------------------------------------------------------
-//
-TVcxMyVideosDownloadState CVcxHgMyVideosVideoList::VideoDownloadState( TInt aIndex )
- {
- TVcxMyVideosDownloadState state( EVcxMyVideosDlStateNone );
-
- if ( aIndex >= 0 && aIndex < iVideoList.Count() )
- {
- state = iVideoList[aIndex]->DownloadState();
- }
- return state;
- }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoList::GetOngoingDownloads()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoList::GetOngoingDownloads( RArray<TInt>& aDownloads )
- {
- TInt count( iVideoList.Count() );
- for ( TInt i = 0; i < count; i++ )
- {
- if ( iVideoList[i]->DownloadState() != EVcxMyVideosDlStateNone )
- {
- aDownloads.Append( i );
- }
- }
- }
-
-// -----------------------------------------------------------------------------
// CVcxHgMyVideosVideoList::RemoveVideo()
// -----------------------------------------------------------------------------
//