262 |
262 |
263 if( !iPropDefs ) |
263 if( !iPropDefs ) |
264 { |
264 { |
265 CMdEObjectDef& objectDef = mdeObject.Def(); |
265 CMdEObjectDef& objectDef = mdeObject.Def(); |
266 iPropDefs = CHarvesterOmaDrmPluginPropertyDefs::NewL( objectDef ); |
266 iPropDefs = CHarvesterOmaDrmPluginPropertyDefs::NewL( objectDef ); |
|
267 // Prefetch max text lengt for validity checking |
|
268 iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL(); |
267 } |
269 } |
268 |
270 |
269 TTimeIntervalSeconds timeOffset = User::UTCOffset(); |
271 TTimeIntervalSeconds timeOffset = User::UTCOffset(); |
270 |
272 |
271 if( ! mdeObject.Placeholder() ) |
273 if( ! mdeObject.Placeholder() ) |
299 // DRM protection |
301 // DRM protection |
300 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
302 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
301 *iPropDefs->iDrmPropertyDef, &aVHD.iDrmProtected, aIsAdd ); |
303 *iPropDefs->iDrmPropertyDef, &aVHD.iDrmProtected, aIsAdd ); |
302 |
304 |
303 // Title (is set from URI by default) |
305 // Title (is set from URI by default) |
304 if(aVHD.iTitle.Length() > 0) |
306 if( aVHD.iTitle.Length() > 0 && aVHD.iTitle.Length() < iMaxTextLength ) |
305 { |
307 { |
306 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
308 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
307 *iPropDefs->iTitlePropertyDef, &aVHD.iTitle, EFalse ); |
309 *iPropDefs->iTitlePropertyDef, &aVHD.iTitle, EFalse ); |
308 } |
310 } |
309 // Description |
311 // Description |
310 if(aVHD.iDescription.Length() > 0) |
312 if( aVHD.iDescription.Length() > 0 && aVHD.iDescription.Length() < iMaxTextLength ) |
311 { |
313 { |
312 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
314 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
313 *iPropDefs->iDescriptionPropertyDef, &aVHD.iDescription, aIsAdd ); |
315 *iPropDefs->iDescriptionPropertyDef, &aVHD.iDescription, aIsAdd ); |
314 } |
316 } |
315 // Author |
317 // Author |
316 if(aVHD.iAuthor.Length() > 0) |
318 if( aVHD.iAuthor.Length() > 0 && aVHD.iAuthor.Length() < iMaxTextLength ) |
317 { |
319 { |
318 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
320 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
319 *iPropDefs->iAuthorPropertyDef, &aVHD.iAuthor, aIsAdd ); |
321 *iPropDefs->iAuthorPropertyDef, &aVHD.iAuthor, aIsAdd ); |
320 } |
322 } |
321 // Genre |
323 // Genre |
322 if(aVHD.iGenre.Length() > 0) |
324 if( aVHD.iGenre.Length() > 0 && aVHD.iGenre.Length() < iMaxTextLength ) |
323 { |
325 { |
324 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
326 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
325 *iPropDefs->iGenrePropertyDef, &aVHD.iGenre, aIsAdd ); |
327 *iPropDefs->iGenrePropertyDef, &aVHD.iGenre, aIsAdd ); |
326 } |
328 } |
327 } |
329 } |