diff -r f759b6186ab5 -r 2b4b06654caa imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailcenrep.cpp --- a/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailcenrep.cpp Thu Jul 15 18:59:26 2010 +0300 +++ b/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailcenrep.cpp Thu Aug 19 10:13:51 2010 +0300 @@ -67,6 +67,11 @@ case EAudioFullScreenThumbnailSize: iSourceType = EAudio; break; + case EContactGridThumbnailSize: + case EContactListThumbnailSize: + case EContactFullScreenThumbnailSize: + iSourceType = EContact; + break; default: iSourceType = EUnknownSourceType; } @@ -80,7 +85,8 @@ TThumbnailAutoCreate::TThumbnailAutoCreate() : iImageGrid(EFalse), iImageList(EFalse), iImageFullscreen(EFalse), iVideoGrid(EFalse), iVideoList(EFalse), iVideoFullscreen(EFalse), - iAudioGrid(EFalse), iAudioList(EFalse), iAudioFullscreen(EFalse) + iAudioGrid(EFalse), iAudioList(EFalse), iAudioFullscreen(EFalse), + iContactGrid(EFalse), iContactList(EFalse), iContactFullscreen(EFalse) { // No implementation required } @@ -107,7 +113,9 @@ { iPersistentSizes.Close(); delete iAutoCreate; + iAutoCreate = NULL; delete iRepository; + iRepository = NULL; } // --------------------------------------------------------------------------- @@ -203,6 +211,57 @@ iPersistentSizes.AppendL( TThumbnailPersistentSize( EAudioFullScreenThumbnailSize, TSize( xSize, ySize ), flags, static_cast (raw_mode), format, autoCreate, TThumbnailPersistentSize::EFullscreen )); + +// Contact TN, set default values if not found + if(iRepository->Get( KSizeContactGridWidth, xSize ) != KErrNone) + { + xSize = 54; + } + if( iRepository->Get( KSizeContactGridHeight, ySize ) != KErrNone) + { + ySize = 54; + } + + if( iRepository->Get( KAutoCreateContactGrid, autoCreate ) != KErrNone) + { + autoCreate = 1; + } + + iPersistentSizes.AppendL( TThumbnailPersistentSize( EContactGridThumbnailSize, TSize( xSize, ySize ), + KGridAndListThumbnailCropped, static_cast (raw_mode), format, autoCreate, TThumbnailPersistentSize::EGrid )); + + if( iRepository->Get( KSizeContactListWidth, xSize ) != KErrNone) + { + xSize = 64; + } + if( iRepository->Get( KSizeContactListHeight, ySize ) != KErrNone) + { + ySize = 64; + } + if( iRepository->Get( KAutoCreateContactList, autoCreate ) != KErrNone) + { + autoCreate = 1; + } + + iPersistentSizes.AppendL( TThumbnailPersistentSize( EContactListThumbnailSize, TSize( xSize, ySize ), + KGridAndListThumbnailCropped, static_cast (raw_mode), format, autoCreate, TThumbnailPersistentSize::EList )); + + if( iRepository->Get( KSizeContactFullscreenWidth, xSize ) != KErrNone) + { + xSize = 250; + } + if( iRepository->Get( KSizeContactFullscreenHeight, ySize ) != KErrNone) + { + ySize = 250; + } + if( iRepository->Get( KAutoCreateContactFullscreen, autoCreate) != KErrNone) + { + autoCreate = 1; + } + + iPersistentSizes.AppendL( TThumbnailPersistentSize( EContactFullScreenThumbnailSize, TSize( xSize, ySize ), + flags, static_cast (raw_mode), format, autoCreate, TThumbnailPersistentSize::EFullscreen )); + iAutoCreate = new (ELeave) TThumbnailAutoCreate(); @@ -215,6 +274,19 @@ User::LeaveIfError( iRepository->Get( KAutoCreateAudioGrid, iAutoCreate->iAudioGrid )); User::LeaveIfError( iRepository->Get( KAutoCreateAudioList, iAutoCreate->iAudioList )); User::LeaveIfError( iRepository->Get( KAutoCreateAudioFullscreen, iAutoCreate->iAudioFullscreen )); + + if( iRepository->Get( KAutoCreateContactGrid, iAutoCreate->iContactGrid ) != KErrNone ) + { + iAutoCreate->iContactGrid = 1; + } + if( iRepository->Get( KAutoCreateContactList, iAutoCreate->iContactList ) != KErrNone ) + { + iAutoCreate->iContactList = 1; + } + if( iRepository->Get( KAutoCreateContactFullscreen, iAutoCreate->iContactFullscreen ) != KErrNone ) + { + iAutoCreate->iContactFullscreen = 1; + } } // ---------------------------------------------------------------------------