uiaccelerator_plat/alf_extension_api/tsrc/src/testalfextblocksalflayouthandlers.cpp
branchRCL_3
changeset 19 e5af45d51884
parent 18 1801340c26a2
child 20 31fccae4f8a7
equal deleted inserted replaced
18:1801340c26a2 19:e5af45d51884
     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 alflayouthandlers.h
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 // [INCLUDE FILES]
       
    20 #include "testalfext.h"
       
    21 #include "testalflayouthandlers.h"
       
    22 
       
    23 // CONSTANTS
       
    24 const TInt KBufSize = 64;
       
    25 // ============================ MEMBER FUNCTIONS =========================
       
    26 
       
    27 
       
    28 // --------------------------------------------------------------------------
       
    29 // CTestAlfExt::TestLayoutHandlerConstructL
       
    30 // --------------------------------------------------------------------------
       
    31 //
       
    32 TInt CTestAlfExt::TestLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
    33     {
       
    34     _LIT(Kctestalfext, "CTestAlfExt");
       
    35     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
    36     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
    37     iLog->Log(Ktestcalflayouthandlernewl);
       
    38 
       
    39     CAlfLayoutHandler*handler = new ( ELeave ) CAlfLayoutHandler( *iInterface );
       
    40     CleanupStack::PushL(handler );
       
    41     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
    42     THuiInterfaceSupport interface = EAlfVisualHandler;
       
    43     TInt cmd = EAlfLayoutBaseUnit;
       
    44     _LIT8( KTest, "test" );
       
    45     TBuf8<KBufSize> input( KTest );
       
    46     TBuf8<KBufSize> response;
       
    47     handler->GetInterface( interface );
       
    48     handler->HandleCmdL( cmd, input, response );
       
    49     handler->Release();
       
    50     CleanupStack::Pop(handler );
       
    51     handler = NULL;
       
    52     handler = static_cast<CAlfLayoutHandler*>
       
    53         ( CAlfLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
    54     CleanupStack::PushL(handler );
       
    55     CleanupStack::PopAndDestroy(handler );
       
    56     return KErrNone;
       
    57     }
       
    58 
       
    59 // --------------------------------------------------------------------------
       
    60 // CTestAlfExt::TestLayoutHandlerProtectedL
       
    61 // --------------------------------------------------------------------------
       
    62 //
       
    63 TInt CTestAlfExt::TestLayoutHandlerProtectedL( CStifItemParser& aItem )
       
    64     {
       
    65     _LIT(Kctestalfext, "CTestAlfExt");
       
    66     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
    67     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
    68     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
    69 
       
    70     CTestCAlfLayoutHandler*handler = new ( ELeave ) 
       
    71         CTestCAlfLayoutHandler( *iInterface );
       
    72     CleanupStack::PushL(handler );
       
    73     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
    74     handler->TestProtect( aItem );
       
    75     CleanupStack::PopAndDestroy(handler );
       
    76 
       
    77     return KErrNone;
       
    78     }
       
    79 
       
    80 // --------------------------------------------------------------------------
       
    81 // CTestAlfExt::TestAnchorLayoutHandlerConstructL
       
    82 // --------------------------------------------------------------------------
       
    83 //
       
    84 TInt CTestAlfExt::TestAnchorLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
    85     {
       
    86     _LIT(Kctestalfext, "CTestAlfExt");
       
    87     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
    88     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
    89     iLog->Log(Ktestcalflayouthandlernewl);
       
    90 
       
    91     CAlfAnchorLayoutHandler*handler = new ( ELeave ) 
       
    92         CAlfAnchorLayoutHandler( *iInterface );
       
    93     CleanupStack::PushL(handler );
       
    94     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
    95     THuiInterfaceSupport interface = EAlfVisualHandler;
       
    96     TInt cmd = EAlfLayoutBaseUnit;
       
    97     TBuf8<KBufSize> input;
       
    98     TBuf8<KBufSize> response;
       
    99     handler->GetInterface( interface );
       
   100     handler->HandleCmdL( cmd, input, response );
       
   101     handler->Release();
       
   102     CleanupStack::Pop(handler );
       
   103     handler = NULL;
       
   104     handler = static_cast<CAlfAnchorLayoutHandler*>
       
   105         ( CAlfAnchorLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
   106     CleanupStack::PushL(handler );
       
   107     CleanupStack::PopAndDestroy(handler );
       
   108     return KErrNone;
       
   109     }
       
   110 
       
   111 // --------------------------------------------------------------------------
       
   112 // CTestAlfExt::TestAnchorLayoutHandlerProtectedL
       
   113 // --------------------------------------------------------------------------
       
   114 //
       
   115 TInt CTestAlfExt::TestAnchorLayoutHandlerProtectedL( CStifItemParser& aItem )
       
   116     {
       
   117     _LIT(Kctestalfext, "CTestAlfExt");
       
   118     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
   119     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
   120     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
   121 
       
   122     CTestCAlfAnchorLayoutHandler*handler = new ( ELeave ) 
       
   123             CTestCAlfAnchorLayoutHandler( *iInterface );
       
   124     CleanupStack::PushL(handler );
       
   125     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   126     handler->TestProtect( aItem );
       
   127     CleanupStack::PopAndDestroy(handler );
       
   128 
       
   129     return KErrNone;
       
   130     }
       
   131 
       
   132 
       
   133 // --------------------------------------------------------------------------
       
   134 // CTestAlfExt::TestLCTAnchorLayoutHandlerConstructL
       
   135 // --------------------------------------------------------------------------
       
   136 //
       
   137 TInt CTestAlfExt::TestLCTAnchorLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
   138     {
       
   139     _LIT(Kctestalfext, "CTestAlfExt");
       
   140     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
   141     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
   142     iLog->Log(Ktestcalflayouthandlernewl);
       
   143 
       
   144     CAlfLCTAnchorLayoutHandler*handler = new ( ELeave ) 
       
   145         CAlfLCTAnchorLayoutHandler( *iInterface );
       
   146     CleanupStack::PushL(handler );
       
   147     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   148     THuiInterfaceSupport interface = EAlfVisualHandler;
       
   149     TInt cmd = EAlfLayoutBaseUnit;
       
   150     TBuf8<KBufSize> input;
       
   151     TBuf8<KBufSize> response;
       
   152     handler->GetInterface( interface );
       
   153     handler->HandleCmdL( cmd, input, response );
       
   154     handler->Release();
       
   155     CleanupStack::Pop(handler );
       
   156     handler = NULL;
       
   157     handler = static_cast<CAlfLCTAnchorLayoutHandler*>
       
   158         ( CAlfLCTAnchorLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
   159     CleanupStack::PushL(handler );
       
   160     CleanupStack::PopAndDestroy(handler );
       
   161     return KErrNone;
       
   162     }
       
   163 
       
   164 // --------------------------------------------------------------------------
       
   165 // CTestAlfExt::TestLCTAnchorLayoutHandlerProtectedL
       
   166 // --------------------------------------------------------------------------
       
   167 //
       
   168 TInt CTestAlfExt::TestLCTAnchorLayoutHandlerProtectedL( CStifItemParser& aItem )
       
   169     {
       
   170     _LIT(Kctestalfext, "CTestAlfExt");
       
   171     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
   172     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
   173     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
   174 
       
   175     CTestCAlfLCTAnchorLayoutHandler*handler = new ( ELeave ) 
       
   176         CTestCAlfLCTAnchorLayoutHandler( *iInterface );
       
   177     CleanupStack::PushL(handler );
       
   178     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   179     handler->TestProtect( aItem );
       
   180     CleanupStack::PopAndDestroy(handler );
       
   181 
       
   182     return KErrNone;
       
   183     }
       
   184 
       
   185 
       
   186 // --------------------------------------------------------------------------
       
   187 // CTestAlfExt::TestGridLayoutHandlerConstructL
       
   188 // --------------------------------------------------------------------------
       
   189 //
       
   190 TInt CTestAlfExt::TestGridLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
   191     {
       
   192     _LIT(Kctestalfext, "CTestAlfExt");
       
   193     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
   194     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
   195     iLog->Log(Ktestcalflayouthandlernewl);
       
   196 
       
   197     CAlfGridLayoutHandler*handler = new ( ELeave ) 
       
   198         CAlfGridLayoutHandler( *iInterface );
       
   199     CleanupStack::PushL(handler );
       
   200     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   201     THuiInterfaceSupport interface = EAlfVisualHandler;
       
   202     TInt cmd = EAlfLayoutBaseUnit;
       
   203     TBuf8<KBufSize> input;
       
   204     TBuf8<KBufSize> response;
       
   205     handler->GetInterface( interface );
       
   206     handler->HandleCmdL( cmd, input, response );
       
   207     handler->Release();
       
   208     CleanupStack::Pop(handler );
       
   209     handler = NULL;
       
   210     handler = static_cast<CAlfGridLayoutHandler*>
       
   211         ( CAlfGridLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
   212     CleanupStack::PushL(handler );
       
   213     CleanupStack::PopAndDestroy(handler );
       
   214     return KErrNone;
       
   215     }
       
   216 
       
   217 // --------------------------------------------------------------------------
       
   218 // CTestAlfExt::TestGridLayoutHandlerProtectedL
       
   219 // --------------------------------------------------------------------------
       
   220 //
       
   221 TInt CTestAlfExt::TestGridLayoutHandlerProtectedL( CStifItemParser& aItem )
       
   222     {
       
   223     _LIT(Kctestalfext, "CTestAlfExt");
       
   224     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
   225     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
   226     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
   227 
       
   228     CTestCAlfGridLayoutHandler*handler = new ( ELeave ) 
       
   229         CTestCAlfGridLayoutHandler( *iInterface );
       
   230     CleanupStack::PushL(handler );
       
   231     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   232     handler->TestProtect( aItem );
       
   233     CleanupStack::PopAndDestroy(handler );
       
   234 
       
   235     return KErrNone;
       
   236     }
       
   237 
       
   238 // --------------------------------------------------------------------------
       
   239 // CTestAlfExt::TestLCTGridLayoutHandlerConstructL
       
   240 // --------------------------------------------------------------------------
       
   241 //
       
   242 TInt CTestAlfExt::TestLCTGridLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
   243     {
       
   244     _LIT(Kctestalfext, "CTestAlfExt");
       
   245     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
   246     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
   247     iLog->Log(Ktestcalflayouthandlernewl);
       
   248 
       
   249     CAlfLCTGridLayoutHandler*handler = new ( ELeave ) 
       
   250         CAlfLCTGridLayoutHandler( *iInterface );
       
   251     CleanupStack::PushL(handler );
       
   252     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   253     THuiInterfaceSupport interface = EAlfVisualHandler;
       
   254     TInt cmd = EAlfLayoutBaseUnit;
       
   255     TBuf8<KBufSize> input;
       
   256     TBuf8<KBufSize> response;
       
   257     handler->GetInterface( interface );
       
   258     handler->HandleCmdL( cmd, input, response );
       
   259     handler->Release();
       
   260     CleanupStack::Pop(handler );
       
   261     handler = NULL;
       
   262     handler = static_cast<CAlfLCTGridLayoutHandler*>
       
   263         ( CAlfLCTGridLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
   264     CleanupStack::PushL(handler );
       
   265     CleanupStack::PopAndDestroy(handler );
       
   266     return KErrNone;
       
   267     }
       
   268 
       
   269 // --------------------------------------------------------------------------
       
   270 // CTestAlfExt::TestLCTGridLayoutHandlerProtectedL
       
   271 // --------------------------------------------------------------------------
       
   272 //
       
   273 TInt CTestAlfExt::TestLCTGridLayoutHandlerProtectedL( CStifItemParser& aItem )
       
   274     {
       
   275     _LIT(Kctestalfext, "CTestAlfExt");
       
   276     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
   277     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
   278     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
   279 
       
   280     CTestCAlfLCTGridLayoutHandler*handler = new ( ELeave ) 
       
   281         CTestCAlfLCTGridLayoutHandler( *iInterface );
       
   282     CleanupStack::PushL(handler );
       
   283     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   284     handler->TestProtect( aItem );
       
   285     CleanupStack::PopAndDestroy(handler );
       
   286 
       
   287     return KErrNone;
       
   288     }
       
   289 
       
   290 // --------------------------------------------------------------------------
       
   291 // CTestAlfExt::TestDeckLayoutHandlerConstructL
       
   292 // --------------------------------------------------------------------------
       
   293 //
       
   294 TInt CTestAlfExt::TestDeckLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
   295     {
       
   296     _LIT(Kctestalfext, "CTestAlfExt");
       
   297     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
   298     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
   299     iLog->Log(Ktestcalflayouthandlernewl);
       
   300 
       
   301     CAlfDeckLayoutHandler*handler = new ( ELeave ) 
       
   302         CAlfDeckLayoutHandler( *iInterface );
       
   303     CleanupStack::PushL(handler );
       
   304     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   305     THuiInterfaceSupport interface = EAlfVisualHandler;
       
   306     TInt cmd = EAlfLayoutBaseUnit;
       
   307     TBuf8<KBufSize> input;
       
   308     TBuf8<KBufSize> response;
       
   309     handler->GetInterface( interface );
       
   310     handler->HandleCmdL( cmd, input, response );
       
   311     handler->Release();
       
   312     CleanupStack::Pop(handler );
       
   313     handler = NULL;
       
   314     handler = static_cast<CAlfDeckLayoutHandler*>
       
   315         ( CAlfDeckLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
   316     CleanupStack::PushL(handler );
       
   317     CleanupStack::PopAndDestroy(handler );
       
   318     return KErrNone;
       
   319     }
       
   320 
       
   321 // --------------------------------------------------------------------------
       
   322 // CTestAlfExt::TestDeckLayoutHandlerProtectedL
       
   323 // --------------------------------------------------------------------------
       
   324 //
       
   325 TInt CTestAlfExt::TestDeckLayoutHandlerProtectedL( CStifItemParser& aItem )
       
   326     {
       
   327     _LIT(Kctestalfext, "CTestAlfExt");
       
   328     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
   329     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
   330     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
   331 
       
   332     CTestCAlfDeckLayoutHandler*handler = new ( ELeave ) 
       
   333         CTestCAlfDeckLayoutHandler( *iInterface );
       
   334     CleanupStack::PushL(handler );
       
   335     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   336     handler->TestProtect( aItem );
       
   337     CleanupStack::PopAndDestroy(handler );
       
   338 
       
   339     return KErrNone;
       
   340     }
       
   341 
       
   342 // --------------------------------------------------------------------------
       
   343 // CTestAlfExt::TestFlowLayoutHandlerConstructL
       
   344 // --------------------------------------------------------------------------
       
   345 //
       
   346 TInt CTestAlfExt::TestFlowLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
   347     {
       
   348     _LIT(Kctestalfext, "CTestAlfExt");
       
   349     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
   350     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
   351     iLog->Log(Ktestcalflayouthandlernewl);
       
   352 
       
   353     CAlfFlowLayoutHandler*handler = new ( ELeave ) 
       
   354         CAlfFlowLayoutHandler( *iInterface );
       
   355     CleanupStack::PushL(handler );
       
   356     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   357     THuiInterfaceSupport interface = EAlfVisualHandler;
       
   358     TInt cmd = EAlfLayoutBaseUnit;
       
   359     TBuf8<KBufSize> input;
       
   360     TBuf8<KBufSize> response;
       
   361     handler->GetInterface( interface );
       
   362     handler->HandleCmdL( cmd, input, response );
       
   363     handler->Release();
       
   364     CleanupStack::Pop(handler );
       
   365     handler = NULL;
       
   366     handler = static_cast<CAlfFlowLayoutHandler*>
       
   367         ( CAlfFlowLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
   368     CleanupStack::PushL(handler );
       
   369     CleanupStack::PopAndDestroy(handler );
       
   370     return KErrNone;
       
   371     }
       
   372 
       
   373 // --------------------------------------------------------------------------
       
   374 // CTestAlfExt::TestFlowLayoutHandlerProtectedL
       
   375 // --------------------------------------------------------------------------
       
   376 //
       
   377 TInt CTestAlfExt::TestFlowLayoutHandlerProtectedL( CStifItemParser& aItem )
       
   378     {
       
   379     _LIT(Kctestalfext, "CTestAlfExt");
       
   380     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
   381     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
   382     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
   383 
       
   384     CTestCAlfFlowLayoutHandler*handler = new ( ELeave ) 
       
   385         CTestCAlfFlowLayoutHandler( *iInterface );
       
   386     CleanupStack::PushL(handler );
       
   387     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   388     handler->TestProtect( aItem );
       
   389     CleanupStack::PopAndDestroy(handler );
       
   390 
       
   391     return KErrNone;
       
   392     }
       
   393 
       
   394 // --------------------------------------------------------------------------
       
   395 // CTestAlfExt::TestCurvePathLayoutHandlerConstructL
       
   396 // --------------------------------------------------------------------------
       
   397 //
       
   398 TInt CTestAlfExt::TestCurvePathLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
   399     {
       
   400     _LIT(Kctestalfext, "CTestAlfExt");
       
   401     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
   402     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
   403     iLog->Log(Ktestcalflayouthandlernewl);
       
   404 
       
   405     CAlfCurvePathLayoutHandler*handler = new ( ELeave ) 
       
   406         CAlfCurvePathLayoutHandler( *iInterface );
       
   407     CleanupStack::PushL(handler );
       
   408     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   409     THuiInterfaceSupport interface = EAlfVisualHandler;
       
   410     TInt cmd = EAlfLayoutBaseUnit;
       
   411     TBuf8<KBufSize> input;
       
   412     TBuf8<KBufSize> response;
       
   413     handler->GetInterface( interface );
       
   414     handler->HandleCmdL( cmd, input, response );
       
   415     handler->Release();
       
   416     CleanupStack::Pop(handler );
       
   417     handler = NULL;
       
   418     handler = static_cast<CAlfCurvePathLayoutHandler*>
       
   419         ( CAlfCurvePathLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
   420     CleanupStack::PushL(handler );
       
   421     CleanupStack::PopAndDestroy(handler );
       
   422     return KErrNone;
       
   423     }
       
   424 
       
   425 // --------------------------------------------------------------------------
       
   426 // CTestAlfExt::TestCurvePathLayoutHandlerProtectedL
       
   427 // --------------------------------------------------------------------------
       
   428 //
       
   429 TInt CTestAlfExt::TestCurvePathLayoutHandlerProtectedL( CStifItemParser& aItem )
       
   430     {
       
   431     _LIT(Kctestalfext, "CTestAlfExt");
       
   432     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
   433     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
   434     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
   435 
       
   436     CTestCAlfCurvePathLayoutHandler*handler = new ( ELeave ) 
       
   437         CTestCAlfCurvePathLayoutHandler( *iInterface );
       
   438     CleanupStack::PushL(handler );
       
   439     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   440     handler->TestProtect( aItem );
       
   441     CleanupStack::PopAndDestroy(handler );
       
   442 
       
   443     return KErrNone;
       
   444     }
       
   445 
       
   446 // --------------------------------------------------------------------------
       
   447 // CTestAlfExt::TestViewportLayoutHandlerConstructL
       
   448 // --------------------------------------------------------------------------
       
   449 //
       
   450 TInt CTestAlfExt::TestViewportLayoutHandlerConstructL( CStifItemParser& /*aItem*/ )
       
   451     {
       
   452     _LIT(Kctestalfext, "CTestAlfExt");
       
   453     _LIT(Ktestcalflayouthandlernewl, "In TestCAlfLayoutHandlerNewL");
       
   454     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlernewl);
       
   455     iLog->Log(Ktestcalflayouthandlernewl);
       
   456 
       
   457     CAlfViewportLayoutHandler*handler = new ( ELeave ) 
       
   458             CAlfViewportLayoutHandler( *iInterface );
       
   459     CleanupStack::PushL(handler );
       
   460     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   461     THuiInterfaceSupport interface = EAlfVisualHandler;
       
   462     TInt cmd = EAlfLayoutBaseUnit;
       
   463     TBuf8<KBufSize> input;
       
   464     TBuf8<KBufSize> response;
       
   465     handler->GetInterface( interface );
       
   466     handler->HandleCmdL( cmd, input, response );
       
   467     handler->Release();
       
   468     CleanupStack::Pop(handler );
       
   469     handler = NULL;
       
   470     handler = static_cast<CAlfViewportLayoutHandler*>
       
   471         ( CAlfViewportLayoutHandler::NewL( *iInterface, iHuiControl, NULL ) );
       
   472     CleanupStack::PushL(handler );
       
   473     CleanupStack::PopAndDestroy(handler );
       
   474     return KErrNone;
       
   475     }
       
   476 
       
   477 // --------------------------------------------------------------------------
       
   478 // CTestAlfExt::TestViewportLayoutHandlerProtectedL
       
   479 // --------------------------------------------------------------------------
       
   480 //
       
   481 TInt CTestAlfExt::TestViewportLayoutHandlerProtectedL( CStifItemParser& aItem )
       
   482     {
       
   483     _LIT(Kctestalfext, "CTestAlfExt");
       
   484     _LIT(Ktestcalflayouthandlercalflayouthandler, "In TestCAlfLayoutHandlerCAlfLayoutHandler");
       
   485     TestModuleIf().Printf(0, Kctestalfext, Ktestcalflayouthandlercalflayouthandler);
       
   486     iLog->Log(Ktestcalflayouthandlercalflayouthandler);
       
   487 
       
   488     CTestCAlfViewportLayoutHandler*handler = new ( ELeave ) 
       
   489         CTestCAlfViewportLayoutHandler( *iInterface );
       
   490     CleanupStack::PushL(handler );
       
   491     handler->ConstructL( iHuiVisual, *iHuiControl, NULL );
       
   492     handler->TestProtect( aItem );
       
   493     CleanupStack::PopAndDestroy(handler );
       
   494 
       
   495     return KErrNone;
       
   496     }
       
   497 
       
   498 // End of file
       
   499 
       
   500