omaprovisioning/provisioning/tsrc/ModuleTest/src/moduletestprovisioning.cpp
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2002 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 Module Test Automation Code for 
       
    15  *  Provisioning  
       
    16  *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 // INCLUDE FILES
       
    27 #include <Stiftestinterface.h>
       
    28 #include "moduletestprovisioning.h"
       
    29 
       
    30 // EXTERNAL DATA STRUCTURES
       
    31 //extern  ?external_data;
       
    32 
       
    33 // EXTERNAL FUNCTION PROTOTYPES  
       
    34 //extern ?external_function( ?arg_type,?arg_type );
       
    35 
       
    36 // CONSTANTS
       
    37 //const ?type ?constant_var = ?constant;
       
    38 
       
    39 // MACROS
       
    40 //#define ?macro ?macro_def
       
    41 
       
    42 // LOCAL CONSTANTS AND MACROS
       
    43 //const ?type ?constant_var = ?constant;
       
    44 //#define ?macro_name ?macro_def
       
    45 
       
    46 // MODULE DATA STRUCTURES
       
    47 //enum ?declaration
       
    48 //typedef ?declaration
       
    49 
       
    50 // LOCAL FUNCTION PROTOTYPES
       
    51 //?type ?function_name( ?arg_type, ?arg_type );
       
    52 
       
    53 // FORWARD DECLARATIONS
       
    54 //class ?FORWARD_CLASSNAME;
       
    55 
       
    56 // ============================= LOCAL FUNCTIONS ===============================
       
    57 
       
    58 // -----------------------------------------------------------------------------
       
    59 // ?function_name ?description.
       
    60 // ?description
       
    61 // Returns: ?value_1: ?description
       
    62 //          ?value_n: ?description_line1
       
    63 //                    ?description_line2
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 /*
       
    67  ?type ?function_name(
       
    68  ?arg_type arg,  // ?description
       
    69  ?arg_type arg)  // ?description
       
    70  {
       
    71 
       
    72  ?code  // ?comment
       
    73 
       
    74  // ?comment
       
    75  ?code
       
    76  }
       
    77  */
       
    78 
       
    79 // ============================ MEMBER FUNCTIONS ===============================
       
    80 
       
    81 // -----------------------------------------------------------------------------
       
    82 // Cmodulemoduletestengineapis::Cmodulemoduletestengineapis
       
    83 // C++ default constructor can NOT contain any code, that
       
    84 // might leave.
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 Cmoduletestprovisioning::Cmoduletestprovisioning(CTestModuleIf& aTestModuleIf) :
       
    88     CScriptBase(aTestModuleIf)
       
    89     {
       
    90     }
       
    91 
       
    92 // -----------------------------------------------------------------------------
       
    93 // Cmoduletestprovisioning::ConstructL
       
    94 // Symbian 2nd phase constructor can leave.
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 void Cmoduletestprovisioning::ConstructL()
       
    98     {
       
    99     iLog = CStifLogger::NewL(KmoduletestprovisioningLogPath,
       
   100             KmoduletestprovisioningLogFile, CStifLogger::ETxt,
       
   101             CStifLogger::EFile, EFalse);
       
   102     
       
   103     iProxies = new (ELeave) CDesC16ArrayFlat(1);
       
   104 
       
   105     }
       
   106 
       
   107 // -----------------------------------------------------------------------------
       
   108 // Cmoduletestprovisioning::NewL
       
   109 // Two-phased constructor.
       
   110 // -----------------------------------------------------------------------------
       
   111 //
       
   112 Cmoduletestprovisioning* Cmoduletestprovisioning::NewL(
       
   113         CTestModuleIf& aTestModuleIf)
       
   114     {
       
   115     Cmoduletestprovisioning* self = new (ELeave) Cmoduletestprovisioning( aTestModuleIf );
       
   116 
       
   117     CleanupStack::PushL(self);
       
   118     self->ConstructL();
       
   119     CleanupStack::Pop();
       
   120 
       
   121     return self;
       
   122 
       
   123     }
       
   124 
       
   125 // Destructor
       
   126 Cmoduletestprovisioning::~Cmoduletestprovisioning()
       
   127     {
       
   128 
       
   129     // Delete resources allocated from test methods
       
   130     Delete();
       
   131 
       
   132     // Delete logger
       
   133     delete iLog; 
       
   134     
       
   135     //delete iEngine
       
   136     if (iEngine)
       
   137         {
       
   138         delete iEngine;
       
   139         }
       
   140     
       
   141     //delete iObserver
       
   142     if (iObserver)
       
   143         {
       
   144         delete iObserver;
       
   145         }
       
   146     
       
   147     //delete iProxies
       
   148     delete iProxies;
       
   149     
       
   150     }
       
   151 
       
   152 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   153 
       
   154 // -----------------------------------------------------------------------------
       
   155 // LibEntryL is a polymorphic Dll entry point.
       
   156 // Returns: CScriptBase: New CScriptBase derived object
       
   157 // -----------------------------------------------------------------------------
       
   158 //
       
   159 EXPORT_C CScriptBase* LibEntryL(
       
   160         CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
   161 
       
   162     {
       
   163 
       
   164     return ( CScriptBase* ) Cmoduletestprovisioning::NewL( aTestModuleIf );
       
   165 
       
   166     }
       
   167 
       
   168 // -----------------------------------------------------------------------------
       
   169 // CWPContextObserver::CWPContextObserver
       
   170 // Default constructor.
       
   171 // -----------------------------------------------------------------------------
       
   172 //
       
   173 CWPContextObserver::CWPContextObserver()
       
   174     {
       
   175 
       
   176     }
       
   177 
       
   178 // -----------------------------------------------------------------------------
       
   179 // CWPContextObserver::ConstructL
       
   180 // Two-phased constructor.
       
   181 // -----------------------------------------------------------------------------
       
   182 //
       
   183 void CWPContextObserver::ConstructL(TInt data)
       
   184     {
       
   185     this->data = data;
       
   186     }
       
   187 
       
   188 // -----------------------------------------------------------------------------
       
   189 // CWPContextObserver::NewL
       
   190 // Two-phased constructor.
       
   191 // -----------------------------------------------------------------------------
       
   192 //
       
   193 CWPContextObserver* CWPContextObserver::NewL(TInt data)
       
   194     {
       
   195     CWPContextObserver* self = new (ELeave) CWPContextObserver();
       
   196     CleanupStack::PushL(self);
       
   197     self->ConstructL(data);
       
   198     CleanupStack::Pop();
       
   199 
       
   200     return self;
       
   201 
       
   202     }
       
   203 
       
   204 // -----------------------------------------------------------------------------
       
   205 // CWPContextObserver::~CWPContextObserver
       
   206 // Dummy Destructor.
       
   207 // -----------------------------------------------------------------------------
       
   208 //
       
   209 CWPContextObserver::~CWPContextObserver()
       
   210     {
       
   211 
       
   212     }
       
   213 // -----------------------------------------------------------------------------
       
   214 // CWPContextObserver::ContextChangeL
       
   215 // Dummy Implementation of Pure virtual function.
       
   216 // -----------------------------------------------------------------------------
       
   217 //
       
   218 void CWPContextObserver::ContextChangeL(RDbNotifier::TEvent aEvent)
       
   219     {
       
   220     // Do nothing
       
   221     }
       
   222 //  End of File