|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32base.h> |
|
23 //#include <msvstd.h> |
|
24 //#include <msvapi.h> |
|
25 //#include <msvids.h> |
|
26 #include <LiwCommon.h> |
|
27 #include <Stiftestinterface.h> |
|
28 |
|
29 #include "tcalendaraddtest.h" |
|
30 |
|
31 #include "teststartconsolealarmserver2.h" |
|
32 void StartAlarmServerL(); |
|
33 /*#if __WINS__ |
|
34 const TUid KServerUid2={0x1000008D}; |
|
35 const TUid KServerUid3={0x101F502A}; |
|
36 _LIT(KConsoleAlarmAlertServerImg,"ConsoleAlarmAlertServer"); |
|
37 void StartAlarmServerL() |
|
38 { |
|
39 // Have to start the alarm alert server otherwise the alarm |
|
40 // server cannot start. |
|
41 const TUidType serverUid(KNullUid,KServerUid2,KServerUid3); |
|
42 TBuf<256> cmdline; |
|
43 for (TInt i = 0 ; i < 100 ; i++) |
|
44 { |
|
45 cmdline.Append('a'); |
|
46 } |
|
47 |
|
48 RProcess server; |
|
49 TInt ret = 0; |
|
50 ret = server.Create(KConsoleAlarmAlertServerImg,cmdline,serverUid); |
|
51 TRequestStatus stat; |
|
52 server.Rendezvous(stat); |
|
53 if (stat!=KRequestPending) |
|
54 { |
|
55 server.Kill(0); // abort startup |
|
56 } |
|
57 else |
|
58 { |
|
59 server.Resume(); // logon OK - start the server |
|
60 } |
|
61 } |
|
62 #endif */ |
|
63 //#include <SAPI_TEST\testprg.h> |
|
64 |
|
65 |
|
66 |
|
67 // ============================ MEMBER FUNCTIONS =============================== |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CTCalendarAddTest::CTCalendarAddTest |
|
71 // C++ default constructor can NOT contain any code, that |
|
72 // might leave. |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 CTCalendarAddTest::CTCalendarAddTest( |
|
76 CTestModuleIf& aTestModuleIf ): |
|
77 CScriptBase( aTestModuleIf ) |
|
78 { |
|
79 |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CTCalendarAddTest::ConstructL |
|
84 // Symbian 2nd phase constructor can leave. |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 void CTCalendarAddTest::ConstructL() |
|
88 { |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CTCalendarAddTest::NewL |
|
93 // Two-phased constructor. |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 CTCalendarAddTest* CTCalendarAddTest::NewL( |
|
97 CTestModuleIf& aTestModuleIf ) |
|
98 { |
|
99 #if __WINS__ |
|
100 StartAlarmServerL(); |
|
101 #endif |
|
102 CTCalendarAddTest* self = new (ELeave) CTCalendarAddTest( aTestModuleIf ); |
|
103 |
|
104 CleanupStack::PushL( self ); |
|
105 self->ConstructL(); |
|
106 CleanupStack::Pop(); |
|
107 |
|
108 return self; |
|
109 |
|
110 } |
|
111 |
|
112 // Destructor |
|
113 CTCalendarAddTest::~CTCalendarAddTest() |
|
114 { |
|
115 |
|
116 // Delete resources allocated from test methods |
|
117 Delete(); |
|
118 } |
|
119 |
|
120 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
121 |
|
122 // ----------------------------------------------------------------------------- |
|
123 // LibEntryL is a polymorphic Dll entry point. |
|
124 // Returns: CScriptBase: New CScriptBase derived object |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 EXPORT_C CScriptBase* LibEntryL( |
|
128 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
129 { |
|
130 |
|
131 return ( CScriptBase* ) CTCalendarAddTest::NewL( aTestModuleIf ); |
|
132 |
|
133 } |
|
134 |
|
135 // ----------------------------------------------------------------------------- |
|
136 // E32Dll is a DLL entry point function. |
|
137 // Returns: KErrNone |
|
138 // ----------------------------------------------------------------------------- |
|
139 // |
|
140 #ifndef EKA2 // Hide Dll entry point to EKA2 |
|
141 GLDEF_C TInt E32Dll( |
|
142 TDllReason /*aReason*/) // Reason code |
|
143 { |
|
144 return(KErrNone); |
|
145 |
|
146 } |
|
147 #endif // EKA2 |
|
148 |
|
149 // End of File |