mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp
changeset 49 c20dd21d1eb4
parent 41 2c19c7cf5550
equal deleted inserted replaced
41:2c19c7cf5550 49:c20dd21d1eb4
    45 #include "cmtpimagedpthumbnailcreator.h"
    45 #include "cmtpimagedpthumbnailcreator.h"
    46 #include "mtpimagedppanic.h"
    46 #include "mtpimagedppanic.h"
    47 #include "mtpimagedputilits.h"
    47 #include "mtpimagedputilits.h"
    48 #include "mtpimagedpconst.h"
    48 #include "mtpimagedpconst.h"
    49 #include "mtpdebug.h"
    49 #include "mtpdebug.h"
    50 
    50 #include "OstTraceDefinitions.h"
    51 // Class constants.
    51 #ifdef OST_TRACE_COMPILER_IN_USE
    52 __FLOG_STMT(_LIT8(KComponent,"MTPImageDpPropertyMgr");)
    52 #include "cmtpimagedpobjectpropertymgrTraces.h"
       
    53 #endif
       
    54 
    53 
    55 
    54 // Indicate how many cache can be stored
    56 // Indicate how many cache can be stored
    55 const TUint KCacheThreshold = 16;
    57 const TUint KCacheThreshold = 16;
    56 
    58 
    57 /**
    59 /**
   167     iFramework(aFramework),
   169     iFramework(aFramework),
   168     iDataProvider(aDataProvider),
   170     iDataProvider(aDataProvider),
   169     iFs(aFramework.Fs()),
   171     iFs(aFramework.Fs()),
   170     iObjectMgr(aFramework.ObjectMgr())    
   172     iObjectMgr(aFramework.ObjectMgr())    
   171     {
   173     {
   172     __FLOG_OPEN(KMTPSubsystem, KComponent);
       
   173     }
   174     }
   174 
   175 
   175 void CMTPImageDpObjectPropertyMgr::ConstructL(MMTPDataProviderFramework& /*aFramework*/)
   176 void CMTPImageDpObjectPropertyMgr::ConstructL(MMTPDataProviderFramework& /*aFramework*/)
   176     {
   177     {
   177     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::ConstructL - Entry"));
       
   178     iMetaDataSession = CMdESession::NewL(*this);
   178     iMetaDataSession = CMdESession::NewL(*this);
   179     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::ConstructL - Exit"));
       
   180     }
   179     }
   181     
   180     
   182 CMTPImageDpObjectPropertyMgr::~CMTPImageDpObjectPropertyMgr()
   181 CMTPImageDpObjectPropertyMgr::~CMTPImageDpObjectPropertyMgr()
   183     {
   182     {
   184     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::~CMTPImageDpObjectPropertyMgr - Entry"));
   183     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_CMTPIMAGEDPOBJECTPROPERTYMGR_DES_ENTRY );
   185     delete iObject;
   184     delete iObject;
   186     delete iMetaDataSession;
   185     delete iMetaDataSession;
   187     delete iThumbnailCache.iThumbnailData;
   186     delete iThumbnailCache.iThumbnailData;
   188     
   187     
   189     //Clear propreties cache map
   188     //Clear propreties cache map
   190     ClearAllCache();
   189     ClearAllCache();
   191     iPropretiesCacheMap.Close();
   190     iPropretiesCacheMap.Close();
   192     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::~CMTPImageDpObjectPropertyMgr - Exit"));
   191     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_CMTPIMAGEDPOBJECTPROPERTYMGR_DES_EXIT );
   193     __FLOG_CLOSE;
       
   194     }
   192     }
   195 
   193 
   196 void CMTPImageDpObjectPropertyMgr::SetCurrentObjectL(CMTPObjectMetaData& aObjectInfo, TBool aRequireForModify, TBool aSaveToCache)
   194 void CMTPImageDpObjectPropertyMgr::SetCurrentObjectL(CMTPObjectMetaData& aObjectInfo, TBool aRequireForModify, TBool aSaveToCache)
   197     {
   195     {
   198     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::SetCurrentObjectL"));
   196     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETCURRENTOBJECTL_ENTRY );
   199     iObjectInfo = &aObjectInfo;
   197     iObjectInfo = &aObjectInfo;
   200 
   198 
   201     /**
   199     /**
   202      * Image DP property manager will not directly modify properties which stored in the MdS
   200      * Image DP property manager will not directly modify properties which stored in the MdS
   203      */
   201      */
   223         if (aSaveToCache)
   221         if (aSaveToCache)
   224             {            
   222             {            
   225             TUint objectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);
   223             TUint objectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);
   226             if (FindPropertiesCache(objectHandle))
   224             if (FindPropertiesCache(objectHandle))
   227                 {
   225                 {
   228                 __FLOG_VA((_L16("SetCurrentObjectL - find object in cache:%u"), objectHandle));
   226                 OstTrace1( TRACE_NORMAL, CMTPIMAGEDPOBJECTPROPERTYMGR_SETCURRENTOBJECTL, 
       
   227                         "SetCurrentObjectL - find object in cache:%u", objectHandle );
   229                 iCurrentPropertiesCache->ResetL();
   228                 iCurrentPropertiesCache->ResetL();
   230                 }
   229                 }
   231             else
   230             else
   232                 {
   231                 {
   233                 if (iPropretiesCacheMap.Count() > KCacheThreshold)
   232                 if (iPropretiesCacheMap.Count() > KCacheThreshold)
   234                     {
   233                     {
   235                     // Find the first object handle from cache map and then destory it
   234                     // Find the first object handle from cache map and then destory it
   236                     RHashMap<TUint, CMTPImagePropertiesCache*>::TIter iter(iPropretiesCacheMap);
   235                     RHashMap<TUint, CMTPImagePropertiesCache*>::TIter iter(iPropretiesCacheMap);
   237                     DestroyPropertiesCahce(*iter.NextKey());
   236                     DestroyPropertiesCahce(*iter.NextKey());
   238                     __FLOG_VA((_L16("SetCurrentObjectL - destory object:%u"), objectHandle));
   237                     OstTrace1( TRACE_NORMAL, DUP1_CMTPIMAGEDPOBJECTPROPERTYMGR_SETCURRENTOBJECTL, 
       
   238                             "SetCurrentObjectL - destory object:%u", objectHandle ); 
   239                     }                
   239                     }                
   240                 
   240                 
   241                 iCurrentPropertiesCache = CMTPImagePropertiesCache::NewL();
   241                 iCurrentPropertiesCache = CMTPImagePropertiesCache::NewL();
   242                 iPropretiesCacheMap.Insert(objectHandle, iCurrentPropertiesCache);
   242                 iPropretiesCacheMap.Insert(objectHandle, iCurrentPropertiesCache);
   243                 __FLOG_VA((_L16("SetCurrentObjectL - create new object:%u"), objectHandle));
   243                 OstTrace1( TRACE_NORMAL, DUP2_CMTPIMAGEDPOBJECTPROPERTYMGR_SETCURRENTOBJECTL, 
   244                 }
   244                         "SetCurrentObjectL - create new object:%u", objectHandle );
   245             }
   245                 }
   246         }
   246             }
   247     
   247         }
   248     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::SetCurrentObjectL"));
   248 
       
   249     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETCURRENTOBJECTL_EXIT );
   249     }
   250     }
   250 
   251 
   251 void CMTPImageDpObjectPropertyMgr::SetPropertyL(TMTPObjectPropertyCode aProperty, const TUint8 aValue)
   252 void CMTPImageDpObjectPropertyMgr::SetPropertyL(TMTPObjectPropertyCode aProperty, const TUint8 aValue)
   252     {
   253     {
   253     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::SetPropertyL"));
   254     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL_TUINT8_ENTRY );
   254     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   255     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   255     
   256     
   256     if (aProperty == EMTPObjectPropCodeNonConsumable) 
   257     if (aProperty == EMTPObjectPropCodeNonConsumable) 
   257         {
   258         {
   258         iObjectInfo->SetUint(CMTPObjectMetaData::ENonConsumable, aValue);
   259         iObjectInfo->SetUint(CMTPObjectMetaData::ENonConsumable, aValue);
   259         }
   260         }
   260     else
   261     else
   261         {
   262         {
       
   263         OstTrace1( TRACE_ERROR, CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL, 
       
   264                 "property code %d not equal to EMTPObjectPropCodeNonConsumable", aProperty );
   262         User::Leave(EMTPRespCodeObjectPropNotSupported);
   265         User::Leave(EMTPRespCodeObjectPropNotSupported);
   263         }
   266         }
   264     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::SetPropertyL"));
   267     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL_TUINT8_EXIT );
   265     }
   268     }
   266 
   269 
   267 void CMTPImageDpObjectPropertyMgr::SetPropertyL(TMTPObjectPropertyCode aProperty, const TUint16 aValue)
   270 void CMTPImageDpObjectPropertyMgr::SetPropertyL(TMTPObjectPropertyCode aProperty, const TUint16 aValue)
   268     {
   271     {
   269     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::SetPropertyL"));
   272     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL_TUINT16_ENTRY );
   270     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   273     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   271     
   274     
   272     switch(aProperty)
   275     switch(aProperty)
   273         {
   276         {
   274     case EMTPObjectPropCodeObjectFormat:
   277     case EMTPObjectPropCodeObjectFormat:
   275         iObjectInfo->SetUint(CMTPObjectMetaData::EFormatCode, aValue);
   278         iObjectInfo->SetUint(CMTPObjectMetaData::EFormatCode, aValue);
   276         break;        
   279         break;        
   277     case EMTPObjectPropCodeProtectionStatus://this property does not supported by image dp
   280     case EMTPObjectPropCodeProtectionStatus://this property does not supported by image dp
   278         //nothing to do
   281         //nothing to do
   279         break;
   282         break;
       
   283     case EMTPObjectPropCodeHidden:
       
   284         {
       
   285 		__ASSERT_ALWAYS(( EMTPHidden == aValue )||( EMTPVisible == aValue ), User::Leave(KErrArgument));
       
   286         TEntry entry;
       
   287 		User::LeaveIfError(iFramework.Fs().Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry));
       
   288         if (( EMTPHidden == aValue ) && ( !entry.IsHidden()))
       
   289             {
       
   290             entry.iAtt &= ~KEntryAttHidden;
       
   291             entry.iAtt |= KEntryAttHidden;
       
   292             User::LeaveIfError(iFramework.Fs().SetAtt(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry.iAtt, ~entry.iAtt));
       
   293             }
       
   294         else if (( EMTPVisible == aValue )&&( entry.IsHidden()))
       
   295             {
       
   296             entry.iAtt &= ~KEntryAttHidden;
       
   297             User::LeaveIfError(iFramework.Fs().SetAtt(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry.iAtt, ~entry.iAtt));
       
   298             }
       
   299         } 
       
   300         break;
   280     default:
   301     default:
   281         //nothing to do
   302         //nothing to do
   282         break;
   303         break;
   283         }
   304         }
   284     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::SetPropertyL"));
   305     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL_TUINT16_EXIT );
   285     }
   306     }
   286 
   307 
   287 void CMTPImageDpObjectPropertyMgr::SetPropertyL(TMTPObjectPropertyCode aProperty, const TUint32 aValue)
   308 void CMTPImageDpObjectPropertyMgr::SetPropertyL(TMTPObjectPropertyCode aProperty, const TUint32 aValue)
   288     {
   309     {
   289     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::SetPropertyL"));
   310     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL_TUINT32_ENTRY );
   290     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   311     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   291     
   312     
   292     switch(aProperty)
   313     switch(aProperty)
   293         {
   314         {
   294     case EMTPObjectPropCodeStorageID:
   315     case EMTPObjectPropCodeStorageID:
   317         break;          
   338         break;          
   318     default:
   339     default:
   319         //nothing to do
   340         //nothing to do
   320         break;
   341         break;
   321         }
   342         }
   322     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::SetPropertyL"));
   343     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL_TUINT32_EXIT );
   323     }
   344     }
   324 
   345 
   325 void CMTPImageDpObjectPropertyMgr::SetPropertyL(TMTPObjectPropertyCode aProperty, const TDesC& aValue)
   346 void CMTPImageDpObjectPropertyMgr::SetPropertyL(TMTPObjectPropertyCode aProperty, const TDesC& aValue)
   326     {
   347     {
   327     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::SetPropertyL"));
   348     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL_TDESC_ENTRY );
   328     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   349     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   329     
   350     
   330     switch(aProperty)
   351     switch(aProperty)
   331         {
   352         {
   332     case EMTPObjectPropCodeObjectFileName:
   353     case EMTPObjectPropCodeObjectFileName:
   345         newUri.Append(oldUri.DriveAndPath());
   366         newUri.Append(oldUri.DriveAndPath());
   346         newUri.Append(aValue);
   367         newUri.Append(aValue);
   347         newUri.Trim();
   368         newUri.Trim();
   348         
   369         
   349         //ask fs to rename file, leave if err returned from fs
   370         //ask fs to rename file, leave if err returned from fs
   350         User::LeaveIfError(iFs.Rename(oldUri.FullName(), newUri));
   371         LEAVEIFERROR(iFs.Rename(oldUri.FullName(), newUri),
       
   372                 OstTraceExt3( TRACE_ERROR, CMTPIMAGEDPOBJECTPROPERTYMGR_TDESC_SETPROPERTYL, 
       
   373                         "Rename %S to %S failed! error code %d", oldUri.FullName(), newUri, munged_err ));
   351         iObjectInfo->SetDesCL(CMTPObjectMetaData::ESuid, newUri);
   374         iObjectInfo->SetDesCL(CMTPObjectMetaData::ESuid, newUri);
   352         CleanupStack::PopAndDestroy(&newUri);        
   375         CleanupStack::PopAndDestroy(&newUri);        
   353         }
   376         }
   354         break;
   377         break;
   355         
   378         
   374         
   397         
   375     default:
   398     default:
   376         //nothing to do
   399         //nothing to do
   377         break;
   400         break;
   378         }
   401         }
   379     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::SetPropertyL"));
   402     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_SETPROPERTYL_TDESC_EXIT );
   380     }
   403     }
   381 
   404 
   382 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TUint8 &aValue)
   405 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TUint8 &aValue)
   383     {
   406     {
   384     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   407     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT8_ENTRY );
   385     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   408     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   386     
   409     
   387     if (aProperty == EMTPObjectPropCodeNonConsumable) 
   410     if (aProperty == EMTPObjectPropCodeNonConsumable) 
   388         {
   411         {
   389         aValue = iObjectInfo->Uint(CMTPObjectMetaData::ENonConsumable);       
   412         aValue = iObjectInfo->Uint(CMTPObjectMetaData::ENonConsumable);       
   390         }
   413         }
   391     else
   414     else
   392         {
   415         {
       
   416         OstTrace1( TRACE_ERROR, CMTPIMAGEDPOBJECTPROPERTYMGR_TUINT8_GETPROPERTYL, 
       
   417                 "property code %d not equal to EMTPObjectPropCodeNonConsumable", aProperty );
   393         User::Leave(EMTPRespCodeObjectPropNotSupported);
   418         User::Leave(EMTPRespCodeObjectPropNotSupported);
   394         }     
   419         }     
   395     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   420     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT8_EXIT );
   396     }
   421     }
   397 
   422 
   398 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TUint16 &aValue)
   423 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TUint16 &aValue)
   399     {
   424     {
   400     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   425     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT16_ENTRY );
   401     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   426     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   402     TEntry entry;
   427     TEntry entry;
   403     switch(aProperty)
   428     switch(aProperty)
   404         {
   429         {
   405     case EMTPObjectPropCodeObjectFormat:
   430     case EMTPObjectPropCodeObjectFormat:
   418         else
   443         else
   419             {
   444             {
   420             aValue = EMTPProtectionNoProtection;
   445             aValue = EMTPProtectionNoProtection;
   421             }        
   446             }        
   422         }    
   447         }    
   423         break;    
   448         break;
       
   449     case EMTPObjectPropCodeHidden:
       
   450         {
       
   451         TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry);        
       
   452         if ( err == KErrNone && entry.IsHidden())
       
   453             {
       
   454             aValue = EMTPHidden;
       
   455             }
       
   456         else
       
   457             {
       
   458             aValue = EMTPVisible;
       
   459             }        
       
   460         } 
       
   461         break;
   424     default:
   462     default:
   425         aValue = 0;//initialization
   463         aValue = 0;//initialization
   426         //ingore the failure if we can't get properties form MdS
   464         //ingore the failure if we can't get properties form MdS
   427         TRAP_IGNORE(GetPropertyFromMdsL(aProperty, &aValue));
   465         TRAP_IGNORE(GetPropertyFromMdsL(aProperty, &aValue));
   428         break;
   466         break;
   429         }
   467         }
   430     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   468     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT16_EXIT );
   431     }
   469     }
   432 
   470 
   433 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TUint32 &aValue, TBool alwaysCreate/* = ETrue*/)
   471 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TUint32 &aValue, TBool alwaysCreate/* = ETrue*/)
   434     {
   472     {
   435     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   473     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT32_ENTRY );
   436     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   474     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   437     
   475     
   438     switch(aProperty)
   476     switch(aProperty)
   439         {
   477         {
   440     case EMTPObjectPropCodeStorageID:
   478     case EMTPObjectPropCodeStorageID:
   445         aValue = iObjectInfo->Uint(CMTPObjectMetaData::EParentHandle);
   483         aValue = iObjectInfo->Uint(CMTPObjectMetaData::EParentHandle);
   446         break;        
   484         break;        
   447        
   485        
   448     case EMTPObjectPropCodeRepresentativeSampleSize:
   486     case EMTPObjectPropCodeRepresentativeSampleSize:
   449         {
   487         {
   450         __FLOG_VA((_L16("Query smaple size from MdS - URI:%S"), &iObjectInfo->DesC(CMTPObjectMetaData::ESuid)));
   488         OstTraceExt1( TRACE_NORMAL, CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT32, 
       
   489                 "Query smaple size from MdS - URI:%S", iObjectInfo->DesC(CMTPObjectMetaData::ESuid) );
   451         ClearThumnailCache();                                
   490         ClearThumnailCache();                                
   452         /**
   491         /**
   453          * try to query thumbnail from TNM, and then store thumbnail to cache
   492          * try to query thumbnail from TNM, and then store thumbnail to cache
   454          */
   493          */
   455         TEntry fileEntry;
   494         TEntry fileEntry;
   505         aValue = 0;//initialization
   544         aValue = 0;//initialization
   506         //ingore the failure if we can't get properties form MdS
   545         //ingore the failure if we can't get properties form MdS
   507         TRAP_IGNORE(GetPropertyFromMdsL(aProperty, &aValue));
   546         TRAP_IGNORE(GetPropertyFromMdsL(aProperty, &aValue));
   508         break;  
   547         break;  
   509         }
   548         }
   510     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   549     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT32_EXIT );
   511     }
   550     }
   512     
   551     
   513 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TUint64& aValue)
   552 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TUint64& aValue)
   514     {
   553     {
   515     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   554     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT64_ENTRY );
   516     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   555     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   517 
   556 
   518     if (aProperty == EMTPObjectPropCodeObjectSize) 
   557     if (aProperty == EMTPObjectPropCodeObjectSize) 
   519         {
   558         {
   520         TEntry entry;
   559         TEntry entry;
   521         iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry);
   560         iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry);
   522         aValue = entry.FileSize();            
   561         aValue = entry.FileSize();            
   523         }
   562         }
   524     else
   563     else
   525         {
   564         {
       
   565         OstTrace1( TRACE_ERROR, CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT64, 
       
   566                 "property code %d not equal to EMTPObjectPropCodeObjectSize", aProperty );
   526         User::Leave(EMTPRespCodeObjectPropNotSupported);
   567         User::Leave(EMTPRespCodeObjectPropNotSupported);
   527         }    
   568         }    
   528     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   569     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TUINT64_EXIT );
   529     }
   570     }
   530 
   571 
   531 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TMTPTypeUint128& aValue)
   572 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, TMTPTypeUint128& aValue)
   532     {
   573     {
   533     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   574     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TMTPTYPEUINT128_ENTRY );
   534     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   575     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   535     
   576     
   536     if (aProperty == EMTPObjectPropCodePersistentUniqueObjectIdentifier) 
   577     if (aProperty == EMTPObjectPropCodePersistentUniqueObjectIdentifier) 
   537         {
   578         {
   538         TUint32 handle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);
   579         TUint32 handle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);
   539         aValue = iObjectMgr.PuidL(handle);
   580         aValue = iObjectMgr.PuidL(handle);
   540         }
   581         }
   541     else
   582     else
   542         {
   583         {
       
   584         OstTrace1( TRACE_ERROR, CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TMTPTYPEUINT128, 
       
   585                 "property code %d not equal to EMTPObjectPropCodeObjectSize", aProperty );
   543         User::Leave(EMTPRespCodeObjectPropNotSupported);
   586         User::Leave(EMTPRespCodeObjectPropNotSupported);
   544         }
   587         }
   545     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   588     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_TMTPTYPEUINT128_EXIT );
   546     }
   589     }
   547     
   590     
   548 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeString& aValue)
   591 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeString& aValue)
   549     {
   592     {
   550     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   593     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_CMTPTYPESTRING_ENTRY );
   551     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   594     __ASSERT_DEBUG(iObjectInfo, Panic(EMTPImageDpObjectNull));
   552 
   595 
   553     switch(aProperty)
   596     switch(aProperty)
   554         {    
   597         {    
   555     case EMTPObjectPropCodeObjectFileName:
   598     case EMTPObjectPropCodeObjectFileName:
   556         {
   599         {
   557         TFileName name;
   600         TFileName name;
   558         User::LeaveIfError(BaflUtils::MostSignificantPartOfFullName(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), name));     
   601         LEAVEIFERROR(BaflUtils::MostSignificantPartOfFullName(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), name),
       
   602                 OstTraceExt2( TRACE_ERROR, DUP1_CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL, 
       
   603                         "Can't get most significant part of %S! error code %d", iObjectInfo->DesC(CMTPObjectMetaData::ESuid), munged_err));
       
   604                 
   559         aValue.SetL(name);
   605         aValue.SetL(name);
   560         }
   606         }
   561         break;
   607         break;
   562         
   608         
   563     case EMTPObjectPropCodeName:
   609     case EMTPObjectPropCodeName:
   581     default:
   627     default:
   582         //ingore the failure if we can't get properties form MdS
   628         //ingore the failure if we can't get properties form MdS
   583         TRAP_IGNORE(GetPropertyFromMdsL(aProperty, &aValue));
   629         TRAP_IGNORE(GetPropertyFromMdsL(aProperty, &aValue));
   584         break;
   630         break;
   585         }
   631         }
   586     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetPropertyL"));
   632     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_CMTPTYPESTRING_EXIT );
   587     }
   633     }
   588 
   634 
   589 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeArray& aValue, TBool alwaysCreate /*= ETrue*/)
   635 void CMTPImageDpObjectPropertyMgr::GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeArray& aValue, TBool alwaysCreate /*= ETrue*/)
   590     {
   636     {
   591     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetPropertyL -- SmapleData"));       
   637     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_CMTPTYPEARRAY_ENTRY );    
   592     
   638     
   593     if (aProperty == EMTPObjectPropCodeRepresentativeSampleData)
   639     if (aProperty == EMTPObjectPropCodeRepresentativeSampleData)
   594         {
   640         {
   595         HBufC8* tnBuf = Thumbnail(iObjectInfo->Uint(CMTPObjectMetaData::EHandle));    
   641         HBufC8* tnBuf = Thumbnail(iObjectInfo->Uint(CMTPObjectMetaData::EHandle));    
   596         if (tnBuf != NULL)
   642         if (tnBuf != NULL)
   633                 }
   679                 }
   634             }
   680             }
   635         }
   681         }
   636     else
   682     else
   637         {
   683         {
       
   684         OstTrace1( TRACE_ERROR, CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_CMTPTYPEARRAY, 
       
   685                 "property code %d not equal to EMTPObjectPropCodeRepresentativeSampleData", aProperty );
   638         User::Leave(EMTPRespCodeObjectPropNotSupported);
   686         User::Leave(EMTPRespCodeObjectPropNotSupported);
   639         }
   687         }
       
   688     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYL_CMTPTYPEARRAY_EXIT );
   640     }
   689     }
   641 
   690 
   642 void CMTPImageDpObjectPropertyMgr::GetPropertyFromMdsL(TMTPObjectPropertyCode aProperty, TAny* aValue)
   691 void CMTPImageDpObjectPropertyMgr::GetPropertyFromMdsL(TMTPObjectPropertyCode aProperty, TAny* aValue)
   643     {
   692     {
   644     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetPropertyFromMdsL"));
   693     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYFROMMDSL_ENTRY );
   645     
   694     
   646     TInt err = KErrNone;
   695     TInt err = KErrNone;
   647       
   696       
   648     if (iCacheHit)
   697     if (iCacheHit)
   649         {
   698         {
   698                     // locale independent YYYYMMSSThhmmss, as required by the MTP spec
   747                     // locale independent YYYYMMSSThhmmss, as required by the MTP spec
   699                     _LIT(KTimeFormat, "%F%Y%M%DT%H%T%S");
   748                     _LIT(KTimeFormat, "%F%Y%M%DT%H%T%S");
   700                     mdeProperty->TimeValueL().FormatL(timeValue, KTimeFormat);
   749                     mdeProperty->TimeValueL().FormatL(timeValue, KTimeFormat);
   701                     (*(static_cast<CMTPTypeString*>(aValue))).SetL(timeValue);
   750                     (*(static_cast<CMTPTypeString*>(aValue))).SetL(timeValue);
   702                     
   751                     
   703                     __FLOG_VA((_L16("GetPropertyFromMdsL - from MdS: URI:%S, DateCreated:%S"), &iObjectInfo->DesC(CMTPObjectMetaData::ESuid), &timeValue));
   752                     OstTraceExt2( TRACE_NORMAL, CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYFROMMDSL, 
       
   753                             "GetPropertyFromMdsL - from MdS: URI:%S, DateCreated:%S", 
       
   754                             iObjectInfo->DesC(CMTPObjectMetaData::ESuid), timeValue );
   704                     }
   755                     }
   705                 }
   756                 }
   706             }
   757             }
   707            break;  
   758            break;  
   708            
   759            
   775         default:
   826         default:
   776             //nothing to do
   827             //nothing to do
   777             break;
   828             break;
   778             }
   829             }
   779         }
   830         }
   780     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetPropertyFromMdsL"));
   831     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETPROPERTYFROMMDSL_EXIT );
   781     }
   832     }
   782 
   833 
   783 TBool CMTPImageDpObjectPropertyMgr::GetYear(const TDesC& aDateString, TInt& aYear) const
   834 TBool CMTPImageDpObjectPropertyMgr::GetYear(const TDesC& aDateString, TInt& aYear) const
   784     {
   835     {
   785   __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetYear"));
   836     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETYEAR_ENTRY );
   786     aYear = 0;
   837     aYear = 0;
   787     TLex dateBuf(aDateString.Left(4));
   838     TLex dateBuf(aDateString.Left(4));
   788   __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetYear"));
   839 	OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETYEAR_EXIT );
   789     return dateBuf.Val(aYear) == KErrNone;
   840     return dateBuf.Val(aYear) == KErrNone;
   790     }
   841     }
   791 
   842 
   792 TBool CMTPImageDpObjectPropertyMgr::GetMonth(const TDesC& aDateString, TMonth& aMonth) const
   843 TBool CMTPImageDpObjectPropertyMgr::GetMonth(const TDesC& aDateString, TMonth& aMonth) const
   793     {
   844     {
   794       __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetMonth"));
   845     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETMONTH_ENTRY );
   795     TBool result = EFalse;
   846     TBool result = EFalse;
   796     aMonth = EJanuary;
   847     aMonth = EJanuary;
   797     TInt month = 0;
   848     TInt month = 0;
   798     TLex dateBuf(aDateString.Mid(4, 2));
   849     TLex dateBuf(aDateString.Mid(4, 2));
   799     if(dateBuf.Val(month) == KErrNone && month > 0 && month < 13)
   850     if(dateBuf.Val(month) == KErrNone && month > 0 && month < 13)
   800         {
   851         {
   801         month--;
   852         month--;
   802         aMonth = (TMonth)month;
   853         aMonth = (TMonth)month;
   803         result = ETrue;
   854         result = ETrue;
   804         }
   855         }
   805     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetMonth"));
   856     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETMONTH_EXIT );
   806     return result;
   857     return result;
   807     }
   858     }
   808 
   859 
   809 TBool CMTPImageDpObjectPropertyMgr::GetDay(const TDesC& aDateString, TInt& aDay) const
   860 TBool CMTPImageDpObjectPropertyMgr::GetDay(const TDesC& aDateString, TInt& aDay) const
   810     {
   861     {
   811     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetDay"));
   862     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETDAY_ENTRY );
   812     TBool result = EFalse;
   863     TBool result = EFalse;
   813     aDay = 0;
   864     aDay = 0;
   814     TLex dateBuf(aDateString.Mid(6, 2));
   865     TLex dateBuf(aDateString.Mid(6, 2));
   815     if(dateBuf.Val(aDay) == KErrNone && aDay > 0 && aDay < 32)
   866     if(dateBuf.Val(aDay) == KErrNone && aDay > 0 && aDay < 32)
   816         {
   867         {
   817         aDay--;
   868         aDay--;
   818         result = ETrue;
   869         result = ETrue;
   819         }
   870         }
   820     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetDay"));
   871     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETDAY_EXIT );
   821     return result;	
   872     return result;	
   822     }
   873     }
   823 
   874 
   824 TBool CMTPImageDpObjectPropertyMgr::GetHour(const TDesC& aDateString, TInt& aHour) const
   875 TBool CMTPImageDpObjectPropertyMgr::GetHour(const TDesC& aDateString, TInt& aHour) const
   825     {
   876     {
   826     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetHour"));
   877     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETHOUR_ENTRY );
   827     aHour = 0;
   878     aHour = 0;
   828     TLex dateBuf(aDateString.Mid(9, 2));
   879     TLex dateBuf(aDateString.Mid(9, 2));
   829     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetHour"));
   880 	OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETHOUR_EXIT );
   830     return (dateBuf.Val(aHour) == KErrNone && aHour >=0 && aHour < 60);
   881     return (dateBuf.Val(aHour) == KErrNone && aHour >=0 && aHour < 60);
   831     }
   882     }
   832                 
   883                 
   833 TBool CMTPImageDpObjectPropertyMgr::GetMinute(const TDesC& aDateString, TInt& aMinute) const
   884 TBool CMTPImageDpObjectPropertyMgr::GetMinute(const TDesC& aDateString, TInt& aMinute) const
   834     {
   885     {
   835     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetMinute"));
   886     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETMINUTE_ENTRY );
   836     aMinute = 0;
   887     aMinute = 0;
   837     TLex dateBuf(aDateString.Mid(11, 2));
   888     TLex dateBuf(aDateString.Mid(11, 2));
   838     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetMinute"));
   889 	OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETMINUTE_EXIT );
   839     return (dateBuf.Val(aMinute) == KErrNone && aMinute >=0 && aMinute < 60);
   890     return (dateBuf.Val(aMinute) == KErrNone && aMinute >=0 && aMinute < 60);
   840     }
   891     }
   841 
   892 
   842 TBool CMTPImageDpObjectPropertyMgr::GetSecond(const TDesC& aDateString, TInt& aSecond) const
   893 TBool CMTPImageDpObjectPropertyMgr::GetSecond(const TDesC& aDateString, TInt& aSecond) const
   843     {
   894     {
   844     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetSecond"));
   895     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETSECOND_ENTRY );
   845     aSecond = 0;
   896     aSecond = 0;
   846     TLex dateBuf(aDateString.Mid(13, 2));
   897     TLex dateBuf(aDateString.Mid(13, 2));
   847     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetSecond"));
   898 	OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETSECOND_EXIT );
   848     return (dateBuf.Val(aSecond) == KErrNone && aSecond >= 0 && aSecond < 60);
   899     return (dateBuf.Val(aSecond) == KErrNone && aSecond >= 0 && aSecond < 60);
   849     }
   900     }
   850 
   901 
   851 TBool CMTPImageDpObjectPropertyMgr::GetTenthSecond(const TDesC& aDateString, TInt& aTenthSecond) const
   902 TBool CMTPImageDpObjectPropertyMgr::GetTenthSecond(const TDesC& aDateString, TInt& aTenthSecond) const
   852     {
   903     {
   853     __FLOG(_L8(">> CMTPImageDpObjectPropertyMgr::GetTenthSecond"));
   904     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETTENTHSECOND_ENTRY );
   854     TBool result = EFalse;
   905     TBool result = EFalse;
   855     aTenthSecond = 0;
   906     aTenthSecond = 0;
   856     TInt dotPos = aDateString.Find(_L("."));
   907     TInt dotPos = aDateString.Find(_L("."));
   857     if(dotPos != KErrNotFound && dotPos < aDateString.Length() - 1)
   908     if(dotPos != KErrNotFound && dotPos < aDateString.Length() - 1)
   858         {
   909         {
   861         }
   912         }
   862     else
   913     else
   863         {
   914         {
   864         result = ETrue;
   915         result = ETrue;
   865         }
   916         }
   866     __FLOG(_L8("<< CMTPImageDpObjectPropertyMgr::GetTenthSecond"));
   917     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_GETTENTHSECOND_EXIT );
   867     return result;	
   918     return result;	
   868     }
   919     }
   869 
   920 
   870 /*
   921 /*
   871  * Convert the MTP datatime string to TTime:
   922  * Convert the MTP datatime string to TTime:
   891            ||!GetHour(aTimeString,hour)
   942            ||!GetHour(aTimeString,hour)
   892            ||!GetMinute(aTimeString,minute)
   943            ||!GetMinute(aTimeString,minute)
   893            ||!GetSecond(aTimeString,second)
   944            ||!GetSecond(aTimeString,second)
   894            ||!GetTenthSecond(aTimeString,tenthSecond))
   945            ||!GetTenthSecond(aTimeString,tenthSecond))
   895         {        
   946         {        
       
   947         OstTrace0( TRACE_ERROR, CMTPIMAGEDPOBJECTPROPERTYMGR_CONVERTMTPTIMESTR2TTIMEL, "Failed to extract date/time details!");
   896         User::Leave(KErrArgument);
   948         User::Leave(KErrArgument);
   897         }
   949         }
   898     else
   950     else
   899         {     
   951         {     
   900         TDateTime dateTime(year, month, day, hour, minute, second, tenthSecond);
   952         TDateTime dateTime(year, month, day, hour, minute, second, tenthSecond);
   902         } 
   954         } 
   903     }
   955     }
   904 
   956 
   905 void CMTPImageDpObjectPropertyMgr::RemoveProperty(CMdEObject& aObject, CMdEPropertyDef& aPropDef)
   957 void CMTPImageDpObjectPropertyMgr::RemoveProperty(CMdEObject& aObject, CMdEPropertyDef& aPropDef)
   906     {
   958     {
   907     __FLOG(_L8("CMTPImageDpObjectPropertyMgr::RemoveProperty"));
   959     OstTraceFunctionEntry0( CMTPIMAGEDPOBJECTPROPERTYMGR_REMOVEPROPERTY_ENTRY );
   908     TInt index;
   960     TInt index;
   909     CMdEProperty* property;
   961     CMdEProperty* property;
   910     index = aObject.Property(aPropDef, property);
   962     index = aObject.Property(aPropDef, property);
   911     if (index != KErrNotFound)
   963     if (index != KErrNotFound)
   912         {
   964         {
   913         aObject.RemoveProperty(index);
   965         aObject.RemoveProperty(index);
   914         }
   966         }
       
   967     OstTraceFunctionExit0( CMTPIMAGEDPOBJECTPROPERTYMGR_REMOVEPROPERTY_EXIT );
   915     }
   968     }
   916 
   969 
   917 /**
   970 /**
   918  * Store thumbnail into cache
   971  * Store thumbnail into cache
   919  */
   972  */
   987 
  1040 
   988 void CMTPImageDpObjectPropertyMgr::OpenMdeObjectL()
  1041 void CMTPImageDpObjectPropertyMgr::OpenMdeObjectL()
   989     {
  1042     {
   990     if (iObject == NULL)
  1043     if (iObject == NULL)
   991         {
  1044         {
   992         __FLOG_VA((_L16("OpenMdeObjectL - URI = %S"), &iObjectInfo->DesC(CMTPObjectMetaData::ESuid)));
  1045 		OstTraceExt1( TRACE_NORMAL, CMTPIMAGEDPOBJECTPROPERTYMGR_OPENMDEOBJECTL, 
       
  1046 		        "OpenMdeObjectL - URI = %S", iObjectInfo->DesC(CMTPObjectMetaData::ESuid) );
   993 		
  1047 		
   994         CMdENamespaceDef& defaultNamespace = iMetaDataSession->GetDefaultNamespaceDefL();
  1048         CMdENamespaceDef& defaultNamespace = iMetaDataSession->GetDefaultNamespaceDefL();
   995         CMdEObjectDef& imageObjDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
  1049         CMdEObjectDef& imageObjDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
   996         
  1050         
   997         //if we can not open MdS object for getting properties, we will not get properites which stored in MdS
  1051         //if we can not open MdS object for getting properties, we will not get properites which stored in MdS