equal
deleted
inserted
replaced
192 MPX_FUNC("CMPXCollectionEngine::NotifyL"); |
192 MPX_FUNC("CMPXCollectionEngine::NotifyL"); |
193 |
193 |
194 TInt command = KErrNotSupported; |
194 TInt command = KErrNotSupported; |
195 TInt data = 0; |
195 TInt data = 0; |
196 TBool clearCache ( EFalse ); |
196 TBool clearCache ( EFalse ); |
|
197 TBool notify( ETrue ); |
|
198 TInt count = iContexts.Count(); |
|
199 CMPXCollectionClientContext* context( NULL ); |
197 switch( aMsg ) |
200 switch( aMsg ) |
198 { |
201 { |
199 case EMcMsgFormatStart: |
202 case EMcMsgFormatStart: |
200 case EMcMsgDiskRemoved: |
203 case EMcMsgDiskRemoved: |
201 case EMcMsgUSBMassStorageStart: |
204 case EMcMsgUSBMassStorageStart: |
205 |
208 |
206 // Clear the cache |
209 // Clear the cache |
207 clearCache = ETrue; |
210 clearCache = ETrue; |
208 break; |
211 break; |
209 } |
212 } |
|
213 case EMcMsgDiskInserted: |
|
214 for( TInt i=0; i<count; ++i ) |
|
215 { |
|
216 context = iContexts[i]; |
|
217 context->NotifyL( aMsg, aData ); |
|
218 } |
|
219 notify = EFalse; |
210 case EMcMsgFormatEnd: |
220 case EMcMsgFormatEnd: |
211 case EMcMsgDiskInserted: |
|
212 case EMcMsgUSBMassStorageEnd: |
221 case EMcMsgUSBMassStorageEnd: |
213 { |
222 { |
214 command = EMcReOpenCollection; |
223 command = EMcReOpenCollection; |
215 data = aData; |
224 data = aData; |
216 |
225 |
279 iCache->Reset(); |
288 iCache->Reset(); |
280 } |
289 } |
281 rfs.Close(); |
290 rfs.Close(); |
282 } |
291 } |
283 |
292 |
284 TInt count = iContexts.Count(); |
293 if ( notify ) |
285 for( TInt i=0; i<count; ++i ) |
294 { |
286 { |
295 for( TInt i=0; i<count; ++i ) |
287 CMPXCollectionClientContext* context; |
296 { |
288 context = iContexts[i]; |
297 context = iContexts[i]; |
289 context->NotifyL( aMsg, aData ); |
298 context->NotifyL( aMsg, aData ); |
290 } |
299 } |
291 } |
300 } |
292 |
301 } |
293 void CMPXCollectionEngine::Command( TMPXCollectionCommand aCmd, TInt aData ) |
302 void CMPXCollectionEngine::Command( TMPXCollectionCommand aCmd, TInt aData ) |
294 { |
303 { |
295 TArray<CMPXCollectionPlugin*> plugins = iPluginHandler->LoadedPlugins(); |
304 TArray<CMPXCollectionPlugin*> plugins = iPluginHandler->LoadedPlugins(); |
296 for( TInt i=0; i<plugins.Count(); ++i ) |
305 for( TInt i=0; i<plugins.Count(); ++i ) |
297 { |
306 { |