harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp
changeset 23 33ae025ac1e8
parent 21 50bf9db68373
child 25 8e4539ab1889
child 41 2290317b9ec5
equal deleted inserted replaced
21:50bf9db68373 23:33ae025ac1e8
   279     
   279     
   280     if( !iPropDefs )
   280     if( !iPropDefs )
   281 		{
   281 		{
   282 		CMdEObjectDef& objectDef = mdeObject.Def();
   282 		CMdEObjectDef& objectDef = mdeObject.Def();
   283 		iPropDefs = CHarvesterWmvPluginPropertyDefs::NewL( objectDef );
   283 		iPropDefs = CHarvesterWmvPluginPropertyDefs::NewL( objectDef );
       
   284 		// Prefetch max text lengt for validity checking
       
   285 		iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL();
   284 		}
   286 		}
   285     
   287     
   286     if( ! mdeObject.Placeholder() )
   288     if( ! mdeObject.Placeholder() )
   287     	{
   289     	{
   288         // Creation date
   290         // Creation date
   306         {
   308         {
   307         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   309         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   308                 *iPropDefs->iDrmPropertyDef, &aClipDetails.iDrmProtected, aIsAdd );
   310                 *iPropDefs->iDrmPropertyDef, &aClipDetails.iDrmProtected, aIsAdd );
   309         } 
   311         } 
   310     // Title (is set from URI by default)
   312     // Title (is set from URI by default)
   311     if(aClipDetails.iTitle.Length() > 0)
   313     if( aClipDetails.iTitle.Length() > 0 && aClipDetails.iTitle.Length() < iMaxTextLength )
   312         {
   314         {
   313         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   315         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   314                 *iPropDefs->iTitlePropertyDef, &aClipDetails.iTitle, EFalse );
   316                 *iPropDefs->iTitlePropertyDef, &aClipDetails.iTitle, EFalse );
   315         }
   317         }
   316     // Description
   318     // Description
   317     if(aClipDetails.iDescription.Length() > 0)
   319     if( aClipDetails.iDescription.Length() > 0 && aClipDetails.iDescription.Length() < iMaxTextLength )
   318         {
   320         {
   319         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   321         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   320                 *iPropDefs->iDescriptionPropertyDef, &aClipDetails.iDescription, aIsAdd );
   322                 *iPropDefs->iDescriptionPropertyDef, &aClipDetails.iDescription, aIsAdd );
   321         }   
   323         }   
   322     // Author
   324     // Author
   323     if(aClipDetails.iAuthor.Length() > 0)
   325     if( aClipDetails.iAuthor.Length() > 0 && aClipDetails.iAuthor.Length() < iMaxTextLength )
   324         {
   326         {
   325         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   327         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   326                 *iPropDefs->iAuthorPropertyDef, &aClipDetails.iAuthor, aIsAdd );
   328                 *iPropDefs->iAuthorPropertyDef, &aClipDetails.iAuthor, aIsAdd );
   327         }
   329         }
   328     // Genre
   330     // Genre
   329     if(aClipDetails.iGenre.Length() > 0)
   331     if( aClipDetails.iGenre.Length() > 0 && aClipDetails.iGenre.Length() < iMaxTextLength )
   330         {
   332         {
   331         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   333         CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
   332                 *iPropDefs->iGenrePropertyDef, &aClipDetails.iGenre, aIsAdd );
   334                 *iPropDefs->iGenrePropertyDef, &aClipDetails.iGenre, aIsAdd );
   333         }   
   335         }   
   334     }
   336     }