harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp
changeset 2 208a4ba3894c
parent 0 ccd0fd43f247
child 5 3bc31ad99ee7
equal deleted inserted replaced
0:ccd0fd43f247 2:208a4ba3894c
   100     CSearchDocument* index_item = NULL;
   100     CSearchDocument* index_item = NULL;
   101     if(aObject.Uri() != KNullDesC) //Uri is must have property we will store items which has URI
   101     if(aObject.Uri() != KNullDesC) //Uri is must have property we will store items which has URI
   102         {
   102         {
   103         SetAbsoluteURI(aObject.Uri());//Convert URI to absolute path 
   103         SetAbsoluteURI(aObject.Uri());//Convert URI to absolute path 
   104         index_item = CSearchDocument::NewLC(GetUri(), aAppClass);
   104         index_item = CSearchDocument::NewLC(GetUri(), aAppClass);
       
   105         
       
   106         TInt slashpos = GetUri().LocateReverse('\\');
       
   107         
       
   108         TPtrC name = GetUri().Mid( (slashpos+1) );
   105         //Uri is our Document ID
   109         //Uri is our Document ID
   106         AddFiledtoDocumentL(*index_item,
   110         AddFiledtoDocumentL(*index_item,
   107                                KNameField, //URI as Name field
   111                                KNameField, //URI as Name field
   108                                GetUri());
   112                                name);
   109         //Store media ID for client to generate path and launch corresponding Item
   113         //Store media ID for client to generate path and launch corresponding Item
   110         TBuf<KMaxMediaLength> mediaBuf;        
   114         TBuf<KMaxMediaLength> mediaBuf;        
   111         
   115         
   112         //As the MDS database is storing incorrect MediaIds, fetch the uniqueid from the 
   116         //As the MDS database is storing incorrect MediaIds, fetch the uniqueid from the 
   113         //file system.If the issue is fixed in 10.1 then Ids from MDS can be directly used
   117         //file system.If the issue is fixed in 10.1 then Ids from MDS can be directly used