videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp
branchRCL_3
changeset 23 8f0df5c82986
parent 21 55fa1ec415c6
child 45 baf439b22ddd
equal deleted inserted replaced
21:55fa1ec415c6 23:8f0df5c82986
    50 const TInt KVcxMpxLevelCategories = 2;
    50 const TInt KVcxMpxLevelCategories = 2;
    51 const TInt KVcxMpxLevelVideos     = 3;
    51 const TInt KVcxMpxLevelVideos     = 3;
    52 
    52 
    53 const TUint32 KVcxHgMyVideosTransactionId = 5;
    53 const TUint32 KVcxHgMyVideosTransactionId = 5;
    54 
    54 
       
    55 const TInt KMpxMediaId2 = 0;
       
    56 
    55 // ============================ MEMBER FUNCTIONS ===============================
    57 // ============================ MEMBER FUNCTIONS ===============================
    56 
    58 
    57 // -----------------------------------------------------------------------------
    59 // -----------------------------------------------------------------------------
    58 // CVcxHgMyVideosCollectionClient::CVcxHgMyVideosCollectionClient()
    60 // CVcxHgMyVideosCollectionClient::CVcxHgMyVideosCollectionClient()
    59 // -----------------------------------------------------------------------------
    61 // -----------------------------------------------------------------------------
   214         {    
   216         {    
   215         iCollectionUtility->Collection().OpenL( aIndex );
   217         iCollectionUtility->Collection().OpenL( aIndex );
   216         }
   218         }
   217     else if ( iCollectionLevel == KVcxMpxLevelVideos )
   219     else if ( iCollectionLevel == KVcxMpxLevelVideos )
   218         {
   220         {
   219         iCollectionUtility->Collection().BackL();
   221         // OpenL() will return a list if there has been any changes.
   220         iCollectionUtility->Collection().OpenL( aIndex );
   222         // No reply if list is same as with previous OpenL().
       
   223         iCollectionUtility->Collection().OpenL();
   221         }
   224         }
   222     else
   225     else
   223         {
   226         {
   224         // NOP
   227         // NOP
   225         }
   228         }
  1061             	    {
  1064             	    {
  1062             	    CMPXMedia* media = CMPXMedia::NewL( *( ( *array )[0] ) );
  1065             	    CMPXMedia* media = CMPXMedia::NewL( *( ( *array )[0] ) );
  1063                     // Ownership is transferred.
  1066                     // Ownership is transferred.
  1064             	    iVideoModelObserver->VideoFetchingCompletedL( media );  
  1067             	    iVideoModelObserver->VideoFetchingCompletedL( media );  
  1065             	    }
  1068             	    }
  1066                 
       
  1067                 else if ( iCategoryModelObserver )
       
  1068                     {
       
  1069                     CMPXMedia* media = CMPXMedia::NewL( *( ( *array )[0] ) );
       
  1070                     // Ownership is transferred.
       
  1071                     iCategoryModelObserver->VideoFetchingCompletedL( media );  
       
  1072                     }
       
  1073                 }
  1069                 }
  1074 			}
  1070 			}
  1075         CleanupStack::PopAndDestroy( entries );
  1071         CleanupStack::PopAndDestroy( entries );
  1076         }
  1072         }
  1077     }
  1073     }
  1090             {
  1086             {
  1091             iCategoryModelObserver->CategoryListFetchingCompletedL();
  1087             iCategoryModelObserver->CategoryListFetchingCompletedL();
  1092             }
  1088             }
  1093         }
  1089         }
  1094     }
  1090     }
       
  1091 
       
  1092 // -----------------------------------------------------------------------------
       
  1093 // CVcxHgMyVideosCollectionClient::SetFlagsL()
       
  1094 // -----------------------------------------------------------------------------
       
  1095 //
       
  1096 void CVcxHgMyVideosCollectionClient::SetFlagsL( TMPXItemId aMpxItemId, TUint32 aFlags )
       
  1097 {    
       
  1098     CMPXMedia* msg = CMPXMedia::NewL();
       
  1099     CleanupStack::PushL( msg );
       
  1100     
       
  1101     msg->SetTObjectValueL<TMPXItemId>( KMPXMediaGeneralId, TMPXItemId( aMpxItemId, KMpxMediaId2 ));
       
  1102     msg->SetTObjectValueL<TInt32>( KMPXMediaGeneralFlags, aFlags );
       
  1103     
       
  1104     CMPXCommand* cmd = CMPXCommand::NewL();
       
  1105     CleanupStack::PushL( cmd );
       
  1106     
       
  1107     cmd->SetTObjectValueL( KMPXCommandGeneralId, KMPXCommandIdCollectionSet );
       
  1108     cmd->SetTObjectValueL( KMPXCommandGeneralDoSync, ETrue );
       
  1109     cmd->SetCObjectValueL( KMPXCommandColSetMedia, msg );
       
  1110     cmd->SetTObjectValueL( KMPXCommandGeneralCollectionId, KVcxUidMyVideosMpxCollection );
       
  1111     
       
  1112     iCollectionUtility->Collection().CommandL( *cmd );
       
  1113     
       
  1114     CleanupStack::PopAndDestroy( cmd );    
       
  1115     CleanupStack::PopAndDestroy( msg );
       
  1116 }
  1095 
  1117 
  1096 // -----------------------------------------------------------------------------
  1118 // -----------------------------------------------------------------------------
  1097 // CVcxHgMyVideosCollectionClient::HandleGetVideoDetailsRespL()
  1119 // CVcxHgMyVideosCollectionClient::HandleGetVideoDetailsRespL()
  1098 // -----------------------------------------------------------------------------
  1120 // -----------------------------------------------------------------------------
  1099 //
  1121 //