279 // ----------------------------------------------------------------------------- |
281 // ----------------------------------------------------------------------------- |
280 // |
282 // |
281 void CThumbAGDaemon::HandleSessionError( CMdESession& /*aSession*/, TInt aError ) |
283 void CThumbAGDaemon::HandleSessionError( CMdESession& /*aSession*/, TInt aError ) |
282 { |
284 { |
283 TN_DEBUG2( "CThumbAGDaemon::HandleSessionError == %d", aError ); |
285 TN_DEBUG2( "CThumbAGDaemon::HandleSessionError == %d", aError ); |
284 if (aError != KErrNone && !iSessionError) |
286 if (aError != KErrNone && !iShutdown && !iSessionError) |
285 { |
287 { |
286 iSessionError = ETrue; |
288 iSessionError = ETrue; |
287 |
289 |
288 // kill processor right away, because it also has MdESession |
290 // kill processor right away, because it also has MdESession |
289 if(iProcessor) |
291 if(iProcessor) |
290 { |
292 { |
|
293 iProcessor->Shutdown(); |
291 delete iProcessor; |
294 delete iProcessor; |
292 iProcessor = NULL; |
295 iProcessor = NULL; |
293 } |
296 } |
294 |
297 |
295 if (!iShutdown) |
298 if (!iReconnect->IsActive()) |
296 { |
299 { |
297 if (!iReconnect->IsActive()) |
300 iReconnect->Start( KMdEReconnect, KMdEReconnect, |
298 { |
301 TCallBack(ReconnectCallBack, this)); |
299 iReconnect->Start( KMdEReconnect, KMdEReconnect, |
302 |
300 TCallBack(ReconnectCallBack, this)); |
303 TN_DEBUG1( "CThumbAGDaemon::HandleSessionError() - reconnect timer started" ); |
301 |
|
302 TN_DEBUG1( "CThumbAGDaemon::HandleSessionError() - reconnect timer started" ); |
|
303 } |
|
304 } |
304 } |
305 |
305 |
306 } |
306 } |
307 } |
307 } |
308 |
308 |
316 TObserverNotificationType aType, |
316 TObserverNotificationType aType, |
317 const RArray<TItemId>& aObjectIdArray, |
317 const RArray<TItemId>& aObjectIdArray, |
318 const RPointerArray<HBufC>& aObjectUriArray) |
318 const RPointerArray<HBufC>& aObjectUriArray) |
319 { |
319 { |
320 TN_DEBUG1( "CThumbAGDaemon::HandleUriObjectNotification() - begin" ); |
320 TN_DEBUG1( "CThumbAGDaemon::HandleUriObjectNotification() - begin" ); |
|
321 |
|
322 if(!iProcessor || iShutdown) |
|
323 { |
|
324 return; |
|
325 } |
321 |
326 |
322 if(aType == ENotifyRemove) |
327 if(aType == ENotifyRemove) |
323 { |
328 { |
324 TN_DEBUG1( "CThumbAGDaemon::HandleUriObjectNotification() - removed"); |
329 TN_DEBUG1( "CThumbAGDaemon::HandleUriObjectNotification() - removed"); |
325 TInt err(0); |
330 TInt err(0); |