diff -r 000000000000 -r 05e9090e2422 uiresources_pub/skins_api/tsrc/src/testsdkskinsblockswu.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uiresources_pub/skins_api/tsrc/src/testsdkskinsblockswu.cpp Thu Dec 17 09:14:12 2009 +0200 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Test AknsWallpaperUtils.h +* +*/ + + +#include +#include + +#include "testsdkskins.h" + +const TInt KLength = 20; + +// ============================ MEMBER FUNCTIONS =============================== +// ----------------------------------------------------------------------------- +// CTestSDKSkins::TestWUSetIdleWallpaper +// ----------------------------------------------------------------------------- +TInt CTestSDKSkins::TestWUSetIdleWallpaper( CStifItemParser& /*aItem*/ ) + { + _LIT( KFileName, "wallpaperutils" ); + TBuf fileName( KFileName ); + AknsWallpaperUtils::SetIdleWallpaper( fileName, CCoeEnv::Static() ); + + return KErrNone; + + } + +// ----------------------------------------------------------------------------- +// CTestSDKSkins::TestWUSetSlidesetWallpaperL +// ----------------------------------------------------------------------------- +TInt CTestSDKSkins::TestWUSetSlidesetWallpaperL( CStifItemParser& /*aItem*/ ) + { + _LIT( KFileName, "wallpaperutils" ); + TBuf fileName( KFileName ); + + CDesCArray* array = new (ELeave) CDesCArrayFlat(1); + CleanupStack::PushL( array ); + STIF_ASSERT_NOT_NULL( array ); + + array->AppendL( fileName ); + AknsWallpaperUtils::SetSlidesetWallpaper( *array, CCoeEnv::Static() ); + + CleanupStack::PopAndDestroy( array ); + + return KErrNone; + + }