engine/tsrc/t_podcatcherengine/src/T_PodcatcherEngineBlocks.cpp
changeset 104 5c9ea8d0ce24
child 105 62e266e8076f
equal deleted inserted replaced
102:ee650bbb958e 104:5c9ea8d0ce24
       
     1 /*
       
     2 * Copyright (c) 2009 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: This file contains testclass implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 // [INCLUDE FILES] - do not remove
       
    19 #include <e32svr.h>
       
    20 #include <StifParser.h>
       
    21 #include <StifTestInterface.h>
       
    22 #include "T_PodcatcherEngine.h"
       
    23 
       
    24 // EXTERNAL DATA STRUCTURES
       
    25 //extern  ?external_data;
       
    26 
       
    27 // EXTERNAL FUNCTION PROTOTYPES  
       
    28 //extern ?external_function( ?arg_type,?arg_type );
       
    29 
       
    30 // CONSTANTS
       
    31 //const ?type ?constant_var = ?constant;
       
    32 
       
    33 // MACROS
       
    34 //#define ?macro ?macro_def
       
    35 
       
    36 // LOCAL CONSTANTS AND MACROS
       
    37 //const ?type ?constant_var = ?constant;
       
    38 //#define ?macro_name ?macro_def
       
    39 
       
    40 // MODULE DATA STRUCTURES
       
    41 //enum ?declaration
       
    42 //typedef ?declaration
       
    43 
       
    44 // LOCAL FUNCTION PROTOTYPES
       
    45 //?type ?function_name( ?arg_type, ?arg_type );
       
    46 
       
    47 // FORWARD DECLARATIONS
       
    48 //class ?FORWARD_CLASSNAME;
       
    49 
       
    50 // ============================= LOCAL FUNCTIONS ===============================
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // ?function_name ?description.
       
    54 // ?description
       
    55 // Returns: ?value_1: ?description
       
    56 //          ?value_n: ?description_line1
       
    57 //                    ?description_line2
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 /*
       
    61 ?type ?function_name(
       
    62     ?arg_type arg,  // ?description
       
    63     ?arg_type arg)  // ?description
       
    64     {
       
    65 
       
    66     ?code  // ?comment
       
    67 
       
    68     // ?comment
       
    69     ?code
       
    70     }
       
    71 */
       
    72 
       
    73 // ============================ MEMBER FUNCTIONS ===============================
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // CT_PodcatcherEngine::Delete
       
    77 // Delete here all resources allocated and opened from test methods. 
       
    78 // Called from destructor. 
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 void CT_PodcatcherEngine::Delete() 
       
    82     {
       
    83 
       
    84     }
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // CT_PodcatcherEngine::RunMethodL
       
    88 // Run specified method. Contains also table of test mothods and their names.
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 TInt CT_PodcatcherEngine::RunMethodL( 
       
    92     CStifItemParser& aItem ) 
       
    93     {
       
    94 
       
    95     static TStifFunctionInfo const KFunctions[] =
       
    96         {  
       
    97         // Copy this line for every implemented function.
       
    98         // First string is the function name used in TestScripter script file.
       
    99         // Second is the actual implementation member function. 
       
   100         ENTRY( "AddFeed", CT_PodcatcherEngine::AddFeedL ),
       
   101         //ADD NEW ENTRY HERE
       
   102         // [test cases entries] - Do not remove
       
   103 
       
   104         };
       
   105 
       
   106     const TInt count = sizeof( KFunctions ) / 
       
   107                         sizeof( TStifFunctionInfo );
       
   108 
       
   109     return RunInternalL( KFunctions, count, aItem );
       
   110 
       
   111     }
       
   112 
       
   113 // -----------------------------------------------------------------------------
       
   114 // CT_PodcatcherEngine::AddFeedL
       
   115 // Test function which adds a feed to the list of feeds maintained by the Podcatcher.
       
   116 // (other items were commented in a header).
       
   117 // -----------------------------------------------------------------------------
       
   118 //
       
   119 TInt CT_PodcatcherEngine::AddFeedL( CStifItemParser& aItem )
       
   120     {
       
   121     // Print to UI
       
   122     _LIT( KT_PodcatcherEngine, "T_PodcatcherEngine" );
       
   123     _LIT( KAddFeed, "In AddFeed" );
       
   124     TestModuleIf().Printf( 0, KT_PodcatcherEngine, KAddFeed );
       
   125     // Print to log file
       
   126     iLog->Log( KAddFeed );
       
   127 
       
   128     TInt i = 0;
       
   129     TPtrC string;
       
   130     _LIT( KParam, "Param[%i]: %S" );
       
   131     while ( aItem.GetNextString ( string ) == KErrNone )
       
   132         {
       
   133         TestModuleIf().Printf( i, KT_PodcatcherEngine, 
       
   134                                 KParam, i, &string );
       
   135         i++;
       
   136         }
       
   137 
       
   138     return KErrNone;
       
   139 
       
   140     }
       
   141 
       
   142 // -----------------------------------------------------------------------------
       
   143 // CT_PodcatcherEngine::?member_function
       
   144 // ?implementation_description
       
   145 // (other items were commented in a header).
       
   146 // -----------------------------------------------------------------------------
       
   147 //
       
   148 /*
       
   149 TInt CT_PodcatcherEngine::?member_function(
       
   150    CItemParser& aItem )
       
   151    {
       
   152 
       
   153    ?code
       
   154 
       
   155    }
       
   156 */
       
   157 
       
   158 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   159 // None
       
   160 
       
   161 //  [End of File] - Do not remove