serviceproviders/sapi_applicationmanager/tsrc/dev/tappmanprovidernegativetest/src/tprovidertest.cpp
changeset 19 989d2f495d90
child 33 50974a8b132e
equal deleted inserted replaced
14:a36b1e19a461 19: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 <gmxmlparser.h>
       
    23 #include <gmxmlnode.h>
       
    24 #include "tprovidertest.h"
       
    25 using namespace LIW;
       
    26 
       
    27 // EXTERNAL DATA STRUCTURES
       
    28 //extern  ?external_data;
       
    29 
       
    30 // EXTERNAL FUNCTION PROTOTYPES  
       
    31 //extern ?external_function( ?arg_type,?arg_type );
       
    32 
       
    33 // CONSTANTS
       
    34 //const ?type ?constant_var = ?constant;
       
    35 
       
    36 // MACROS
       
    37 //#define ?macro ?macro_def
       
    38 
       
    39 // LOCAL CONSTANTS AND MACROS
       
    40 //const ?type ?constant_var = ?constant;
       
    41 //#define ?macro_name ?macro_def
       
    42 
       
    43 // MODULE DATA STRUCTURES
       
    44 //enum ?declaration
       
    45 //typedef ?declaration
       
    46 
       
    47 // LOCAL FUNCTION PROTOTYPES
       
    48 //?type ?function_name( ?arg_type, ?arg_type );
       
    49 
       
    50 // FORWARD DECLARATIONS
       
    51 //class ?FORWARD_CLASSNAME;
       
    52 
       
    53 // ============================= LOCAL FUNCTIONS ===============================
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // ?function_name ?description.
       
    57 // ?description
       
    58 // Returns: ?value_1: ?description
       
    59 //          ?value_n: ?description_line1
       
    60 //                    ?description_line2
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 /*
       
    64 ?type ?function_name(
       
    65     ?arg_type arg,  // ?description
       
    66     ?arg_type arg)  // ?description
       
    67     {
       
    68 
       
    69     ?code  // ?comment
       
    70 
       
    71     // ?comment
       
    72     ?code
       
    73     }
       
    74 */
       
    75 
       
    76 // ============================ MEMBER FUNCTIONS ===============================
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // Csapi_getlistapplication:Csapi_getlistapplication
       
    80 // C++ default constructor can NOT contain any code, that
       
    81 // might leave.
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 CProviderTest::CProviderTest( 
       
    85     CTestModuleIf& aTestModuleIf ):
       
    86         CScriptBase( aTestModuleIf )
       
    87     {
       
    88     }
       
    89 
       
    90 
       
    91 //TInt CProviderTest::iCount=1;
       
    92 // -----------------------------------------------------------------------------
       
    93 // CProviderTest:ConstructL
       
    94 // Symbian 2nd phase constructor can leave.
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 void CProviderTest::ConstructL()
       
    98     {
       
    99     iLog = CStifLogger::NewL( KappmanagertestLogPath, 
       
   100                            KappmanagertestLogFile,
       
   101                           CStifLogger::ETxt,
       
   102                           CStifLogger::EFile,
       
   103                           EFalse );
       
   104 
       
   105     }
       
   106 
       
   107 // -----------------------------------------------------------------------------
       
   108 // CProviderTest:NewL
       
   109 // Two-phased constructor.
       
   110 // -----------------------------------------------------------------------------
       
   111 //
       
   112 CProviderTest* CProviderTest::NewL( 
       
   113     CTestModuleIf& aTestModuleIf )
       
   114     {
       
   115  
       
   116  
       
   117     CProviderTest* self = new (ELeave) CProviderTest( aTestModuleIf );
       
   118 
       
   119     CleanupStack::PushL( self );
       
   120     self->ConstructL();
       
   121     CleanupStack::Pop();
       
   122 
       
   123     return self;
       
   124 
       
   125     }
       
   126 
       
   127 // Destructor
       
   128 CProviderTest::~CProviderTest()
       
   129     { 
       
   130  #ifdef LIBC_OLD_BACKEND
       
   131 	MrtClose();
       
   132 #endif
       
   133 
       
   134     // Delete resources allocated from test methods
       
   135     Delete();
       
   136 
       
   137     // Delete logger
       
   138     delete iLog; 
       
   139 
       
   140     }
       
   141 
       
   142 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   143 
       
   144 // -----------------------------------------------------------------------------
       
   145 // LibEntryL is a polymorphic Dll entry point.
       
   146 // Returns: CScriptBase: New CScriptBase derived object
       
   147 // -----------------------------------------------------------------------------
       
   148 //
       
   149 EXPORT_C CScriptBase* LibEntryL( 
       
   150     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
   151     {
       
   152 
       
   153     return ( CScriptBase* ) CProviderTest::NewL( aTestModuleIf );
       
   154 
       
   155     }
       
   156 
       
   157 // -----------------------------------------------------------------------------
       
   158 // E32Dll is a DLL entry point function.
       
   159 // Returns: KErrNone
       
   160 // -----------------------------------------------------------------------------
       
   161 //
       
   162 #ifndef EKA2 // Hide Dll entry point to EKA2
       
   163 GLDEF_C TInt E32Dll(
       
   164     TDllReason /*aReason*/) // Reason code
       
   165     {
       
   166     return(KErrNone);
       
   167 
       
   168     }
       
   169 #endif // EKA2
       
   170 
       
   171 //  End of File