|
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_smcs2_server.h" |
|
17 #include "t_testsmsentry_step.h" |
|
18 #include "t_testSmsSettings_Step.h" |
|
19 #include "t_testsmsnumber_step.h" |
|
20 #include "t_testSmsEmailFields_Step.h" |
|
21 #include "t_testsmsHeader_step.h" |
|
22 #include "t_testSmsUtilities_Step.h" |
|
23 #include "t_testSmsEmsExtensions_step.h" |
|
24 |
|
25 _LIT(KServerName,"t_smcs2_server"); |
|
26 |
|
27 CSchSendUTCServer* CSchSendUTCServer::NewL() |
|
28 { |
|
29 CSchSendUTCServer * server = new (ELeave) CSchSendUTCServer(); |
|
30 CleanupStack::PushL(server); |
|
31 server-> ConstructL(KServerName); |
|
32 |
|
33 CleanupStack::Pop(server); |
|
34 return server; |
|
35 } |
|
36 |
|
37 LOCAL_C void MainL() |
|
38 { |
|
39 CActiveScheduler* sched=NULL; |
|
40 sched=new(ELeave) CActiveScheduler; |
|
41 CActiveScheduler::Install(sched); |
|
42 CleanupStack::PushL(sched); |
|
43 CSchSendUTCServer* server = server = CSchSendUTCServer::NewL(); |
|
44 CleanupStack::PushL(server); |
|
45 |
|
46 RProcess::Rendezvous(KErrNone); |
|
47 sched->Start(); |
|
48 |
|
49 CleanupStack::PopAndDestroy(2,sched); |
|
50 } |
|
51 |
|
52 |
|
53 GLDEF_C TInt E32Main() |
|
54 { |
|
55 __UHEAP_MARK; |
|
56 CTrapCleanup* cleanup = CTrapCleanup::New(); |
|
57 if(cleanup == NULL) |
|
58 { |
|
59 return KErrNoMemory; |
|
60 } |
|
61 TRAPD(err,MainL()); |
|
62 delete cleanup; |
|
63 __UHEAP_MARKEND; |
|
64 return err; |
|
65 } |
|
66 |
|
67 RFs& CSchSendUTCServer::Fs() |
|
68 { |
|
69 return iFs; |
|
70 }; |
|
71 |
|
72 CTestStep* CSchSendUTCServer::CreateTestStep(const TDesC& aStepName) |
|
73 { |
|
74 |
|
75 CTestStep* testStep = NULL; |
|
76 |
|
77 if(aStepName == KTestSmsEntry) |
|
78 testStep = new CTestSmsEntryStep(); |
|
79 |
|
80 if(aStepName == KTestSmsSettings) |
|
81 testStep = new CTestSmsSettingsStep(); |
|
82 |
|
83 if(aStepName == KTestSmsNumber) |
|
84 testStep = new CTestSmsNumberStep(); |
|
85 |
|
86 if(aStepName == KTestSmsEmailFields) |
|
87 testStep = new CTestSmsEmailFieldsStep(); |
|
88 |
|
89 if(aStepName == KTestSmsHeader) |
|
90 testStep = new CTestSmsHeaderStep(); |
|
91 |
|
92 if(aStepName == KTestSmsUtilities) |
|
93 testStep = new CTestSmsUtilitiesStep(); |
|
94 |
|
95 if(aStepName == KTestSmsEmsExtensions) |
|
96 testStep = new CTestSmsEmsExtensionsStep(); |
|
97 |
|
98 return testStep; |
|
99 } |