uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksgencomponent.cpp
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     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 "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  test functions for alfvisual.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // [INCLUDE FILES]
       
    21 #include <e32svr.h>
       
    22 #include <stifparser.h>
       
    23 #include <stiftestinterface.h>
       
    24 
       
    25 #include "testplatalfvisual.h"
       
    26 
       
    27 
       
    28 // CONSTANTS
       
    29 const TInt KBufSize = 64;
       
    30 
       
    31 // ============================ MEMBER FUNCTIONS ===============================
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CTestPlatAlfVisual::TestAlfGenComponentNewL
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 TInt CTestPlatAlfVisual::TestAlfGenComponentNewL( CStifItemParser& /*aItem*/ )
       
    38     {
       
    39     _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" );
       
    40     _LIT( KTestAlfGenComponentNewL, "TestAlfGenComponentNewL" );
       
    41     TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfGenComponentNewL );
       
    42     // Print to log file
       
    43     iLog->Log( KTestAlfGenComponentNewL );
       
    44     _LIT8( KTest, "test" );
       
    45     TBuf8<KBufSize> vBuf( KTest );
       
    46     CAlfGenComponent* vComponent = CAlfGenComponent::NewL( *iAlfEnv, 0, 0x0DDDDDDE,
       
    47             vBuf );
       
    48     CleanupStack::PushL( vComponent );
       
    49     STIF_ASSERT_NOT_NULL( vComponent );
       
    50     CleanupStack::PopAndDestroy( vComponent );
       
    51     return KErrNone;
       
    52     }
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CTestPlatAlfVisual::TestAlfGenComponentProcessL
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 TInt CTestPlatAlfVisual::TestAlfGenComponentProcessL( CStifItemParser& /*aItem*/ )
       
    59     {
       
    60     _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" );
       
    61     _LIT( KTestAlfGenComponentProcessL, "TestAlfGenComponentProcessL" );
       
    62     TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfGenComponentProcessL );
       
    63     // Print to log file
       
    64     iLog->Log( KTestAlfGenComponentProcessL );
       
    65     _LIT8( KTest, "test" );
       
    66     TBuf8<KBufSize> vBuf( KTest );
       
    67     CAlfGenComponent* vComponent = CAlfGenComponent::NewL( *iAlfEnv, 0, 0x0DDDDDDE,
       
    68             vBuf );
       
    69     CleanupStack::PushL( vComponent );
       
    70     vComponent->Identifier();
       
    71     _LIT8( KInput, "in" );
       
    72     TBuf8<KBufSize> vInputBuf( KInput );
       
    73     _LIT8( KOut, "out" );
       
    74     TBuf8<KBufSize> vOutBuf( KOut );
       
    75     vComponent->DoSynchronousCmd( 0, vInputBuf, vOutBuf );
       
    76     vComponent->CancelAsynchCmd( 0 );
       
    77     vComponent->DoAsynchronousCmdL( 0, vInputBuf, vOutBuf, NULL );
       
    78     vComponent->DoCmdNoReply( 0 , vInputBuf );
       
    79     
       
    80     CleanupStack::PopAndDestroy( vComponent );
       
    81     
       
    82     return KErrNone;
       
    83     }
       
    84 
       
    85 // End of file
       
    86 
       
    87