omadm/omadmextensions/adapters/email/tsrc/src/emailtest.cpp
changeset 18 7d11f9a6646f
parent 4 75a71fdb4c92
child 21 c707676bf59f
equal deleted inserted replaced
4:75a71fdb4c92 18:7d11f9a6646f
     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:  Implementation of DM adapter test component
       
    15 * 	This is part of omadmextensions/adapter test application.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 // INCLUDE FILES
       
    25 #include <Stiftestinterface.h>
       
    26 #include "emailTest.h"
       
    27 #include <stiflogger.h>
       
    28 
       
    29 
       
    30 // ============================ MEMBER FUNCTIONS ===============================
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CemailTest::CemailTest
       
    34 // C++ default constructor can NOT contain any code, that
       
    35 // might leave.
       
    36 // -----------------------------------------------------------------------------
       
    37 //
       
    38 /*CemailTest::CemailTest( 
       
    39     CTestModuleIf& aTestModuleIf ):
       
    40         CScriptBase( aTestModuleIf )
       
    41     {
       
    42     }*/
       
    43 CemailTest::CemailTest( CTestModuleIf& aTestModuleIf )
       
    44 		: Cdmatest( aTestModuleIf, KAdapterUid )
       
    45     {
       
    46     }
       
    47 // -----------------------------------------------------------------------------
       
    48 // CemailTest::ConstructL
       
    49 // Symbian 2nd phase constructor can leave.
       
    50 // -----------------------------------------------------------------------------
       
    51 //
       
    52 void CemailTest::ConstructL()
       
    53     {
       
    54 /*    iLog = CStifLogger::NewL( KamtestLogPath, 
       
    55                           KamtestLogFile,
       
    56                           CStifLogger::ETxt,
       
    57                           CStifLogger::EFile,
       
    58                           EFalse );*///Commented the Part for emailTest Dipak
       
    59     iLog = CStifLogger::NewL( KamtestLogPath, 
       
    60                           KamtestLogFile,
       
    61                           CStifLogger::ETxt,
       
    62                           CStifLogger::EFile );
       
    63                           
       
    64     iLog->Log( _L( "Loading Adapter" ) );
       
    65     
       
    66 	Cdmatest::ConstructL();                         	
       
    67 
       
    68     }
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // CemailTest::NewL
       
    72 // Two-phased constructor.
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 CemailTest* CemailTest::NewL( 
       
    76     CTestModuleIf& aTestModuleIf )
       
    77     {
       
    78     CemailTest* self = new (ELeave) CemailTest( aTestModuleIf );
       
    79     
       
    80     CleanupStack::PushL( self );
       
    81     self->ConstructL();
       
    82     CleanupStack::Pop();
       
    83 
       
    84     return self;
       
    85     
       
    86     }
       
    87     
       
    88 // Destructor
       
    89 CemailTest::~CemailTest()
       
    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* ) CemailTest::NewL( aTestModuleIf );
       
   112         
       
   113     }
       
   114 
       
   115 
       
   116     
       
   117 //  End of File