serviceproviders/sapi_applicationmanager/tsrc/dev/tappmanagerprovidertest/src/appmanagertest.cpp
changeset 5 989d2f495d90
child 23 50974a8b132e
equal deleted inserted replaced
1:a36b1e19a461 5:989d2f495d90
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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 the License "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 
       
    20 // INCLUDE FILES
       
    21 #include <Stiftestinterface.h>
       
    22 #include "appmanagertest.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 // Csapi_getlistapplication:Csapi_getlistapplication
       
    77 // C++ default constructor can NOT contain any code, that
       
    78 // might leave.
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 CAppManagerTest::CAppManagerTest( 
       
    82     CTestModuleIf& aTestModuleIf ):
       
    83         CScriptBase( aTestModuleIf )
       
    84     {
       
    85     }
       
    86 
       
    87 
       
    88 //TInt CAppManagerTest::iCount=1;
       
    89 // -----------------------------------------------------------------------------
       
    90 // CAppManagerTest:ConstructL
       
    91 // Symbian 2nd phase constructor can leave.
       
    92 // -----------------------------------------------------------------------------
       
    93 //
       
    94 void CAppManagerTest::ConstructL()
       
    95     {
       
    96     iLog = CStifLogger::NewL( KappmanagertestLogPath, 
       
    97                            KappmanagertestLogFile,
       
    98                           CStifLogger::ETxt,
       
    99                           CStifLogger::EFile,
       
   100                           EFalse );
       
   101 
       
   102     }
       
   103 
       
   104 // -----------------------------------------------------------------------------
       
   105 // CAppManagerTest:NewL
       
   106 // Two-phased constructor.
       
   107 // -----------------------------------------------------------------------------
       
   108 //
       
   109 CAppManagerTest* CAppManagerTest::NewL( 
       
   110     CTestModuleIf& aTestModuleIf )
       
   111     {
       
   112  
       
   113  
       
   114     CAppManagerTest* self = new (ELeave) CAppManagerTest( aTestModuleIf );
       
   115 
       
   116     CleanupStack::PushL( self );
       
   117     self->ConstructL();
       
   118     CleanupStack::Pop();
       
   119 
       
   120     return self;
       
   121 
       
   122     }
       
   123 
       
   124 // Destructor
       
   125 CAppManagerTest::~CAppManagerTest()
       
   126     { 
       
   127  #ifdef LIBC_OLD_BACKEND
       
   128 	MrtClose();
       
   129 #endif
       
   130 
       
   131     // Delete resources allocated from test methods
       
   132     Delete();
       
   133 
       
   134     // Delete logger
       
   135     delete iLog; 
       
   136 
       
   137     }
       
   138 
       
   139 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // LibEntryL is a polymorphic Dll entry point.
       
   143 // Returns: CScriptBase: New CScriptBase derived object
       
   144 // -----------------------------------------------------------------------------
       
   145 //
       
   146 EXPORT_C CScriptBase* LibEntryL( 
       
   147     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
   148     {
       
   149 
       
   150     return ( CScriptBase* ) CAppManagerTest::NewL( aTestModuleIf );
       
   151 
       
   152     }
       
   153 
       
   154 // -----------------------------------------------------------------------------
       
   155 // E32Dll is a DLL entry point function.
       
   156 // Returns: KErrNone
       
   157 // -----------------------------------------------------------------------------
       
   158 //
       
   159 #ifndef EKA2 // Hide Dll entry point to EKA2
       
   160 GLDEF_C TInt E32Dll(
       
   161     TDllReason /*aReason*/) // Reason code
       
   162     {
       
   163     return(KErrNone);
       
   164 
       
   165     }
       
   166 #endif // EKA2
       
   167 
       
   168 //  End of File