First public contribution.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "tsu_3gplibrary.h"
17 #include "tsu3gplibraryapi.h"
18 #include "tsu3gplibraryapinegative.h"
19 #include "tsu_3gplibrary_composer_api.h"
20 #include "tsu_3gplibrary_parse_compose.h"
21 #include "tsu_3gplibrary_parse_and_check.h"
23 _LIT(KServerName, "tsu_3gplibrary");
25 C3GPLibraryServer* C3GPLibraryServer::NewL()
27 C3GPLibraryServer* server = new (ELeave) C3GPLibraryServer();
28 CleanupStack::PushL(server);
29 server-> ConstructL(KServerName);
30 CleanupStack::Pop(server);
36 // Leave the hooks in for platform security
37 #if (defined __DATA_CAGING__)
38 RProcess().DataCaging(RProcess::EDataCagingOn);
39 RProcess().SecureApi(RProcess::ESecureApiOn);
41 CActiveScheduler* sched = NULL;
42 sched = new(ELeave)CActiveScheduler;
43 CActiveScheduler::Install(sched);
44 C3GPLibraryServer* server = NULL;
45 // Create the C3GPLibraryServer derived server
46 TRAPD(err,server = C3GPLibraryServer::NewL());
49 RProcess::Rendezvous(KErrNone);
56 GLDEF_C TInt E32Main()
58 * @return - Standard Epoc error code on exit
61 CTrapCleanup* cleanup = CTrapCleanup::New();
71 CTestStep* C3GPLibraryServer::CreateTestStep(const TDesC& aStepName)
73 * @return - A CTestStep derived instance
74 * Implementation of CTestServer pure virtual
77 CTestStep* testStep = NULL;
79 // C++ wrapper parser API tests
80 if(aStepName == KTestCase_0001)
82 testStep = new C3GPLibParser_0001();
84 else if(aStepName == KTestCase_0002)
86 testStep = new C3GPLibParser_0002();
88 else if(aStepName == KTestCase_0003)
90 testStep = new C3GPLibParser_0003();
92 else if(aStepName == KTestCase_0004)
94 testStep = new C3GPLibParser_0004();
96 else if(aStepName == KTestCase_0005)
98 testStep = new C3GPLibParser_0005();
100 else if(aStepName == KTestCase_0006)
102 testStep = new C3GPLibParser_0006();
104 else if(aStepName == KTestCase_0007)
106 testStep = new C3GPLibParser_0007();
108 else if(aStepName == KTestCase_0008)
110 testStep = new C3GPLibParser_0008();
112 else if(aStepName == KTestCase_0011)
114 testStep = new C3GPLibParser_0011();
116 else if(aStepName == KTestCase_0014)
118 testStep = new C3GPLibParser_0014();
120 else if(aStepName == KTestCase_0015)
122 testStep = new C3GPLibParser_0015();
124 else if(aStepName == KTestCase_0016)
126 testStep = new C3GPLibParser_0016();
128 else if(aStepName == KTestCase_0017)
130 testStep = new C3GPLibParser_0017();
132 else if(aStepName == KTestCase_0021)
134 testStep = new C3GPLibParser_0021();
136 else if(aStepName == KTestCase_0023)
138 testStep = new C3GPLibParser_0023();
140 else if(aStepName == KTestCase_0027)
142 testStep = new C3GPLibParser_0027();
144 else if(aStepName == KTestCase_0031)
146 testStep = new C3GPLibParser_0031();
148 else if(aStepName == KTestCase_0032)
150 testStep = new C3GPLibParser_0032();
152 else if(aStepName == KTestCase_0033)
154 testStep = new C3GPLibParser_0033();
156 else if(aStepName == KTestCase_0034)
158 testStep = new C3GPLibParser_0034();
160 else if(aStepName == KTestCase_0035)
162 testStep = new C3GPLibParser_0035();
164 else if(aStepName == KTestCase_0036)
166 testStep = new C3GPLibParser_0036();
168 else if(aStepName == KTestCase_0037)
170 testStep = new C3GPLibParser_0037();
172 else if(aStepName == KTestCase_0038)
174 testStep = new C3GPLibParser_0038();
176 else if(aStepName == KTestCase_0039)
178 testStep = new C3GPLibParser_0039();
180 else if(aStepName == KTestCase_0041)
182 testStep = new C3GPLibParser_0041();
184 else if(aStepName == KTestCase_0043)
186 testStep = new C3GPLibParser_0043();
188 else if(aStepName == KTestCase_0045)
190 testStep = new C3GPLibParser_0045();
192 else if(aStepName == KTestCase_0047)
194 testStep = new C3GPLibParser_0047();
196 else if(aStepName == KTestCase_0101)
198 testStep = new C3GPLibParser_0101();
200 else if(aStepName == KTestCase_0102)
202 testStep = new C3GPLibParser_0102();
204 else if(aStepName == KTestCase_0104)
206 testStep = new C3GPLibParser_0104();
208 else if(aStepName == KTestCase_0106)
210 testStep = new C3GPLibParser_0106();
212 else if(aStepName == KTestCase_0107)
214 testStep = new C3GPLibParser_0107();
216 else if(aStepName == KTestCase_0108)
218 testStep = new C3GPLibParser_0108();
220 else if(aStepName == KTestCase_0109)
222 testStep = new C3GPLibParser_0109();
224 else if(aStepName == KTestCase_0110)
226 testStep = new C3GPLibParser_0110();
228 else if(aStepName == KTestCase_0111)
230 testStep = new C3GPLibParser_0111();
232 else if(aStepName == KTestCase_0119)
234 testStep = new C3GPLibParser_0119();
236 else if(aStepName == KTestCase_0120)
238 testStep = new C3GPLibParser_0120();
240 else if(aStepName == KTestCase_0126)
242 testStep = new C3GPLibParser_0126();
244 else if(aStepName == KTestCase_0127)
246 testStep = new C3GPLibParser_0127();
248 else if(aStepName == KTestCase_0130)
250 testStep = new C3GPLibParser_0130();
252 else if(aStepName == KTestCase_0131)
254 testStep = new C3GPLibParser_0131();
256 else if(aStepName == KTestCase_0135)
258 testStep = new C3GPLibParser_0135();
260 else if(aStepName == KTestCase_0136)
262 testStep = new C3GPLibParser_0136();
264 else if(aStepName == KTestCase_0137)
266 testStep = new C3GPLibParser_0137();
268 else if(aStepName == KTestCase_0138)
270 testStep = new C3GPLibParser_0138();
272 else if(aStepName == KTestCase_0139)
274 testStep = new C3GPLibParser_0139();
276 else if (aStepName == K3GPSingleDataSourceTest)
278 testStep = new C3GPSingleDataSourceTest();
280 else if (aStepName == KTestUserDataAtomRetrieval)
282 testStep = new C3GPUserDataAtomRetrieval();
285 // Composer: API Tests
286 else if (aStepName == K3GPComposeFilename)
288 testStep = new C3GPLibComposeFilename();
290 else if(aStepName == K3GPComposeWithoutOpen)
292 testStep = new C3GPLibComposeWithoutOpen();
294 else if(aStepName == K3GPComposeFileWithFileFormatCheck)
296 testStep = new C3GPLibComposeFileWithFileFormatCheck();
298 else if (aStepName == K3GPComposeFrameDependency)
300 testStep = new C3GPLibComposeFrameDependency();
302 else if (aStepName == K3GPComposeVideoProperties)
304 testStep = new C3GPLibComposeVideoProperties();
306 else if (aStepName == K3GPComposeWithSpecificBufferSize)
308 testStep = new C3GPLibComposeWithSpecificBufferSize();
310 else if (aStepName == K3GPComposeUserData)
312 testStep = new C3GPLibComposeUserData();
314 else if (aStepName == K3GPComposeWithFlag)
316 testStep = new C3GPLibComposeWithFlag();
318 else if (aStepName == K3GPComposeAudioProperties)
320 testStep = new C3GPLibComposeAudioProperties();
322 else if (aStepName == K3GPComposeWithNoAudioVideo)
324 testStep = new C3GPLibComposeWithNoAudioVideo();
326 else if (aStepName == K3GPComposeWithNoAudioVideo)
328 testStep = new C3GPLibComposeWithNoAudioVideo();
330 else if (aStepName == K3GPComposeOpenAgain)
332 testStep = new C3GPLibComposeOpenAgain();
334 else if (aStepName == K3GPComposeAudioFrames)
336 testStep = new C3GPLibComposeAudioFrames();
338 else if (aStepName == K3GPComposeVideoFrame)
340 testStep = new C3GPLibComposeVideoFrame();
342 else if (aStepName == K3GPComposeOpenReadOnlyFile)
344 testStep = new C3GPLibComposeOpenReadOnlyFile();
346 else if (aStepName == K3GPComposeOpenedFile)
348 testStep = new C3GPLibComposeOpenedFile();
350 else if (aStepName == K3GPComposeMultiComposeOnSameFile)
352 testStep = new C3GPLibComposeMultiComposeOnSameFile();
354 else if (aStepName == K3GPComposeMultiComposers)
356 testStep = new C3GPLibComposeMultiComposers();
358 else if (aStepName == K3GPComposeCloseComposerWithoutComplete)
360 testStep = new C3GPLibComposeCloseComposerWithoutComplete();
362 else if (aStepName == K3GPComposePanic)
364 testStep = new C3GPLibComposePanic();
366 else if (aStepName == K3GPComposeLargeFile)
368 testStep = new C3GPLibComposeLargeFile();
370 else if (aStepName == K3GPComposeLargeFileUserData)
372 testStep = new C3GPLibComposeLargeFileUserData();
374 else if (aStepName == K3GPComposeLargeFile32bitAPI)
376 testStep = new C3GPLibComposeLargeFile32bitAPI();
378 else if (aStepName == K3GPComposeLargeFileDiskFull)
380 testStep = new C3GPLibComposeLargeFileDiskFull();
382 // Composer: file format test
383 else if (aStepName == K3GPParseComposeFile)
385 testStep = new C3GPLibParseComposeFile();
388 else if (aStepName == K3GPComposeFileWithAvcProfileCheck)
390 testStep = new C3GPLibComposeFileWithAvcProfileCheck();
392 // Main & High profile parse
393 else if (aStepName == K3GPLibParseAndCheckTypes)
395 testStep = new C3GPLibParseAndCheckTypes();