diff -r 55fa1ec415c6 -r 8f0df5c82986 videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp --- a/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp Tue May 11 16:15:40 2010 +0300 +++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp Tue May 25 12:44:54 2010 +0300 @@ -52,6 +52,8 @@ const TUint32 KVcxHgMyVideosTransactionId = 5; +const TInt KMpxMediaId2 = 0; + // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -216,8 +218,9 @@ } else if ( iCollectionLevel == KVcxMpxLevelVideos ) { - iCollectionUtility->Collection().BackL(); - iCollectionUtility->Collection().OpenL( aIndex ); + // OpenL() will return a list if there has been any changes. + // No reply if list is same as with previous OpenL(). + iCollectionUtility->Collection().OpenL(); } else { @@ -1063,13 +1066,6 @@ // Ownership is transferred. iVideoModelObserver->VideoFetchingCompletedL( media ); } - - else if ( iCategoryModelObserver ) - { - CMPXMedia* media = CMPXMedia::NewL( *( ( *array )[0] ) ); - // Ownership is transferred. - iCategoryModelObserver->VideoFetchingCompletedL( media ); - } } } CleanupStack::PopAndDestroy( entries ); @@ -1094,6 +1090,32 @@ } // ----------------------------------------------------------------------------- +// CVcxHgMyVideosCollectionClient::SetFlagsL() +// ----------------------------------------------------------------------------- +// +void CVcxHgMyVideosCollectionClient::SetFlagsL( TMPXItemId aMpxItemId, TUint32 aFlags ) +{ + CMPXMedia* msg = CMPXMedia::NewL(); + CleanupStack::PushL( msg ); + + msg->SetTObjectValueL( KMPXMediaGeneralId, TMPXItemId( aMpxItemId, KMpxMediaId2 )); + msg->SetTObjectValueL( KMPXMediaGeneralFlags, aFlags ); + + CMPXCommand* cmd = CMPXCommand::NewL(); + CleanupStack::PushL( cmd ); + + cmd->SetTObjectValueL( KMPXCommandGeneralId, KMPXCommandIdCollectionSet ); + cmd->SetTObjectValueL( KMPXCommandGeneralDoSync, ETrue ); + cmd->SetCObjectValueL( KMPXCommandColSetMedia, msg ); + cmd->SetTObjectValueL( KMPXCommandGeneralCollectionId, KVcxUidMyVideosMpxCollection ); + + iCollectionUtility->Collection().CommandL( *cmd ); + + CleanupStack::PopAndDestroy( cmd ); + CleanupStack::PopAndDestroy( msg ); +} + +// ----------------------------------------------------------------------------- // CVcxHgMyVideosCollectionClient::HandleGetVideoDetailsRespL() // ----------------------------------------------------------------------------- //