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