engine/tsrc/t_podcatcherengine/src/T_PodcatcherEngine.cpp
author Brendan Donegan <brendand@symbian.org>
Fri, 09 Jul 2010 14:24:38 +0100
changeset 168 9d3b805af5ab
parent 142 5c9ea8d0ce24
permissions -rw-r--r--
Improvement to queue shifting function - move the highlight too.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
142
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     1
/*
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     8
*
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    11
*
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    12
* Contributors:
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    13
* 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    14
* Description: This file contains testclass implementation.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    15
*
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    16
*/
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    17
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    18
// INCLUDE FILES
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    19
#include <StifTestInterface.h>
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    20
#include "T_PodcatcherEngine.h"
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    21
#include <SettingServerClient.h>
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    22
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    23
// EXTERNAL DATA STRUCTURES
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    24
//extern  ?external_data;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    25
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    26
// EXTERNAL FUNCTION PROTOTYPES  
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    27
//extern ?external_function( ?arg_type,?arg_type );
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    28
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    29
// CONSTANTS
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    30
//const ?type ?constant_var = ?constant;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    31
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    32
// MACROS
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    33
//#define ?macro ?macro_def
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    34
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    35
// LOCAL CONSTANTS AND MACROS
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    36
//const ?type ?constant_var = ?constant;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    37
//#define ?macro_name ?macro_def
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    38
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    39
// MODULE DATA STRUCTURES
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    40
//enum ?declaration
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    41
//typedef ?declaration
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    42
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    43
// LOCAL FUNCTION PROTOTYPES
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    44
//?type ?function_name( ?arg_type, ?arg_type );
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    45
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    46
// FORWARD DECLARATIONS
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    47
//class ?FORWARD_CLASSNAME;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    48
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    49
// ============================= LOCAL FUNCTIONS ===============================
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    50
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    51
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    52
// ?function_name ?description.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    53
// ?description
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    54
// Returns: ?value_1: ?description
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    55
//          ?value_n: ?description_line1
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    56
//                    ?description_line2
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    57
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    58
//
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    59
/*
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    60
?type ?function_name(
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    61
    ?arg_type arg,  // ?description
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    62
    ?arg_type arg)  // ?description
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    63
    {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    64
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    65
    ?code  // ?comment
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    66
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    67
    // ?comment
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    68
    ?code
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    69
    }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    70
*/
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    71
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    72
// ============================ MEMBER FUNCTIONS ===============================
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    73
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    74
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    75
// CT_PodcatcherEngine::CT_PodcatcherEngine
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    76
// C++ default constructor can NOT contain any code, that
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    77
// might leave.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    78
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    79
//
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    80
CT_PodcatcherEngine::CT_PodcatcherEngine( 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    81
    CTestModuleIf& aTestModuleIf ):
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    82
        CScriptBase( aTestModuleIf )
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    83
    {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    84
    }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    85
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    86
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    87
// CT_PodcatcherEngine::ConstructL
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    88
// Symbian 2nd phase constructor can leave.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    89
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    90
//
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    91
void CT_PodcatcherEngine::ConstructL()
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    92
    {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    93
    //Read logger settings to check whether test case name is to be
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    94
    //appended to log file name.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    95
    RSettingServer settingServer;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    96
    TInt ret = settingServer.Connect();
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    97
    if(ret != KErrNone)
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    98
        {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
    99
        User::Leave(ret);
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   100
        }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   101
    // Struct to StifLogger settigs.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   102
    TLoggerSettings loggerSettings; 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   103
    // Parse StifLogger defaults from STIF initialization file.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   104
    ret = settingServer.GetLoggerSettings(loggerSettings);
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   105
    if(ret != KErrNone)
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   106
        {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   107
        User::Leave(ret);
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   108
        } 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   109
    // Close Setting server session
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   110
    settingServer.Close();
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   111
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   112
    TFileName logFileName;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   113
    
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   114
    if(loggerSettings.iAddTestCaseTitle)
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   115
        {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   116
        TName title;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   117
        TestModuleIf().GetTestCaseTitleL(title);
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   118
        logFileName.Format(KT_PodcatcherEngineLogFileWithTitle, &title);
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   119
        }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   120
    else
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   121
        {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   122
        logFileName.Copy(KT_PodcatcherEngineLogFile);
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   123
        }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   124
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   125
    iLog = CStifLogger::NewL( KT_PodcatcherEngineLogPath, 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   126
                          logFileName,
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   127
                          CStifLogger::ETxt,
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   128
                          CStifLogger::EFile,
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   129
                          EFalse );
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   130
    
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   131
    SendTestClassVersion();
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   132
    }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   133
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   134
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   135
// CT_PodcatcherEngine::NewL
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   136
// Two-phased constructor.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   137
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   138
//
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   139
CT_PodcatcherEngine* CT_PodcatcherEngine::NewL( 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   140
    CTestModuleIf& aTestModuleIf )
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   141
    {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   142
    CT_PodcatcherEngine* self = new (ELeave) CT_PodcatcherEngine( aTestModuleIf );
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   143
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   144
    CleanupStack::PushL( self );
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   145
    self->ConstructL();
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   146
    CleanupStack::Pop();
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   147
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   148
    return self;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   149
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   150
    }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   151
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   152
// Destructor
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   153
CT_PodcatcherEngine::~CT_PodcatcherEngine()
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   154
    { 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   155
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   156
    // Delete resources allocated from test methods
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   157
    Delete();
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   158
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   159
    // Delete logger
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   160
    delete iLog; 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   161
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   162
    }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   163
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   164
//-----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   165
// CT_PodcatcherEngine::SendTestClassVersion
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   166
// Method used to send version of test class
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   167
//-----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   168
//
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   169
void CT_PodcatcherEngine::SendTestClassVersion()
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   170
	{
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   171
	TVersion moduleVersion;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   172
	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   173
	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   174
	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   175
	
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   176
	TFileName moduleName;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   177
	moduleName = _L("T_PodcatcherEngine.dll");
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   178
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   179
	TBool newVersionOfMethod = ETrue;
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   180
	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   181
	}
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   182
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   183
// ========================== OTHER EXPORTED FUNCTIONS =========================
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   184
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   185
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   186
// LibEntryL is a polymorphic Dll entry point.
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   187
// Returns: CScriptBase: New CScriptBase derived object
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   188
// -----------------------------------------------------------------------------
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   189
//
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   190
EXPORT_C CScriptBase* LibEntryL( 
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   191
    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   192
    {
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   193
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   194
    return ( CScriptBase* ) CT_PodcatcherEngine::NewL( aTestModuleIf );
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   195
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   196
    }
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   197
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   198
5c9ea8d0ce24 Start the Podcatcher Engine integration test suite
Brendan Donegan <brendand@symbian.org>
parents:
diff changeset
   199
//  End of File