author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 19 | 989d2f495d90 |
permissions | -rw-r--r-- |
19 | 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 |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
22 |
#include <StifTestInterface.h> |
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
23 |
#include "tlmdatabasestest.h" |
19 | 24 |
|
25 |
||
26 |
// ============================ MEMBER FUNCTIONS =============================== |
|
27 |
||
28 |
// ----------------------------------------------------------------------------- |
|
29 |
// CTLmDbTest::CTLmDbTest |
|
30 |
// C++ default constructor can NOT contain any code, that |
|
31 |
// might leave. |
|
32 |
// ----------------------------------------------------------------------------- |
|
33 |
// |
|
34 |
CTLmDbTest::CTLmDbTest( |
|
35 |
CTestModuleIf& aTestModuleIf ): |
|
36 |
CScriptBase( aTestModuleIf ) |
|
37 |
{ |
|
38 |
||
39 |
} |
|
40 |
||
41 |
// ----------------------------------------------------------------------------- |
|
42 |
// CTLmDbTest::ConstructL |
|
43 |
// Symbian 2nd phase constructor can leave. |
|
44 |
// ----------------------------------------------------------------------------- |
|
45 |
// |
|
46 |
void CTLmDbTest::ConstructL() |
|
47 |
{ |
|
48 |
iLog = CStifLogger::NewL( KTLocTestLogPath, |
|
49 |
KTLocTestLogFile, |
|
50 |
CStifLogger::ETxt, |
|
51 |
CStifLogger::EFile, |
|
52 |
EFalse ); |
|
53 |
||
54 |
CleanupStack::PushL (iLog); |
|
55 |
||
56 |
iDatabaseManager = CPosLmDatabaseManager::NewL(); |
|
57 |
||
58 |
CleanupStack::Pop (iLog); |
|
59 |
||
60 |
} |
|
61 |
||
62 |
// ----------------------------------------------------------------------------- |
|
63 |
// CTLmDbTest::NewL |
|
64 |
// Two-phased constructor. |
|
65 |
// ----------------------------------------------------------------------------- |
|
66 |
// |
|
67 |
CTLmDbTest* CTLmDbTest::NewL( |
|
68 |
CTestModuleIf& aTestModuleIf ) |
|
69 |
{ |
|
70 |
CTLmDbTest* self = new (ELeave) CTLmDbTest( aTestModuleIf ); |
|
71 |
||
72 |
CleanupStack::PushL( self ); |
|
73 |
self->ConstructL(); |
|
74 |
CleanupStack::Pop(); |
|
75 |
||
76 |
return self; |
|
77 |
||
78 |
} |
|
79 |
||
80 |
// Destructor |
|
81 |
CTLmDbTest::~CTLmDbTest() |
|
82 |
{ |
|
83 |
||
84 |
// Delete logger |
|
85 |
delete iLog; |
|
86 |
||
87 |
delete iDatabaseManager; |
|
88 |
ReleaseLandmarkResources (); |
|
89 |
||
90 |
} |
|
91 |
||
92 |
// ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
93 |
||
94 |
// ----------------------------------------------------------------------------- |
|
95 |
// LibEntryL is a polymorphic Dll entry point. |
|
96 |
// Returns: CScriptBase: New CScriptBase derived object |
|
97 |
// ----------------------------------------------------------------------------- |
|
98 |
// |
|
99 |
EXPORT_C CScriptBase* LibEntryL( |
|
100 |
CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
101 |
{ |
|
102 |
||
103 |
return ( CScriptBase* ) CTLmDbTest::NewL( aTestModuleIf ); |
|
104 |
||
105 |
} |
|
106 |
||
107 |
// ----------------------------------------------------------------------------- |
|
108 |
// E32Dll is a DLL entry point function. |
|
109 |
// Returns: KErrNone |
|
110 |
// ----------------------------------------------------------------------------- |
|
111 |
// |
|
112 |
#ifndef EKA2 // Hide Dll entry point to EKA2 |
|
113 |
GLDEF_C TInt E32Dll( |
|
114 |
TDllReason /*aReason*/) // Reason code |
|
115 |
{ |
|
116 |
return(KErrNone); |
|
117 |
||
118 |
} |
|
119 |
#endif // EKA2 |
|
120 |
||
121 |
// End of File |