websrv_pub/web_service_connection_api/tsrc/senutilsTestCases/src/senutilsTestCases.cpp
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     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:        ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 // INCLUDE FILES
       
    27 #include <StifTestInterface.h>
       
    28 #include "senutilsTestCases.h"
       
    29 #include <SettingServerClient.h>
       
    30 
       
    31 // EXTERNAL DATA STRUCTURES
       
    32 //extern  ?external_data;
       
    33 
       
    34 // EXTERNAL FUNCTION PROTOTYPES  
       
    35 //extern ?external_function( ?arg_type,?arg_type );
       
    36 
       
    37 // CONSTANTS
       
    38 //const ?type ?constant_var = ?constant;
       
    39 
       
    40 // MACROS
       
    41 //#define ?macro ?macro_def
       
    42 
       
    43 // LOCAL CONSTANTS AND MACROS
       
    44 //const ?type ?constant_var = ?constant;
       
    45 //#define ?macro_name ?macro_def
       
    46 
       
    47 // MODULE DATA STRUCTURES
       
    48 //enum ?declaration
       
    49 //typedef ?declaration
       
    50 
       
    51 // LOCAL FUNCTION PROTOTYPES
       
    52 //?type ?function_name( ?arg_type, ?arg_type );
       
    53 
       
    54 // FORWARD DECLARATIONS
       
    55 //class ?FORWARD_CLASSNAME;
       
    56 
       
    57 // ============================= LOCAL FUNCTIONS ===============================
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // ?function_name ?description.
       
    61 // ?description
       
    62 // Returns: ?value_1: ?description
       
    63 //          ?value_n: ?description_line1
       
    64 //                    ?description_line2
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 /*
       
    68 ?type ?function_name(
       
    69     ?arg_type arg,  // ?description
       
    70     ?arg_type arg)  // ?description
       
    71     {
       
    72 
       
    73     ?code  // ?comment
       
    74 
       
    75     // ?comment
       
    76     ?code
       
    77     }
       
    78 */
       
    79 
       
    80 // ============================ MEMBER FUNCTIONS ===============================
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // CsenutilsTestCases::CsenutilsTestCases
       
    84 // C++ default constructor can NOT contain any code, that
       
    85 // might leave.
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 CsenutilsTestCases::CsenutilsTestCases( 
       
    89     CTestModuleIf& aTestModuleIf ):
       
    90         CScriptBase( aTestModuleIf )
       
    91     {
       
    92     }
       
    93 
       
    94 // -----------------------------------------------------------------------------
       
    95 // CsenutilsTestCases::ConstructL
       
    96 // Symbian 2nd phase constructor can leave.
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 void CsenutilsTestCases::ConstructL()
       
   100     {
       
   101 
       
   102     iLog = CStifLogger::NewL( KsenutilsTestCasesLogPath, 
       
   103                           KsenutilsTestCasesLogFile,
       
   104                           CStifLogger::ETxt,
       
   105                           CStifLogger::EFile,
       
   106                           EFalse );
       
   107 //    User::LeaveIfError(this->iFsSession.Connect());
       
   108     
       
   109     SendTestClassVersion();
       
   110     }
       
   111 
       
   112 // -----------------------------------------------------------------------------
       
   113 // CsenutilsTestCases::NewL
       
   114 // Two-phased constructor.
       
   115 // -----------------------------------------------------------------------------
       
   116 //
       
   117 CsenutilsTestCases* CsenutilsTestCases::NewL( 
       
   118     CTestModuleIf& aTestModuleIf )
       
   119     {
       
   120     CsenutilsTestCases* self = new (ELeave) CsenutilsTestCases( aTestModuleIf );
       
   121 
       
   122     CleanupStack::PushL( self );
       
   123     self->ConstructL();
       
   124     CleanupStack::Pop();
       
   125 
       
   126     return self;
       
   127 
       
   128     }
       
   129 
       
   130 // Destructor
       
   131 CsenutilsTestCases::~CsenutilsTestCases()
       
   132     { 
       
   133 
       
   134     // Delete resources allocated from test methods
       
   135     Delete();
       
   136 
       
   137     // Delete logger
       
   138     delete iLog; 
       
   139 
       
   140     }
       
   141 
       
   142 //-----------------------------------------------------------------------------
       
   143 // CsenutilsTestCases::SendTestClassVersion
       
   144 // Method used to send version of test class
       
   145 //-----------------------------------------------------------------------------
       
   146 //
       
   147 void CsenutilsTestCases::SendTestClassVersion()
       
   148 	{
       
   149 	TVersion moduleVersion;
       
   150 	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
       
   151 	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
       
   152 	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
       
   153 	
       
   154 	TFileName moduleName;
       
   155 	moduleName = _L("senutilsTestCases.dll");
       
   156 
       
   157 	TBool newVersionOfMethod = ETrue;
       
   158 	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
       
   159 	}
       
   160 
       
   161 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   162 
       
   163 // -----------------------------------------------------------------------------
       
   164 // LibEntryL is a polymorphic Dll entry point.
       
   165 // Returns: CScriptBase: New CScriptBase derived object
       
   166 // -----------------------------------------------------------------------------
       
   167 //
       
   168 EXPORT_C CScriptBase* LibEntryL( 
       
   169     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
   170     {
       
   171 
       
   172     return ( CScriptBase* ) CsenutilsTestCases::NewL( aTestModuleIf );
       
   173 
       
   174     }
       
   175 
       
   176 
       
   177 //  End of File