videocollection/videocollectionwrapper/tsrc/testvideomodel/src/mediaobjectfactory.cpp
changeset 36 8aed59de29f9
parent 35 3738fe97f027
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
   174         if(error != KErrNone)
   174         if(error != KErrNone)
   175         { 
   175         { 
   176             return false;
   176             return false;
   177         }
   177         }
   178     }
   178     }
   179     
   179 
   180     // set file path
   180     // set file path
   181     if(detailSelectionFlag & MediaDetailFilePathFlag)
   181     if(detailSelectionFlag & MediaDetailFilePathFlag)
   182     {
   182     {
   183         videoname.Format(KMediaTestFilePathPrefix, index);              
   183         videoname.Format(KMediaTestFilePathPrefix, index);              
   184         TRAP(error, media->SetTextValueL( KMPXMediaGeneralUri, videoname));
   184         TRAP(error, media->SetTextValueL( KMPXMediaGeneralUri, videoname));
   189     }
   189     }
   190     
   190     
   191     // set video count
   191     // set video count
   192     if(detailSelectionFlag & MediaDetailCategoryVideoCount)
   192     if(detailSelectionFlag & MediaDetailCategoryVideoCount)
   193     {  
   193     {  
   194         int count = (index%5);
   194         int count = 10 + index;
   195         TRAPD(error, media->SetTObjectValueL<quint32>(KVcxMediaMyVideosCategoryItemCount, count));
   195         TRAPD(error, media->SetTObjectValueL<quint32>(KVcxMediaMyVideosCategoryItemCount, count));
   196         if(error != KErrNone)
   196         if(error != KErrNone)
   197         {
   197         {
   198             return false;
   198             return false;
   199         }
   199         }