uiresources/src/testsdkskinsblockswu.cpp
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 /*
       
     2 * Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Symbian Foundation License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Test AknsWallpaperUtils.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <aknswallpaperutils.h>
       
    20 #include <coemain.h>
       
    21 
       
    22 #include "testsdkskins.h"
       
    23 
       
    24 const TInt KLength = 50;
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 // -----------------------------------------------------------------------------
       
    28 // CTestSDKSkins::TestWUSetIdleWallpaper
       
    29 // -----------------------------------------------------------------------------
       
    30 TInt CTestSDKSkins::TestWUSetIdleWallpaper( CStifItemParser& /*aItem*/ )
       
    31     {
       
    32     _LIT( KFileName, "c:\\smoketest\\wallpaper\\symbian_01_320x480.jpg" );
       
    33     TBuf<KLength> fileName( KFileName );
       
    34     AknsWallpaperUtils::SetIdleWallpaper( fileName, CCoeEnv::Static() );
       
    35     
       
    36     return KErrNone;
       
    37     
       
    38     }
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 // CTestSDKSkins::TestWUSetSlidesetWallpaperL
       
    42 // -----------------------------------------------------------------------------
       
    43 TInt CTestSDKSkins::TestWUSetSlidesetWallpaperL( CStifItemParser& /*aItem*/ )
       
    44     {
       
    45     _LIT( KFileName, "wallpaperutils" );
       
    46     TBuf<KLength> fileName( KFileName );
       
    47     
       
    48     CDesCArray* array = new (ELeave) CDesCArrayFlat(1);
       
    49     CleanupStack::PushL( array );
       
    50     STIF_ASSERT_NOT_NULL( array );
       
    51     
       
    52     array->AppendL( fileName );
       
    53     AknsWallpaperUtils::SetSlidesetWallpaper( *array, CCoeEnv::Static() );
       
    54     
       
    55     CleanupStack::PopAndDestroy( array );
       
    56     
       
    57     return KErrNone;
       
    58     
       
    59     }