116 |
116 |
117 /** |
117 /** |
118 */ |
118 */ |
119 TBool CLbsNetSimAssistanceDataProvider::SetAssistanceDataProvider(TUid aUid) |
119 TBool CLbsNetSimAssistanceDataProvider::SetAssistanceDataProvider(TUid aUid) |
120 { |
120 { |
|
121 LBSLOG2(ELogP1, "CLbsNetSimAssistanceDataProvider::SetAssistanceDataProvider(Uid= dataSourceId = 0x%08X\n", aUid.iUid); |
|
122 |
121 // Always reload the current plugin to make sure it's properly initialised |
123 // Always reload the current plugin to make sure it's properly initialised |
122 // Delete the old plugins if there's any |
124 // Delete the old plugins if there's any |
123 if (iAssistanceDataUid != aUid) |
125 if (iAssistanceDataUid != aUid) |
124 { |
126 { |
|
127 LBSLOG(ELogP1, "Delete the old plugins if there's any\n"); |
|
128 |
125 if (iAssistanceModule != NULL) |
129 if (iAssistanceModule != NULL) |
126 { |
130 { |
127 delete iAssistanceSource; |
131 delete iAssistanceSource; |
128 iAssistanceSource = NULL; |
132 iAssistanceSource = NULL; |
129 delete iAssistanceModule; |
133 delete iAssistanceModule; |
132 } |
136 } |
133 |
137 |
134 // Set the new plugin Uid |
138 // Set the new plugin Uid |
135 iAssistanceDataUid = aUid; |
139 iAssistanceDataUid = aUid; |
136 |
140 |
137 // Load the new assistance module plugin |
141 // Load the new assistance module plugin |
|
142 LBSLOG(ELogP1, "Load the new assistance module plugin\n"); |
|
143 |
138 if (iAssistanceModule == NULL) |
144 if (iAssistanceModule == NULL) |
139 { |
145 { |
140 if (iAssistanceDataUid.iUid == 0) |
146 if (iAssistanceDataUid.iUid == 0) |
141 { |
147 { |
|
148 LBSLOG(ELogP1, "iAssistanceDataUid.iUid == 0\n"); |
142 iAssistanceModule = CAssistanceDataSourceModuleBase::NewL(*this); // Loads default |
149 iAssistanceModule = CAssistanceDataSourceModuleBase::NewL(*this); // Loads default |
|
150 LBSLOG(ELogP1, "end iAssistanceDataUid.iUid == 0\n"); |
|
151 |
143 } |
152 } |
144 else |
153 else |
145 { |
154 { |
|
155 LBSLOG(ELogP1, "iAssistanceDataUid.iUid != 0 \n"); |
146 iAssistanceModule = CAssistanceDataSourceModuleBase::NewL(iAssistanceDataUid, *this); // Loads specified |
156 iAssistanceModule = CAssistanceDataSourceModuleBase::NewL(iAssistanceDataUid, *this); // Loads specified |
|
157 LBSLOG(ELogP1, "end iAssistanceDataUid.iUid != 0 \n"); |
|
158 |
147 } |
159 } |
148 |
160 |
149 // Load the new assistance data source |
161 // Load the new assistance data source |
|
162 LBSLOG(ELogP1, "Load the new assistance data source \n"); |
|
163 |
150 iAssistanceSource = iAssistanceModule->NewDataSourceL(); |
164 iAssistanceSource = iAssistanceModule->NewDataSourceL(); |
151 } |
165 |
152 } |
166 LBSLOG(ELogP1, "end Load the new assistance data source \n"); |
153 |
167 |
|
168 } |
|
169 } |
|
170 LBSLOG2(ELogP1, "end CLbsNetSimAssistanceDataProvider::SetAssistanceDataProvider(Uid= dataSourceId = 0x%08X\n", aUid.iUid); |
|
171 |
154 return ETrue; |
172 return ETrue; |
155 } |
173 } |
156 |
174 |
157 /** |
175 /** |
158 Clears the currently set reference locations |
176 Clears the currently set reference locations |