sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "tsu_3gplibrary.h" sl@0: #include "tsu3gplibraryapi.h" sl@0: #include "tsu3gplibraryapinegative.h" sl@0: #include "tsu_3gplibrary_composer_api.h" sl@0: #include "tsu_3gplibrary_parse_compose.h" sl@0: #include "tsu_3gplibrary_parse_and_check.h" sl@0: sl@0: _LIT(KServerName, "tsu_3gplibrary"); sl@0: sl@0: C3GPLibraryServer* C3GPLibraryServer::NewL() sl@0: { sl@0: C3GPLibraryServer* server = new (ELeave) C3GPLibraryServer(); sl@0: CleanupStack::PushL(server); sl@0: server-> ConstructL(KServerName); sl@0: CleanupStack::Pop(server); sl@0: return server; sl@0: } sl@0: sl@0: LOCAL_C void MainL() sl@0: { sl@0: // Leave the hooks in for platform security sl@0: #if (defined __DATA_CAGING__) sl@0: RProcess().DataCaging(RProcess::EDataCagingOn); sl@0: RProcess().SecureApi(RProcess::ESecureApiOn); sl@0: #endif sl@0: CActiveScheduler* sched = NULL; sl@0: sched = new(ELeave)CActiveScheduler; sl@0: CActiveScheduler::Install(sched); sl@0: C3GPLibraryServer* server = NULL; sl@0: // Create the C3GPLibraryServer derived server sl@0: TRAPD(err,server = C3GPLibraryServer::NewL()); sl@0: if(!err) sl@0: { sl@0: RProcess::Rendezvous(KErrNone); sl@0: sched->Start(); sl@0: } sl@0: delete server; sl@0: delete sched; sl@0: } sl@0: sl@0: GLDEF_C TInt E32Main() sl@0: /** sl@0: * @return - Standard Epoc error code on exit sl@0: */ sl@0: { sl@0: CTrapCleanup* cleanup = CTrapCleanup::New(); sl@0: if(cleanup == NULL) sl@0: { sl@0: return KErrNoMemory; sl@0: } sl@0: TRAP_IGNORE(MainL()); sl@0: delete cleanup; sl@0: return KErrNone; sl@0: } sl@0: sl@0: CTestStep* C3GPLibraryServer::CreateTestStep(const TDesC& aStepName) sl@0: /** sl@0: * @return - A CTestStep derived instance sl@0: * Implementation of CTestServer pure virtual sl@0: */ sl@0: { sl@0: CTestStep* testStep = NULL; sl@0: sl@0: // C++ wrapper parser API tests sl@0: if(aStepName == KTestCase_0001) sl@0: { sl@0: testStep = new C3GPLibParser_0001(); sl@0: } sl@0: else if(aStepName == KTestCase_0002) sl@0: { sl@0: testStep = new C3GPLibParser_0002(); sl@0: } sl@0: else if(aStepName == KTestCase_0003) sl@0: { sl@0: testStep = new C3GPLibParser_0003(); sl@0: } sl@0: else if(aStepName == KTestCase_0004) sl@0: { sl@0: testStep = new C3GPLibParser_0004(); sl@0: } sl@0: else if(aStepName == KTestCase_0005) sl@0: { sl@0: testStep = new C3GPLibParser_0005(); sl@0: } sl@0: else if(aStepName == KTestCase_0006) sl@0: { sl@0: testStep = new C3GPLibParser_0006(); sl@0: } sl@0: else if(aStepName == KTestCase_0007) sl@0: { sl@0: testStep = new C3GPLibParser_0007(); sl@0: } sl@0: else if(aStepName == KTestCase_0008) sl@0: { sl@0: testStep = new C3GPLibParser_0008(); sl@0: } sl@0: else if(aStepName == KTestCase_0011) sl@0: { sl@0: testStep = new C3GPLibParser_0011(); sl@0: } sl@0: else if(aStepName == KTestCase_0014) sl@0: { sl@0: testStep = new C3GPLibParser_0014(); sl@0: } sl@0: else if(aStepName == KTestCase_0015) sl@0: { sl@0: testStep = new C3GPLibParser_0015(); sl@0: } sl@0: else if(aStepName == KTestCase_0016) sl@0: { sl@0: testStep = new C3GPLibParser_0016(); sl@0: } sl@0: else if(aStepName == KTestCase_0017) sl@0: { sl@0: testStep = new C3GPLibParser_0017(); sl@0: } sl@0: else if(aStepName == KTestCase_0021) sl@0: { sl@0: testStep = new C3GPLibParser_0021(); sl@0: } sl@0: else if(aStepName == KTestCase_0023) sl@0: { sl@0: testStep = new C3GPLibParser_0023(); sl@0: } sl@0: else if(aStepName == KTestCase_0027) sl@0: { sl@0: testStep = new C3GPLibParser_0027(); sl@0: } sl@0: else if(aStepName == KTestCase_0031) sl@0: { sl@0: testStep = new C3GPLibParser_0031(); sl@0: } sl@0: else if(aStepName == KTestCase_0032) sl@0: { sl@0: testStep = new C3GPLibParser_0032(); sl@0: } sl@0: else if(aStepName == KTestCase_0033) sl@0: { sl@0: testStep = new C3GPLibParser_0033(); sl@0: } sl@0: else if(aStepName == KTestCase_0034) sl@0: { sl@0: testStep = new C3GPLibParser_0034(); sl@0: } sl@0: else if(aStepName == KTestCase_0035) sl@0: { sl@0: testStep = new C3GPLibParser_0035(); sl@0: } sl@0: else if(aStepName == KTestCase_0036) sl@0: { sl@0: testStep = new C3GPLibParser_0036(); sl@0: } sl@0: else if(aStepName == KTestCase_0037) sl@0: { sl@0: testStep = new C3GPLibParser_0037(); sl@0: } sl@0: else if(aStepName == KTestCase_0038) sl@0: { sl@0: testStep = new C3GPLibParser_0038(); sl@0: } sl@0: else if(aStepName == KTestCase_0039) sl@0: { sl@0: testStep = new C3GPLibParser_0039(); sl@0: } sl@0: else if(aStepName == KTestCase_0041) sl@0: { sl@0: testStep = new C3GPLibParser_0041(); sl@0: } sl@0: else if(aStepName == KTestCase_0043) sl@0: { sl@0: testStep = new C3GPLibParser_0043(); sl@0: } sl@0: else if(aStepName == KTestCase_0045) sl@0: { sl@0: testStep = new C3GPLibParser_0045(); sl@0: } sl@0: else if(aStepName == KTestCase_0047) sl@0: { sl@0: testStep = new C3GPLibParser_0047(); sl@0: } sl@0: else if(aStepName == KTestCase_0101) sl@0: { sl@0: testStep = new C3GPLibParser_0101(); sl@0: } sl@0: else if(aStepName == KTestCase_0102) sl@0: { sl@0: testStep = new C3GPLibParser_0102(); sl@0: } sl@0: else if(aStepName == KTestCase_0104) sl@0: { sl@0: testStep = new C3GPLibParser_0104(); sl@0: } sl@0: else if(aStepName == KTestCase_0106) sl@0: { sl@0: testStep = new C3GPLibParser_0106(); sl@0: } sl@0: else if(aStepName == KTestCase_0107) sl@0: { sl@0: testStep = new C3GPLibParser_0107(); sl@0: } sl@0: else if(aStepName == KTestCase_0108) sl@0: { sl@0: testStep = new C3GPLibParser_0108(); sl@0: } sl@0: else if(aStepName == KTestCase_0109) sl@0: { sl@0: testStep = new C3GPLibParser_0109(); sl@0: } sl@0: else if(aStepName == KTestCase_0110) sl@0: { sl@0: testStep = new C3GPLibParser_0110(); sl@0: } sl@0: else if(aStepName == KTestCase_0111) sl@0: { sl@0: testStep = new C3GPLibParser_0111(); sl@0: } sl@0: else if(aStepName == KTestCase_0119) sl@0: { sl@0: testStep = new C3GPLibParser_0119(); sl@0: } sl@0: else if(aStepName == KTestCase_0120) sl@0: { sl@0: testStep = new C3GPLibParser_0120(); sl@0: } sl@0: else if(aStepName == KTestCase_0126) sl@0: { sl@0: testStep = new C3GPLibParser_0126(); sl@0: } sl@0: else if(aStepName == KTestCase_0127) sl@0: { sl@0: testStep = new C3GPLibParser_0127(); sl@0: } sl@0: else if(aStepName == KTestCase_0130) sl@0: { sl@0: testStep = new C3GPLibParser_0130(); sl@0: } sl@0: else if(aStepName == KTestCase_0131) sl@0: { sl@0: testStep = new C3GPLibParser_0131(); sl@0: } sl@0: else if(aStepName == KTestCase_0135) sl@0: { sl@0: testStep = new C3GPLibParser_0135(); sl@0: } sl@0: else if(aStepName == KTestCase_0136) sl@0: { sl@0: testStep = new C3GPLibParser_0136(); sl@0: } sl@0: else if(aStepName == KTestCase_0137) sl@0: { sl@0: testStep = new C3GPLibParser_0137(); sl@0: } sl@0: else if(aStepName == KTestCase_0138) sl@0: { sl@0: testStep = new C3GPLibParser_0138(); sl@0: } sl@0: else if(aStepName == KTestCase_0139) sl@0: { sl@0: testStep = new C3GPLibParser_0139(); sl@0: } sl@0: else if (aStepName == K3GPSingleDataSourceTest) sl@0: { sl@0: testStep = new C3GPSingleDataSourceTest(); sl@0: } sl@0: else if (aStepName == KTestUserDataAtomRetrieval) sl@0: { sl@0: testStep = new C3GPUserDataAtomRetrieval(); sl@0: } sl@0: sl@0: // Composer: API Tests sl@0: else if (aStepName == K3GPComposeFilename) sl@0: { sl@0: testStep = new C3GPLibComposeFilename(); sl@0: } sl@0: else if(aStepName == K3GPComposeWithoutOpen) sl@0: { sl@0: testStep = new C3GPLibComposeWithoutOpen(); sl@0: } sl@0: else if(aStepName == K3GPComposeFileWithFileFormatCheck) sl@0: { sl@0: testStep = new C3GPLibComposeFileWithFileFormatCheck(); sl@0: } sl@0: else if (aStepName == K3GPComposeFrameDependency) sl@0: { sl@0: testStep = new C3GPLibComposeFrameDependency(); sl@0: } sl@0: else if (aStepName == K3GPComposeVideoProperties) sl@0: { sl@0: testStep = new C3GPLibComposeVideoProperties(); sl@0: } sl@0: else if (aStepName == K3GPComposeWithSpecificBufferSize) sl@0: { sl@0: testStep = new C3GPLibComposeWithSpecificBufferSize(); sl@0: } sl@0: else if (aStepName == K3GPComposeUserData) sl@0: { sl@0: testStep = new C3GPLibComposeUserData(); sl@0: } sl@0: else if (aStepName == K3GPComposeWithFlag) sl@0: { sl@0: testStep = new C3GPLibComposeWithFlag(); sl@0: } sl@0: else if (aStepName == K3GPComposeAudioProperties) sl@0: { sl@0: testStep = new C3GPLibComposeAudioProperties(); sl@0: } sl@0: else if (aStepName == K3GPComposeWithNoAudioVideo) sl@0: { sl@0: testStep = new C3GPLibComposeWithNoAudioVideo(); sl@0: } sl@0: else if (aStepName == K3GPComposeWithNoAudioVideo) sl@0: { sl@0: testStep = new C3GPLibComposeWithNoAudioVideo(); sl@0: } sl@0: else if (aStepName == K3GPComposeOpenAgain) sl@0: { sl@0: testStep = new C3GPLibComposeOpenAgain(); sl@0: } sl@0: else if (aStepName == K3GPComposeAudioFrames) sl@0: { sl@0: testStep = new C3GPLibComposeAudioFrames(); sl@0: } sl@0: else if (aStepName == K3GPComposeVideoFrame) sl@0: { sl@0: testStep = new C3GPLibComposeVideoFrame(); sl@0: } sl@0: else if (aStepName == K3GPComposeOpenReadOnlyFile) sl@0: { sl@0: testStep = new C3GPLibComposeOpenReadOnlyFile(); sl@0: } sl@0: else if (aStepName == K3GPComposeOpenedFile) sl@0: { sl@0: testStep = new C3GPLibComposeOpenedFile(); sl@0: } sl@0: else if (aStepName == K3GPComposeMultiComposeOnSameFile) sl@0: { sl@0: testStep = new C3GPLibComposeMultiComposeOnSameFile(); sl@0: } sl@0: else if (aStepName == K3GPComposeMultiComposers) sl@0: { sl@0: testStep = new C3GPLibComposeMultiComposers(); sl@0: } sl@0: else if (aStepName == K3GPComposeCloseComposerWithoutComplete) sl@0: { sl@0: testStep = new C3GPLibComposeCloseComposerWithoutComplete(); sl@0: } sl@0: else if (aStepName == K3GPComposePanic) sl@0: { sl@0: testStep = new C3GPLibComposePanic(); sl@0: } sl@0: else if (aStepName == K3GPComposeLargeFile) sl@0: { sl@0: testStep = new C3GPLibComposeLargeFile(); sl@0: } sl@0: else if (aStepName == K3GPComposeLargeFileUserData) sl@0: { sl@0: testStep = new C3GPLibComposeLargeFileUserData(); sl@0: } sl@0: else if (aStepName == K3GPComposeLargeFile32bitAPI) sl@0: { sl@0: testStep = new C3GPLibComposeLargeFile32bitAPI(); sl@0: } sl@0: else if (aStepName == K3GPComposeLargeFileDiskFull) sl@0: { sl@0: testStep = new C3GPLibComposeLargeFileDiskFull(); sl@0: } sl@0: // Composer: file format test sl@0: else if (aStepName == K3GPParseComposeFile) sl@0: { sl@0: testStep = new C3GPLibParseComposeFile(); sl@0: } sl@0: // AVC profile test sl@0: else if (aStepName == K3GPComposeFileWithAvcProfileCheck) sl@0: { sl@0: testStep = new C3GPLibComposeFileWithAvcProfileCheck(); sl@0: } sl@0: // Main & High profile parse sl@0: else if (aStepName == K3GPLibParseAndCheckTypes) sl@0: { sl@0: testStep = new C3GPLibParseAndCheckTypes(); sl@0: } sl@0: sl@0: return testStep; sl@0: }