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 |
// INCLUDE FILES |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
21 |
#include <StifTestInterface.h> |
19 | 22 |
#include <liwcommon.h> |
23 |
#include <liwservicehandler.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
24 |
#include <EPos_Landmarks.h> |
19 | 25 |
#include <EPos_HPosLmDatabaseInfo.h> |
26 |
#include <EPos_CPosLmDatabaseManager.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
27 |
#include "tlandmarkprovider.h" |
19 | 28 |
#include "landmarkliwparams.hrh" |
29 |
||
30 |
// EXTERNAL DATA STRUCTURES |
|
31 |
//extern ?external_data; |
|
32 |
||
33 |
// EXTERNAL FUNCTION PROTOTYPES |
|
34 |
//extern ?external_function( ?arg_type,?arg_type ); |
|
35 |
||
36 |
// CONSTANTS |
|
37 |
||
38 |
// MACROS |
|
39 |
//#define ?macro ?macro_def |
|
40 |
||
41 |
// LOCAL CONSTANTS AND MACROS |
|
42 |
//const ?type ?constant_var = ?constant; |
|
43 |
//#define ?macro_name ?macro_def |
|
44 |
||
45 |
// MODULE DATA STRUCTURES |
|
46 |
//enum ?declaration |
|
47 |
//typedef ?declaration |
|
48 |
||
49 |
// LOCAL FUNCTION PROTOTYPES |
|
50 |
//?type ?function_name( ?arg_type, ?arg_type ); |
|
51 |
||
52 |
// FORWARD DECLARATIONS |
|
53 |
//class ?FORWARD_CLASSNAME; |
|
54 |
||
55 |
// ============================= LOCAL FUNCTIONS =============================== |
|
56 |
||
57 |
// ----------------------------------------------------------------------------- |
|
58 |
// ?function_name ?description. |
|
59 |
// ?description |
|
60 |
// Returns: ?value_1: ?description |
|
61 |
// ?value_n: ?description_line1 |
|
62 |
// ?description_line2 |
|
63 |
// ----------------------------------------------------------------------------- |
|
64 |
// |
|
65 |
/* |
|
66 |
?type ?function_name( |
|
67 |
?arg_type arg, // ?description |
|
68 |
?arg_type arg) // ?description |
|
69 |
{ |
|
70 |
||
71 |
?code // ?comment |
|
72 |
||
73 |
// ?comment |
|
74 |
?code |
|
75 |
} |
|
76 |
*/ |
|
77 |
||
78 |
// ============================ MEMBER FUNCTIONS =============================== |
|
79 |
||
80 |
// ----------------------------------------------------------------------------- |
|
81 |
// CTLandmarkProvider::CTLandmarkProvider |
|
82 |
// C++ default constructor can NOT contain any code, that |
|
83 |
// might leave. |
|
84 |
// ----------------------------------------------------------------------------- |
|
85 |
// |
|
86 |
CTLandmarkProvider::CTLandmarkProvider( |
|
87 |
CTestModuleIf& aTestModuleIf ): |
|
88 |
CScriptBase( aTestModuleIf ) |
|
89 |
{ |
|
90 |
} |
|
91 |
||
92 |
// ----------------------------------------------------------------------------- |
|
93 |
// CTLandmarkProvider::ConstructL |
|
94 |
// Symbian 2nd phase constructor can leave. |
|
95 |
// ----------------------------------------------------------------------------- |
|
96 |
// |
|
97 |
void CTLandmarkProvider::ConstructL() |
|
98 |
{ |
|
99 |
iLog = CStifLogger::NewL( KTLandmarkProviderLogPath, |
|
100 |
KTLandmarkProviderLogFile, |
|
101 |
CStifLogger::ETxt, |
|
102 |
CStifLogger::EFile, |
|
103 |
EFalse ); |
|
104 |
||
105 |
iDatabaseManager = CPosLmDatabaseManager::NewL(); |
|
106 |
DeleteAllLocalDatabasesL(); |
|
107 |
HPosLmDatabaseInfo* info = HPosLmDatabaseInfo::NewLC(KTestDbUri); |
|
108 |
iDatabaseManager->CreateDatabaseL (*info); |
|
109 |
CleanupStack::PopAndDestroy(info); |
|
110 |
info = HPosLmDatabaseInfo::NewLC(KTestDbUri1); |
|
111 |
iDatabaseManager->CreateDatabaseL (*info); |
|
112 |
CleanupStack::PopAndDestroy(info); |
|
113 |
} |
|
114 |
||
115 |
// ----------------------------------------------------------------------------- |
|
116 |
// CTLandmarkProvider::NewL |
|
117 |
// Two-phased constructor. |
|
118 |
// ----------------------------------------------------------------------------- |
|
119 |
// |
|
120 |
CTLandmarkProvider* CTLandmarkProvider::NewL( |
|
121 |
CTestModuleIf& aTestModuleIf ) |
|
122 |
{ |
|
123 |
CTLandmarkProvider* self = new (ELeave) CTLandmarkProvider( aTestModuleIf ); |
|
124 |
||
125 |
CleanupStack::PushL( self ); |
|
126 |
self->ConstructL(); |
|
127 |
CleanupStack::Pop(); |
|
128 |
||
129 |
return self; |
|
130 |
||
131 |
} |
|
132 |
||
133 |
// Destructor |
|
134 |
CTLandmarkProvider::~CTLandmarkProvider() |
|
135 |
{ |
|
136 |
iLog->Log( _L(" deleting iDatabaseManager ...") ); |
|
137 |
delete iDatabaseManager; |
|
138 |
delete iLog; |
|
139 |
ReleaseLandmarkResources (); |
|
140 |
||
141 |
} |
|
142 |
||
143 |
// ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
144 |
||
145 |
// ----------------------------------------------------------------------------- |
|
146 |
// LibEntryL is a polymorphic Dll entry point. |
|
147 |
// Returns: CScriptBase: New CScriptBase derived object |
|
148 |
// ----------------------------------------------------------------------------- |
|
149 |
// |
|
150 |
EXPORT_C CScriptBase* LibEntryL( |
|
151 |
CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
152 |
{ |
|
153 |
||
154 |
return ( CScriptBase* ) CTLandmarkProvider::NewL( aTestModuleIf ); |
|
155 |
||
156 |
} |
|
157 |
||
158 |
// ----------------------------------------------------------------------------- |
|
159 |
// E32Dll is a DLL entry point function. |
|
160 |
// Returns: KErrNone |
|
161 |
// ----------------------------------------------------------------------------- |
|
162 |
// |
|
163 |
#ifndef EKA2 // Hide Dll entry point to EKA2 |
|
164 |
GLDEF_C TInt E32Dll( |
|
165 |
TDllReason /*aReason*/) // Reason code |
|
166 |
{ |
|
167 |
return(KErrNone); |
|
168 |
||
169 |
} |
|
170 |
#endif // EKA2 |
|
171 |
||
172 |
// End of File |