395 EUNIT_ASSERT ( event2.Code() == EMceResponse ); |
395 EUNIT_ASSERT ( event2.Code() == EMceResponse ); |
396 EUNIT_ASSERT ( iSipSession->PendingTransactions().Count() == 1 ); |
396 EUNIT_ASSERT ( iSipSession->PendingTransactions().Count() == 1 ); |
397 EUNIT_ASSERT ( iSipSession->WaitingMediaCallback() ); |
397 EUNIT_ASSERT ( iSipSession->WaitingMediaCallback() ); |
398 MCE_RESET_STUBS(); |
398 MCE_RESET_STUBS(); |
399 |
399 |
400 // 200 OK while waiting for media callback |
400 // 200 OK while waiting for media callback non early media |
401 iSipSession->iSubState = CMceSipSession::EOffering; |
401 iSipSession->iSubState = CMceSipSession::EOffering; |
402 iStorage->iMediaManagerUpdateStatus = KMceAsync; |
402 iStorage->iMediaManagerUpdateStatus = KMceAsync; |
403 |
403 |
404 TMceStateTransitionEvent event2_1( *iSipSession, EMceResponse ); |
404 TMceStateTransitionEvent event2_1( *iSipSession, EMceResponse ); |
405 iState->EntryL( event2_1 ); |
405 iState->EntryL( event2_1 ); |
409 CMCETls::ENone /*mmsdpaction*/, |
409 CMCETls::ENone /*mmsdpaction*/, |
410 SipStrConsts::EAck /*sentMethod*/, |
410 SipStrConsts::EAck /*sentMethod*/, |
411 KErrNotFound /*sentResponse*/); |
411 KErrNotFound /*sentResponse*/); |
412 |
412 |
413 EUNIT_ASSERT ( iStorage->iAckSent ); |
413 EUNIT_ASSERT ( iStorage->iAckSent ); |
|
414 EUNIT_ASSERT ( event2_1.Code() == EMceResponse ); |
|
415 EUNIT_ASSERT ( iSipSession->PendingTransactions().Count() == 1 ); |
|
416 EUNIT_ASSERT ( iSipSession->WaitingMediaCallback() ); |
|
417 MCE_RESET_STUBS(); |
|
418 |
|
419 // 200 OK while waiting for media callback with early media |
|
420 iSipSession->iSubState = CMceSipSession::EOffering; |
|
421 iStorage->iMediaManagerUpdateStatus = KMceAsync; |
|
422 iState->iLastResponse = KMceSipRinging; |
|
423 MCETestHelper::SetResponseL( |
|
424 *iSipSession->iResponse, |
|
425 KMceSipOK, |
|
426 SipStrConsts::EPhraseOk, |
|
427 ETrue, ETrue, 1 ); |
|
428 |
|
429 TMceStateTransitionEvent event2_2( *iSipSession, EMceResponse ); |
|
430 iState->EntryL( event2_2 ); |
|
431 MCE_ENTRYL_POSTCONDITION |
|
432 |
|
433 MCE_ASSERT_STUBS( CMCETls::ENone /*mmaction*/, |
|
434 CMCETls::ENone /*mmsdpaction*/, |
|
435 SipStrConsts::EEmpty /*sentMethod*/, |
|
436 KErrNotFound /*sentResponse*/); |
|
437 |
|
438 EUNIT_ASSERT ( iStorage->iAckSent == EFalse ); |
414 EUNIT_ASSERT ( event2_1.Code() == EMceResponse ); |
439 EUNIT_ASSERT ( event2_1.Code() == EMceResponse ); |
415 EUNIT_ASSERT ( iSipSession->PendingTransactions().Count() == 1 ); |
440 EUNIT_ASSERT ( iSipSession->PendingTransactions().Count() == 1 ); |
416 EUNIT_ASSERT ( iSipSession->WaitingMediaCallback() ); |
441 EUNIT_ASSERT ( iSipSession->WaitingMediaCallback() ); |
417 MCE_RESET_STUBS(); |
442 MCE_RESET_STUBS(); |
418 |
443 |
608 SipStrConsts::EBye /*sentMethod*/, |
633 SipStrConsts::EBye /*sentMethod*/, |
609 KErrNotFound /*sentResponse*/); |
634 KErrNotFound /*sentResponse*/); |
610 |
635 |
611 EUNIT_ASSERT ( event3_2.Code() == EMceErrorResponse ); |
636 EUNIT_ASSERT ( event3_2.Code() == EMceErrorResponse ); |
612 EUNIT_ASSERT ( iSipSession->PendingTransactions().Count() == 4 ); |
637 EUNIT_ASSERT ( iSipSession->PendingTransactions().Count() == 4 ); |
|
638 MCE_RESET_STUBS(); |
|
639 |
|
640 // KMceSipRequestPending updating |
|
641 iSipSession->iSubState = CMceSipSession::EUpdating; |
|
642 iStorage->iMediaManagerUpdateStatus = KMceAsync; |
|
643 |
|
644 MCETestHelper::ChangeResponseTypeL( |
|
645 *iSipSession->iResponse->ResponseElements(), |
|
646 KMceSipRequestPending, |
|
647 SipStrConsts:: EPhraseBusyHere); |
|
648 |
|
649 TMceStateTransitionEvent event3_4( *iSipSession, EMceErrorResponse ); |
|
650 iState->EntryL( event3_4 ); |
|
651 MCE_ENTRYL_POSTCONDITION_2 |
|
652 MCE_ASSERT_STUBS( CMCETls::ECloseSession /*mmaction*/, |
|
653 CMCETls::ENone /*mmsdpaction*/, |
|
654 SipStrConsts::EBye /*sentMethod*/, |
|
655 KErrNotFound /*sentResponse*/); |
|
656 |
|
657 EUNIT_ASSERT ( event3_4.Code() == EMceErrorResponse ); |
613 MCE_RESET_STUBS(); |
658 MCE_RESET_STUBS(); |
614 |
659 |
615 // KMceSipSessionIntervalTooSmall && dialog state ETerminated |
660 // KMceSipSessionIntervalTooSmall && dialog state ETerminated |
616 iSipSession->Dialog()->Dialog().iState = CSIPDialog::ETerminated; |
661 iSipSession->Dialog()->Dialog().iState = CSIPDialog::ETerminated; |
617 iSipSession->iSubState = CMceSipSession::EOffering; |
662 iSipSession->iSubState = CMceSipSession::EOffering; |
983 CleanupStack::Pop( clitransaction1 ); |
1028 CleanupStack::Pop( clitransaction1 ); |
984 iSipSession->iResponse = clitransaction1; |
1029 iSipSession->iResponse = clitransaction1; |
985 |
1030 |
986 TMceStateTransitionEvent event15( *iSipSession, EMceResponse ); |
1031 TMceStateTransitionEvent event15( *iSipSession, EMceResponse ); |
987 iState->ExitL( event15 ); |
1032 iState->ExitL( event15 ); |
988 EUNIT_ASSERT ( iSipSession->CurrentState().Id() == KMceStateOffering ); |
1033 EUNIT_ASSERT ( iSipSession->CurrentState().Id() == KMceStateOffering ); |
989 |
1034 |
|
1035 // EMceResponse with early media & waiting media call back |
|
1036 CSIPClientTransaction* clitransaction1_1 = |
|
1037 MCETestHelper::ClientTransactionLC( SipStrConsts::EInfo, KMceSipOK, |
|
1038 SipStrConsts::EPhraseOk, ETrue ); |
|
1039 iSipSession->SetPendingTransactionL( clitransaction1_1 ); |
|
1040 CleanupStack::Pop( clitransaction1_1 ); |
|
1041 iSipSession->iResponse = clitransaction1_1; |
|
1042 |
|
1043 TMceStateTransitionEvent event15_1( *iSipSession, EMceResponse ); |
|
1044 iState->iReadyToSendACK = EFalse; |
|
1045 iState->ExitL( event15_1 ); |
|
1046 EUNIT_ASSERT ( iSipSession->CurrentState().Id() == KMceStateOffering ); |
990 |
1047 |
991 //EMceRedirectionResponse |
1048 //EMceRedirectionResponse |
992 CSIPClientTransaction* clitransaction2 = |
1049 CSIPClientTransaction* clitransaction2 = |
993 MCETestHelper::ClientTransactionLC( SipStrConsts::EInfo, KMceSipMovedTemporarily, |
1050 MCETestHelper::ClientTransactionLC( SipStrConsts::EInfo, KMceSipMovedTemporarily, |
994 SipStrConsts::EPhraseOk, ETrue ); |
1051 SipStrConsts::EPhraseOk, ETrue ); |