mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripter.cpp
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2002-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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <StifTestInterface.h>
       
    21 #include "HarvesterClientTestScripter.h"
       
    22 
       
    23 // EXTERNAL DATA STRUCTURES
       
    24 
       
    25 // EXTERNAL FUNCTION PROTOTYPES  
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // LOCAL CONSTANTS AND MACROS
       
    32 
       
    33 // MODULE DATA STRUCTURES
       
    34 
       
    35 // LOCAL FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 // ============================= LOCAL FUNCTIONS ===============================
       
    40 
       
    41 // ============================ MEMBER FUNCTIONS ===============================
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CHarvesterClientTestScripter::CHarvesterClientTestScripter
       
    45 // C++ default constructor can NOT contain any code, that
       
    46 // might leave.
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 CHarvesterClientTestScripter::CHarvesterClientTestScripter( 
       
    50     CTestModuleIf& aTestModuleIf ):
       
    51         CScriptBase( aTestModuleIf )
       
    52     {
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CHarvesterClientTestScripter::ConstructL
       
    57 // Symbian 2nd phase constructor can leave.
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 void CHarvesterClientTestScripter::ConstructL()
       
    61     {
       
    62     iLog = CStifLogger::NewL( KHarvesterClientTestScripterLogPath, 
       
    63                           KHarvesterClientTestScripterLogFile,
       
    64                           CStifLogger::ETxt,
       
    65                           CStifLogger::EFile,
       
    66                           EFalse );
       
    67 
       
    68     }
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // CHarvesterClientTestScripter::NewL
       
    72 // Two-phased constructor.
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 CHarvesterClientTestScripter* CHarvesterClientTestScripter::NewL( 
       
    76     CTestModuleIf& aTestModuleIf )
       
    77     {
       
    78     CHarvesterClientTestScripter* self = new (ELeave) CHarvesterClientTestScripter( aTestModuleIf );
       
    79 
       
    80     CleanupStack::PushL( self );
       
    81     self->ConstructL();
       
    82     CleanupStack::Pop( self );
       
    83 
       
    84     return self;
       
    85 
       
    86     }
       
    87 
       
    88 // Destructor
       
    89 CHarvesterClientTestScripter::~CHarvesterClientTestScripter()
       
    90     { 
       
    91 
       
    92     // Delete resources allocated from test methods
       
    93     Delete();
       
    94 
       
    95     // Delete logger
       
    96     delete iLog; 
       
    97 
       
    98     }
       
    99 
       
   100 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   101 
       
   102 // -----------------------------------------------------------------------------
       
   103 // LibEntryL is a polymorphic Dll entry point.
       
   104 // Returns: CScriptBase: New CScriptBase derived object
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 EXPORT_C CScriptBase* LibEntryL( 
       
   108     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
   109     {
       
   110 
       
   111     return ( CScriptBase* ) CHarvesterClientTestScripter::NewL( aTestModuleIf );
       
   112 
       
   113     }
       
   114 
       
   115 
       
   116 //  End of File