mmappfw_plat/videoplaylist_utility_api/tsrc/videoplaylistutilitytest/src/videoplaylistutilitytestBlocks.cpp
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2008 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:  videoplaylistutility test class for STIF testing
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: 2 %
       
    19 
       
    20 // [INCLUDE FILES] - do not remove
       
    21 #include <e32svr.h>
       
    22 #include <StifParser.h>
       
    23 #include <Stiftestinterface.h>
       
    24 #include "videoplaylistutilitytest.h"
       
    25 #include "videoplaylistutilitytester.h"
       
    26 
       
    27 // ============================= LOCAL FUNCTIONS ===============================
       
    28 
       
    29 // ============================ MEMBER FUNCTIONS ===============================
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // Cvideoplaylistutility_test::Delete
       
    33 // Delete here all resources allocated and opened from test methods.
       
    34 // Called from destructor.
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 void Cvideoplaylistutility_test::Delete()
       
    38 {
       
    39     if ( iPlaylistUtilityTester )
       
    40     {
       
    41         delete iPlaylistUtilityTester;
       
    42         iPlaylistUtilityTester = NULL;
       
    43     }
       
    44 }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // Cvideoplaylistutility_test::RunMethodL
       
    48 // Run specified method. Contains also table of test mothods and their names.
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 TInt Cvideoplaylistutility_test::RunMethodL( CStifItemParser& aItem )
       
    52 {
       
    53     static TStifFunctionInfo const KFunctions[] =
       
    54     {
       
    55         // Copy this line for every implemented function.
       
    56         // First string is the function name used in TestScripter script file.
       
    57         // Second is the actual implementation member function.
       
    58         ENTRY( "CreatePlaylistUtility", Cvideoplaylistutility_test::CreatePlaylistUtilityL ),
       
    59         ENTRY( "GetFileInfo", Cvideoplaylistutility_test::GetFileInfoL ),
       
    60         ENTRY( "GetLink", Cvideoplaylistutility_test::GetLinkL ),
       
    61         ENTRY( "GetPlaylist", Cvideoplaylistutility_test::GetPlaylistL ),
       
    62         ENTRY( "IsSeekable", Cvideoplaylistutility_test::IsSeekableL ),
       
    63 
       
    64     };
       
    65 
       
    66     const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo );
       
    67 
       
    68     return RunInternalL( KFunctions, count, aItem );
       
    69 }
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 //   Cvideoplaylistutility_test::CreateEngineL
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 TInt Cvideoplaylistutility_test::CreatePlaylistUtilityL( CStifItemParser& aItem )
       
    76 {
       
    77     iPlaylistUtilityTester = CVideoPlaylistUtility_Tester::NewL();
       
    78 
       
    79     return iPlaylistUtilityTester->CreatePlaylistUtilityL( aItem );
       
    80 }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 //   Cvideoplaylistutility_test::CreateGenericParametersL
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 TInt Cvideoplaylistutility_test::GetFileInfoL(CStifItemParser& aItem)
       
    87 {
       
    88     return iPlaylistUtilityTester->GetFileInfoL(aItem);
       
    89 }
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 //   Cvideoplaylistutility_test::OpenFileL
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 TInt Cvideoplaylistutility_test::GetLinkL( CStifItemParser& aItem )
       
    96 {
       
    97     return iPlaylistUtilityTester->GetLinkL( aItem );
       
    98 }
       
    99 
       
   100 // -----------------------------------------------------------------------------
       
   101 //   Cvideoplaylistutility_test::SetDefaultAccessPointL
       
   102 // -----------------------------------------------------------------------------
       
   103 //
       
   104 TInt Cvideoplaylistutility_test::GetPlaylistL( CStifItemParser& aItem )
       
   105 {
       
   106     return iPlaylistUtilityTester->GetPlaylistL( aItem );
       
   107 }
       
   108 
       
   109 // -----------------------------------------------------------------------------
       
   110 //   Cvideoplaylistutility_test::SetDefaultAccessPointL
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 TInt Cvideoplaylistutility_test::IsSeekableL( CStifItemParser& aItem )
       
   114 {
       
   115     return iPlaylistUtilityTester->IsSeekableL( aItem );
       
   116 }
       
   117 
       
   118 //  [End of File] - Do not remove