|
1 // Copyright (c) 2005-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "t_partialdownloadspoofserver.h" |
|
17 #include "t_partialdownloadstep.h" |
|
18 |
|
19 _LIT(KServerName,"T_PartialDownloadSpoofServer"); |
|
20 CPartialDownloadSpoofServer* CPartialDownloadSpoofServer::NewL() |
|
21 { |
|
22 CPartialDownloadSpoofServer * server = new (ELeave) CPartialDownloadSpoofServer(); |
|
23 CleanupStack::PushL(server); |
|
24 server-> ConstructL(KServerName); |
|
25 |
|
26 CleanupStack::Pop(server); |
|
27 return server; |
|
28 } |
|
29 |
|
30 LOCAL_C void MainL() |
|
31 { |
|
32 CActiveScheduler* sched=new(ELeave) CActiveScheduler; |
|
33 CActiveScheduler::Install(sched); |
|
34 CPartialDownloadSpoofServer* server = NULL; |
|
35 // Create the CTestServer derived server |
|
36 TRAPD(err,server = CPartialDownloadSpoofServer::NewL()); |
|
37 if(err==KErrNone) |
|
38 { |
|
39 // Sync with the client and enter the active scheduler |
|
40 RProcess::Rendezvous(KErrNone); |
|
41 sched->Start(); |
|
42 } |
|
43 delete server; |
|
44 delete sched; |
|
45 } |
|
46 |
|
47 |
|
48 GLDEF_C TInt E32Main() |
|
49 { |
|
50 __UHEAP_MARK; |
|
51 |
|
52 CTrapCleanup* cleanup = CTrapCleanup::New(); |
|
53 if(cleanup == NULL) |
|
54 { |
|
55 return KErrNoMemory; |
|
56 } |
|
57 TRAPD(err,MainL()); |
|
58 delete cleanup; |
|
59 |
|
60 __UHEAP_MARKEND; |
|
61 return err; |
|
62 } |
|
63 |
|
64 |
|
65 RFs& CPartialDownloadSpoofServer::Fs() |
|
66 { |
|
67 return iFs; |
|
68 }; |
|
69 |
|
70 CTestStep* CPartialDownloadSpoofServer::CreateTestStep(const TDesC& aStepName) |
|
71 { |
|
72 |
|
73 CTestStep* testStep = NULL; |
|
74 |
|
75 if(aStepName == KTestPartialDownLoad) |
|
76 { |
|
77 testStep = new CPartialDownloadStep(); |
|
78 } |
|
79 |
|
80 return testStep; |
|
81 } |