omadmadapters/syncmldm12/tsrc/src/syncmldm12test.cpp
author hgs
Tue, 13 Jul 2010 03:48:30 +0530
changeset 45 0f9fc722d255
parent 44 deviceupdatesui/omadmadapters/syncmldm12/tsrc/src/syncmldm12test.cpp@137912d1a556
permissions -rw-r--r--
201021_01
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     1
/*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     2
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     3
* All rights reserved.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     8
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     9
* Initial Contributors:
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    11
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    12
* Contributors:
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    13
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    14
* Description:  Implementation of DM adapter test component
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    15
* 	This is part of omadmextensions/adapter test application.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    16
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    17
*/
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    18
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    19
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    20
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    21
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    22
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    23
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    24
// INCLUDE FILES
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    25
#include <Stiftestinterface.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    26
#include "syncmldm12Test.h"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    27
#include <stiflogger.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    28
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    29
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    30
// ============================ MEMBER FUNCTIONS ===============================
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    31
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    32
// -----------------------------------------------------------------------------
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    33
// Csyncmldm12Test::Csyncmldm12Test
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    34
// C++ default constructor can NOT contain any code, that
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    35
// might leave.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    36
// -----------------------------------------------------------------------------
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    37
//
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    38
/*Csyncmldm12Test::Csyncmldm12Test( 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    39
    CTestModuleIf& aTestModuleIf ):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    40
        CScriptBase( aTestModuleIf )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    41
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    42
    }*/
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    43
Csyncmldm12Test::Csyncmldm12Test( CTestModuleIf& aTestModuleIf )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    44
		: Cdmatest( aTestModuleIf, KAdapterUid )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    45
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    46
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    47
// -----------------------------------------------------------------------------
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    48
// Csyncmldm12Test::ConstructL
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    49
// Symbian 2nd phase constructor can leave.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    50
// -----------------------------------------------------------------------------
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    51
//
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    52
void Csyncmldm12Test::ConstructL()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    53
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    54
/*    iLog = CStifLogger::NewL( KamtestLogPath, 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    55
                          KamtestLogFile,
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    56
                          CStifLogger::ETxt,
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    57
                          CStifLogger::EFile,
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    58
                          EFalse );*///Commented the Part for syncmldm12Test Dipak
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    59
    iLog = CStifLogger::NewL( KamtestLogPath, 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    60
                          KamtestLogFile,
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    61
                          CStifLogger::ETxt,
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    62
                          CStifLogger::EFile );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    63
                          
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    64
    iLog->Log( _L( "Loading Adapter" ) );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    65
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    66
	Cdmatest::ConstructL();                         	
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    67
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    68
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    69
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    70
// -----------------------------------------------------------------------------
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    71
// Csyncmldm12Test::NewL
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    72
// Two-phased constructor.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    73
// -----------------------------------------------------------------------------
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    74
//
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    75
Csyncmldm12Test* Csyncmldm12Test::NewL( 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    76
    CTestModuleIf& aTestModuleIf )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    77
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    78
    Csyncmldm12Test* self = new (ELeave) Csyncmldm12Test( aTestModuleIf );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    79
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    80
    CleanupStack::PushL( self );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    81
    self->ConstructL();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    82
    CleanupStack::Pop();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    83
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    84
    return self;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    85
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    86
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    87
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    88
// Destructor
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    89
Csyncmldm12Test::~Csyncmldm12Test()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    90
    { 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    91
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    92
    // Delete resources allocated from test methods
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    93
//    Delete();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    94
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    95
    // Delete logger
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    96
//    delete iLog;  
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    97
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    98
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    99
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   100
// ========================== OTHER EXPORTED FUNCTIONS =========================
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   101
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   102
// -----------------------------------------------------------------------------
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   103
// LibEntryL is a polymorphic Dll entry point.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   104
// Returns: CScriptBase: New CScriptBase derived object
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   105
// -----------------------------------------------------------------------------
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   106
//
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   107
EXPORT_C CScriptBase* LibEntryL( 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   108
    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   109
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   110
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   111
    return ( CScriptBase* ) Csyncmldm12Test::NewL( aTestModuleIf );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   112
        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   113
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   114
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   115
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   116
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   117
//  End of File