sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. sl@0: sl@0: * Redistribution and use in source and binary forms, with or without sl@0: * modification, are permitted provided that the following conditions are met: sl@0: sl@0: * Redistributions of source code must retain the above copyright notice, this sl@0: * list of conditions and the following disclaimer. sl@0: * Redistributions in binary form must reproduce the above copyright notice, sl@0: * this list of conditions and the following disclaimer in the documentation sl@0: * and/or other materials provided with the distribution. sl@0: * Neither the name of Nokia Corporation nor the names of its contributors sl@0: * may be used to endorse or promote products derived from this software sl@0: * without specific prior written permission. sl@0: sl@0: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" sl@0: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE sl@0: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE sl@0: * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE sl@0: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL sl@0: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR sl@0: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER sl@0: * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, sl@0: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE sl@0: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. sl@0: * sl@0: * Description: ?Description sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: // INCLUDE FILES sl@0: #include sl@0: #include "crypto_test.h" sl@0: sl@0: // EXTERNAL DATA STRUCTURES sl@0: //extern ?external_data; sl@0: sl@0: // EXTERNAL FUNCTION PROTOTYPES sl@0: //extern ?external_function( ?arg_type,?arg_type ); sl@0: sl@0: // CONSTANTS sl@0: //const ?type ?constant_var = ?constant; sl@0: sl@0: // MACROS sl@0: //#define ?macro ?macro_def sl@0: sl@0: // LOCAL CONSTANTS AND MACROS sl@0: //const ?type ?constant_var = ?constant; sl@0: //#define ?macro_name ?macro_def sl@0: sl@0: // MODULE DATA STRUCTURES sl@0: //enum ?declaration sl@0: //typedef ?declaration sl@0: sl@0: // LOCAL FUNCTION PROTOTYPES sl@0: //?type ?function_name( ?arg_type, ?arg_type ); sl@0: sl@0: // FORWARD DECLARATIONS sl@0: //class ?FORWARD_CLASSNAME; sl@0: sl@0: // ============================= LOCAL FUNCTIONS =============================== sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // ?function_name ?description. sl@0: // ?description sl@0: // Returns: ?value_1: ?description sl@0: // ?value_n: ?description_line1 sl@0: // ?description_line2 sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: /* sl@0: ?type ?function_name( sl@0: ?arg_type arg, // ?description sl@0: ?arg_type arg) // ?description sl@0: { sl@0: sl@0: ?code // ?comment sl@0: sl@0: // ?comment sl@0: ?code sl@0: } sl@0: */ sl@0: sl@0: // ============================ MEMBER FUNCTIONS =============================== sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // Ccrypto_test::Ccrypto_test sl@0: // C++ default constructor can NOT contain any code, that sl@0: // might leave. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: Ccrypto_test::Ccrypto_test( sl@0: CTestModuleIf& aTestModuleIf ): sl@0: CScriptBase( aTestModuleIf ) sl@0: { sl@0: } sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // Ccrypto_test::ConstructL sl@0: // Symbian 2nd phase constructor can leave. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: void Ccrypto_test::ConstructL() sl@0: { sl@0: iLog = CStifLogger::NewL( Kcrypto_testLogPath, sl@0: Kcrypto_testLogFile, sl@0: CStifLogger::ETxt, sl@0: CStifLogger::EFile, sl@0: EFalse ); sl@0: sl@0: } sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // Ccrypto_test::NewL sl@0: // Two-phased constructor. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: Ccrypto_test* Ccrypto_test::NewL( sl@0: CTestModuleIf& aTestModuleIf ) sl@0: { sl@0: Ccrypto_test* self = new (ELeave) Ccrypto_test( aTestModuleIf ); sl@0: sl@0: CleanupStack::PushL( self ); sl@0: self->ConstructL(); sl@0: CleanupStack::Pop(); sl@0: sl@0: return self; sl@0: sl@0: } sl@0: sl@0: // Destructor sl@0: Ccrypto_test::~Ccrypto_test() sl@0: { sl@0: sl@0: // Delete resources allocated from test methods sl@0: Delete(); sl@0: sl@0: // Delete logger sl@0: delete iLog; sl@0: sl@0: } sl@0: sl@0: // ========================== OTHER EXPORTED FUNCTIONS ========================= sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // LibEntryL is a polymorphic Dll entry point. sl@0: // Returns: CScriptBase: New CScriptBase derived object sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C CScriptBase* LibEntryL( sl@0: CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework sl@0: { sl@0: sl@0: return ( CScriptBase* ) Ccrypto_test::NewL( aTestModuleIf ); sl@0: sl@0: } sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // E32Dll is a DLL entry point function. sl@0: // Returns: KErrNone sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: #ifndef EKA2 // Hide Dll entry point to EKA2 sl@0: GLDEF_C TInt E32Dll( sl@0: TDllReason /*aReason*/) // Reason code sl@0: { sl@0: return(KErrNone); sl@0: sl@0: } sl@0: #endif // EKA2 sl@0: sl@0: // End of File