234 } |
236 } |
235 else |
237 else |
236 { |
238 { |
237 err = KErrNone; |
239 err = KErrNone; |
238 } |
240 } |
239 TRACE( T_LIT("CVIMPSTEngineSessionCntxtObserver::ServerBindL end")); |
|
240 return err; |
241 return err; |
241 } |
242 } |
242 // --------------------------------------------------------------------------- |
243 // --------------------------------------------------------------------------- |
243 // CVIMPSTEngineVoIPPrecenseHandler::ServerUnBindL |
244 // CVIMPSTEngineVoIPPrecenseHandler::ServerUnBindL |
244 // --------------------------------------------------------------------------- |
245 // --------------------------------------------------------------------------- |
245 // |
246 // |
246 TInt CVIMPSTEngineSessionCntxtObserver::ServerUnBindL( |
247 TInt CVIMPSTEngineSessionCntxtObserver::ServerUnBindL( |
247 TBool aDoUnsubscribe ) |
248 TBool aDoUnsubscribe ) |
248 { |
249 { |
249 TRACE( T_LIT("CVIMPSTEngineSessionCntxtObserver::ServerUnBind start")); |
250 TRACER_AUTO; |
250 TInt err = KErrNotFound; |
251 TInt err = KErrNotFound; |
251 if ( TVIMPSTEnums::EVIMPSTBindDone == iBindStatus ) |
252 if ( TVIMPSTEnums::EVIMPSTBindDone == iBindStatus ) |
252 { |
253 { |
253 if ( aDoUnsubscribe ) |
254 if ( aDoUnsubscribe ) |
254 { |
255 { |
255 iBindStatus = TVIMPSTEnums::EVIMPSTUnBinding; |
256 iBindStatus = TVIMPSTEnums::EVIMPSTUnBinding; |
256 } |
257 } |
257 |
258 |
258 TRACE( T_LIT("CVIMPSTEngineSessionCntxtObserver::ServerUnBind - do unbind")); |
259 TRACE( " do unbind"); |
259 TXIMPRequestId operationId = TXIMPRequestId::Null(); |
260 TXIMPRequestId operationId = TXIMPRequestId::Null(); |
260 TRAP( err, operationId = iPresenceCtx->UnbindL()); |
261 TRAP( err, operationId = iPresenceCtx->UnbindL()); |
261 iBindStatus = TVIMPSTEnums::EVIMPSTUnBindWaiting; |
262 iBindStatus = TVIMPSTEnums::EVIMPSTUnBindWaiting; |
262 iRequestMapper->CreateRequestL(operationId,EFalse,EVIMPSTXimpOperationUnBind) ; |
263 iRequestMapper->CreateRequestL(operationId,EFalse,EVIMPSTXimpOperationUnBind) ; |
263 iBindStatus = TVIMPSTEnums::EVIMPSTBindNotDone; |
264 iBindStatus = TVIMPSTEnums::EVIMPSTBindNotDone; |
267 { |
268 { |
268 // Disable flag here. If service is really disabled, we must not |
269 // Disable flag here. If service is really disabled, we must not |
269 // rebind when unbind completes. |
270 // rebind when unbind completes. |
270 iBindStatus = TVIMPSTEnums::EVIMPSTBindNotDone; |
271 iBindStatus = TVIMPSTEnums::EVIMPSTBindNotDone; |
271 } |
272 } |
272 TRACE( T_LIT("CVIMPSTEngineSessionCntxtObserver::ServerUnBind end")); |
|
273 return err; |
273 return err; |
274 } |
274 } |
275 |
275 |
276 |
276 |
277 // --------------------------------------------------------------------------- |
277 // --------------------------------------------------------------------------- |
278 // CVIMPSTEngineSessionCntxtObserver::UriFromXimpOperationLC |
278 // CVIMPSTEngineSessionCntxtObserver::UriFromXimpOperationLC |
279 // --------------------------------------------------------------------------- |
279 // --------------------------------------------------------------------------- |
280 // |
280 // |
281 HBufC* CVIMPSTEngineSessionCntxtObserver::UriFromXimpOperationLC(const MXIMPBase& aEvent ) |
281 HBufC* CVIMPSTEngineSessionCntxtObserver::UriFromXimpOperationLC(const MXIMPBase& aEvent ) |
282 { |
282 { |
283 TRACE( T_LIT("CVIMPSTEngineSessionCntxtObserver::UriFromXimpOperationLC start")); |
283 TRACER_AUTO; |
284 const MPresentityPresenceEvent& event = |
284 const MPresentityPresenceEvent& event = |
285 *TXIMPGetInterface< const MPresentityPresenceEvent >::From( |
285 *TXIMPGetInterface< const MPresentityPresenceEvent >::From( |
286 aEvent, MXIMPBase::EPanicIfUnknown ); |
286 aEvent, MXIMPBase::EPanicIfUnknown ); |
287 HBufC* retValue = NULL; |
287 HBufC* retValue = NULL; |
288 retValue = event.PresentityId().Identity().AllocLC(); |
288 retValue = event.PresentityId().Identity().AllocLC(); |
289 if(!retValue) |
289 if(!retValue) |
290 { |
290 { |
291 retValue = KNullDesC().AllocLC(); |
291 retValue = KNullDesC().AllocLC(); |
292 } |
292 } |
293 TRACE( T_LIT("CVIMPSTEngineSessionCntxtObserver::UriFromXimpOperationLC end")); |
|
294 return retValue; |
293 return retValue; |
295 } |
294 } |
296 |
295 |
297 // --------------------------------------------------------------------------- |
296 // --------------------------------------------------------------------------- |
298 // CVIMPSTEngineSessionCntxtObserver::DoHandlePresenceContextEventL |
297 // CVIMPSTEngineSessionCntxtObserver::DoHandlePresenceContextEventL |
300 // |
299 // |
301 void CVIMPSTEngineSessionCntxtObserver::DoHandlePresenceContextEventL( |
300 void CVIMPSTEngineSessionCntxtObserver::DoHandlePresenceContextEventL( |
302 const MXIMPContext& aContext, |
301 const MXIMPContext& aContext, |
303 const MXIMPBase& aEvent ) |
302 const MXIMPBase& aEvent ) |
304 { |
303 { |
305 TRACE( T_LIT("CVIMPSTEngineSessionCntxtObserver::DoHandlePresenceContextEventL start")); |
304 TRACER_AUTO; |
306 const TInt32 eventId = aEvent.GetInterfaceId(); |
305 const TInt32 eventId = aEvent.GetInterfaceId(); |
307 |
306 |
308 switch( aEvent.GetInterfaceId() ) |
307 switch( aEvent.GetInterfaceId() ) |
309 { |
308 { |
310 case MXIMPRequestCompleteEvent::KInterfaceId: |
309 case MXIMPRequestCompleteEvent::KInterfaceId: |
311 { |
310 { |
312 |
311 |
313 TRACE( T_LIT("InsideCallbackswitch::MXIMPRequestCompleteEvent start")); |
312 TRACE( "InsideCallbackswitch::MXIMPRequestCompleteEvent start"); |
314 const MXIMPRequestCompleteEvent* event = |
313 const MXIMPRequestCompleteEvent* event = |
315 TXIMPGetInterface< const MXIMPRequestCompleteEvent >::From( |
314 TXIMPGetInterface< const MXIMPRequestCompleteEvent >::From( |
316 aEvent, MXIMPBase::EPanicIfUnknown ); |
315 aEvent, MXIMPBase::EPanicIfUnknown ); |
317 |
316 |
318 iReqResult = event->CompletionResult().ResultCode(); |
317 iReqResult = event->CompletionResult().ResultCode(); |
343 iObserverArray[i]->HandleSessionContextEventL(aContext, |
342 iObserverArray[i]->HandleSessionContextEventL(aContext, |
344 aEvent, |
343 aEvent, |
345 operation); |
344 operation); |
346 } |
345 } |
347 } |
346 } |
348 TRACE( T_LIT("InsideCallbackswitch::MXIMPRequestCompleteEvent end")); |
347 TRACE("InsideCallbackswitch::MXIMPRequestCompleteEvent end"); |
349 break; |
348 break; |
350 } |
349 } |
351 |
350 |
352 case MXIMPContextStateEvent::KInterfaceId: |
351 case MXIMPContextStateEvent::KInterfaceId: |
353 { |
352 { |
354 TRACE( T_LIT("InsideCallbackswitch::MXIMPContextStateEvent")); |
353 TRACE( "InsideCallbackswitch::MXIMPContextStateEvent"); |
355 break; |
354 break; |
356 } |
355 } |
357 case MPresentityPresenceEvent::KInterfaceId: |
356 case MPresentityPresenceEvent::KInterfaceId: |
358 { |
357 { |
359 TRACE( T_LIT("InsideCallbackswitch::::MPresentityPresenceEvent start")); |
358 TRACE( "InsideCallbackswitch::::MPresentityPresenceEvent start"); |
360 TInt count = iObserverArray.Count(); |
359 TInt count = iObserverArray.Count(); |
361 for(TInt i = 0; i < count; i++) |
360 for(TInt i = 0; i < count; i++) |
362 { |
361 { |
363 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
362 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
364 } |
363 } |
365 TRACE( T_LIT("InsideCallbackswitch::::MPresentityPresenceEvent end")); |
364 TRACE( "InsideCallbackswitch::::MPresentityPresenceEvent end"); |
366 break; |
365 break; |
367 } |
366 } |
368 case MPresentityGroupContentEvent::KInterfaceId: |
367 case MPresentityGroupContentEvent::KInterfaceId: |
369 { |
368 { |
370 TRACE( T_LIT("InsideCallbackswitch::::MPresentityGroupContentEvent start")); |
369 TRACE( "InsideCallbackswitch::::MPresentityGroupContentEvent start"); |
371 TInt count = iObserverArray.Count(); |
370 TInt count = iObserverArray.Count(); |
372 for(TInt i = 0; i < count; i++) |
371 for(TInt i = 0; i < count; i++) |
373 { |
372 { |
374 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
373 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
375 } |
374 } |
376 TRACE( T_LIT("InsideCallbackswitch::::MPresentityGroupContentEvent end")); |
375 TRACE( "InsideCallbackswitch::::MPresentityGroupContentEvent end"); |
377 break; |
376 break; |
378 } |
377 } |
379 case MPresenceGrantRequestListEvent::KInterfaceId: |
378 case MPresenceGrantRequestListEvent::KInterfaceId: |
380 { |
379 { |
381 TRACE( T_LIT("InsideCallbackswitch::::MPresentityGroupContentEvent start")); |
380 TRACE("InsideCallbackswitch::::MPresenceGrantRequestListEvent start"); |
382 TInt count = iObserverArray.Count(); |
381 TInt count = iObserverArray.Count(); |
383 for(TInt i = 0; i < count; i++) |
382 for(TInt i = 0; i < count; i++) |
384 { |
383 { |
385 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
384 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
386 } |
385 } |
387 TRACE( T_LIT("InsideCallbackswitch::::MPresentityGroupContentEvent end")); |
386 TRACE( "InsideCallbackswitch::::MPresenceGrantRequestListEvent end"); |
388 break; |
387 break; |
389 } |
388 } |
390 |
389 |
391 case MSearchEvent::KInterfaceId: |
390 case MSearchEvent::KInterfaceId: |
392 { |
391 { |
393 TRACE( T_LIT("InsideCallbackswitch::::MSearchEvent start")); |
392 TRACE( "InsideCallbackswitch::::MSearchEvent start"); |
394 |
393 |
395 TInt count = iObserverArray.Count(); |
394 TInt count = iObserverArray.Count(); |
396 for(TInt i = 0; i < count; i++) |
395 for(TInt i = 0; i < count; i++) |
397 { |
396 { |
398 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
397 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
399 } |
398 } |
400 TRACE( T_LIT("InsideCallbackswitch::::MSearchEvent end")); |
399 TRACE( "InsideCallbackswitch::::MSearchEvent end"); |
401 |
400 |
402 break; |
401 break; |
403 } |
402 } |
404 case MSearchKeysEvent::KInterfaceId: |
403 case MSearchKeysEvent::KInterfaceId: |
405 { |
404 { |
406 TRACE( T_LIT("InsideCallbackswitch::::MSearchKeysEvent start")); |
405 TRACE( "InsideCallbackswitch::::MSearchKeysEvent start"); |
407 TInt count = iObserverArray.Count(); |
406 TInt count = iObserverArray.Count(); |
408 for(TInt i = 0; i < count; i++) |
407 for(TInt i = 0; i < count; i++) |
409 { |
408 { |
410 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
409 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
411 } |
410 } |
412 TRACE( T_LIT("InsideCallbackswitch::::MSearchKeysEvent end")); |
411 TRACE( "InsideCallbackswitch::::MSearchKeysEvent end"); |
413 |
412 |
414 break; |
413 break; |
415 } |
414 } |
416 case MPresenceBlockListEvent::KInterfaceId: |
415 case MPresenceBlockListEvent::KInterfaceId: |
417 { |
416 { |
418 TRACE( T_LIT("InsideCallbackswitch::::MPresenceBlockListEvent start")); |
417 TRACE( "InsideCallbackswitch::::MPresenceBlockListEvent start"); |
419 TInt count = iObserverArray.Count(); |
418 TInt count = iObserverArray.Count(); |
420 for(TInt i = 0; i < count; i++) |
419 for(TInt i = 0; i < count; i++) |
421 { |
420 { |
422 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
421 iObserverArray[i]->HandleSessionContextEventL(aContext,aEvent); |
423 } |
422 } |
424 TRACE( T_LIT("InsideCallbackswitch::::MPresenceBlockListEvent end")); |
423 TRACE( "InsideCallbackswitch::::MPresenceBlockListEvent end"); |
425 break; |
424 break; |
426 } |
425 } |
427 |
426 |
428 default: |
427 default: |
429 { |
428 { |
430 break; |
429 break; |
431 } |
430 } |
432 } |
431 } |
433 TRACE( T_LIT("CVIMPSTEngineSessionCntxtObserver::DoHandlePresenceContextEventL end")); |
|
434 } |
432 } |
435 // --------------------------------------------------------------------------- |
433 // --------------------------------------------------------------------------- |
436 // CVIMPSTEngineSessionCntxtObserver::XimpAuthorizationL |
434 // CVIMPSTEngineSessionCntxtObserver::XimpAuthorizationL |
437 // --------------------------------------------------------------------------- |
435 // --------------------------------------------------------------------------- |
438 // |
436 // |
439 MPresenceAuthorization& |
437 MPresenceAuthorization& |
440 CVIMPSTEngineSessionCntxtObserver::XimpAuthorizationL() |
438 CVIMPSTEngineSessionCntxtObserver::XimpAuthorizationL() |
441 { |
439 { |
|
440 TRACER_AUTO; |
442 __ASSERT_ALWAYS( iFeatures, User::Leave( KErrNotSupported )); |
441 __ASSERT_ALWAYS( iFeatures, User::Leave( KErrNotSupported )); |
443 __ASSERT_ALWAYS( &iFeatures->PresenceAuthorization(), |
442 __ASSERT_ALWAYS( &iFeatures->PresenceAuthorization(), |
444 User::Leave( KErrNotSupported )); |
443 User::Leave( KErrNotSupported )); |
445 return iFeatures->PresenceAuthorization(); |
444 return iFeatures->PresenceAuthorization(); |
446 } |
445 } |