243 iHSDPADisabledInPp = EFalse; |
243 iHSDPADisabledInPp = EFalse; |
244 iEmergencyTimer.ConstructL(); |
244 iEmergencyTimer.ConstructL(); |
245 // Read "HSDPA Disabled" status from product profile |
245 // Read "HSDPA Disabled" status from product profile |
246 InfoPpDataReadReq(); |
246 InfoPpDataReadReq(); |
247 |
247 |
248 iCallOperationID = CSD_CALL_CREATE; |
|
249 iVideoCallReleased = EFalse; |
|
250 iCallControlCallId = CALL_MODEM_ID_NONE; |
248 iCallControlCallId = CALL_MODEM_ID_NONE; |
251 iCcResult = KCcResultAllowedNoModification; |
249 iCcResult = KCcResultAllowedNoModification; |
252 iResourceControlSuppress = EFalse; |
250 iResourceControlSuppress = EFalse; |
253 } |
251 } |
254 |
252 |
287 GPDS_CONTEXTS_CLEAR_RESP ); |
285 GPDS_CONTEXTS_CLEAR_RESP ); |
288 |
286 |
289 aPhoNetReceiver->RegisterL( callMessHandler, PN_CSD ); |
287 aPhoNetReceiver->RegisterL( callMessHandler, PN_CSD ); |
290 |
288 |
291 aPhoNetReceiver->RegisterL( callMessHandler, PN_PIPE, PNS_PIPE_CREATE_RESP ); |
289 aPhoNetReceiver->RegisterL( callMessHandler, PN_PIPE, PNS_PIPE_CREATE_RESP ); |
292 aPhoNetReceiver->RegisterL( callMessHandler, PN_PIPE, PNS_PIPE_REMOVE_RESP ); |
|
293 |
290 |
294 callMessHandler->iDtmfMessHandler = aDtmfMessHandler; |
291 callMessHandler->iDtmfMessHandler = aDtmfMessHandler; |
295 CleanupStack::Pop( callMessHandler ); |
292 CleanupStack::Pop( callMessHandler ); |
296 |
293 |
297 return callMessHandler; |
294 return callMessHandler; |
304 // |
301 // |
305 CMmCallMessHandler::~CMmCallMessHandler() |
302 CMmCallMessHandler::~CMmCallMessHandler() |
306 { |
303 { |
307 TFLOGSTRING("TSY: CMmCallMessHandler::~CMmCallMessHandler"); |
304 TFLOGSTRING("TSY: CMmCallMessHandler::~CMmCallMessHandler"); |
308 OstTrace0( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_CMMCALLMESSHANDLER, "CMmCallMessHandler::~CMmCallMessHandler" ); |
305 OstTrace0( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_CMMCALLMESSHANDLER, "CMmCallMessHandler::~CMmCallMessHandler" ); |
|
306 |
|
307 if ( KInvalidPipeHandle != iPipeHandle ) |
|
308 { |
|
309 // error ignored |
|
310 PnsPipeRemoveReq(); |
|
311 } |
309 |
312 |
310 if ( iDataPortHandler ) |
313 if ( iDataPortHandler ) |
311 { |
314 { |
312 delete iDataPortHandler; |
315 delete iDataPortHandler; |
313 } |
316 } |
486 switch( messageId ) |
489 switch( messageId ) |
487 { |
490 { |
488 case PNS_PIPE_CREATE_RESP: |
491 case PNS_PIPE_CREATE_RESP: |
489 { |
492 { |
490 PnsPipeCreateResp( aIsiMessage ); |
493 PnsPipeCreateResp( aIsiMessage ); |
491 break; |
|
492 } |
|
493 case PNS_PIPE_REMOVE_RESP: |
|
494 { |
|
495 PnsPipeRemoveResp( aIsiMessage ); |
|
496 break; |
494 break; |
497 } |
495 } |
498 default: |
496 default: |
499 { |
497 { |
500 TFLOGSTRING("TSY: CMmCallMessHandler::ReceiveMessageL, switch resource - case PN_PIPE, switch messageId - default.\n" ); |
498 TFLOGSTRING("TSY: CMmCallMessHandler::ReceiveMessageL, switch resource - case PN_PIPE, switch messageId - default.\n" ); |
3314 else if ( CALL_MODEM_STATUS_MT_ALERTING == callStatusISA ) |
3312 else if ( CALL_MODEM_STATUS_MT_ALERTING == callStatusISA ) |
3315 { |
3313 { |
3316 iCallDirection = RMobileCall::EMobileTerminated; |
3314 iCallDirection = RMobileCall::EMobileTerminated; |
3317 } |
3315 } |
3318 |
3316 |
3319 // Check if Video Call is MT Released. |
|
3320 // Pipe have to remove to make next call possible. |
|
3321 // Have to wait that Csd videoCall is disconnected. |
|
3322 if ( CALL_MODEM_STATUS_MT_RELEASE == callStatusISA || |
|
3323 CALL_MODEM_STATUS_MO_RELEASE == callStatusISA ) |
|
3324 { |
|
3325 iVideoCallReleased = ETrue; |
|
3326 } |
|
3327 |
|
3328 // Read call mode |
3317 // Read call mode |
3329 if ( KErrNone == aIsiMessage.FindSubBlockOffsetById( |
3318 if ( KErrNone == aIsiMessage.FindSubBlockOffsetById( |
3330 ISI_HEADER_SIZE + CALL_MODEM_STATUS_IND_OFFSET_MODE, |
3319 ISI_HEADER_SIZE + CALL_MODEM_STATUS_IND_OFFSET_MODE, |
3331 CALL_MODEM_SB_MODE, |
3320 CALL_MODEM_SB_MODE, |
3332 EIsiSubBlockTypeId8Len8, |
3321 EIsiSubBlockTypeId8Len8, |
4583 OstTrace0( TRACE_NORMAL, CMMCALLMESSHANDLER_INITIALIZEDATAPORTL, "CMmCallMessHandler::InitializeDataportL" ); |
4572 OstTrace0( TRACE_NORMAL, CMMCALLMESSHANDLER_INITIALIZEDATAPORTL, "CMmCallMessHandler::InitializeDataportL" ); |
4584 |
4573 |
4585 // SIM is ready, start dataport handling |
4574 // SIM is ready, start dataport handling |
4586 if ( !iDataPortHandler ) |
4575 if ( !iDataPortHandler ) |
4587 { |
4576 { |
4588 TFLOGSTRING("NTSY: CMmCallMessHandler::InitializeDataportL - Start dataport handling"); |
4577 TFLOGSTRING("NTSY: CMmCallMessHandler::InitializeDataportL - Create pipe for videotelephony"); |
4589 OstTrace0( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_INITIALIZEDATAPORTL, "CMmCallMessHandler::InitializeDataportL - Start dataport handling" ); |
4578 OstTrace0( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_INITIALIZEDATAPORTL, "CMmCallMessHandler::InitializeDataportL - Create pipe for videotelephony" ); |
4590 // Deleted in CMmCallMessHandler::~CMmCallMessHandler() |
|
4591 iDataPortHandler = CMmDataPortHandler::NewL( iMessageRouter ); |
4579 iDataPortHandler = CMmDataPortHandler::NewL( iMessageRouter ); |
|
4580 User::LeaveIfError( PnsPipeCreateReq( PN_PIPE_ENABLE ) ); |
4592 } |
4581 } |
4593 } |
4582 } |
4594 |
4583 |
4595 // ----------------------------------------------------------------------------- |
4584 // ----------------------------------------------------------------------------- |
4596 // CMmCallMessHandler::ActivateUUS() |
4585 // CMmCallMessHandler::ActivateUUS() |
5262 OstTrace0( TRACE_NORMAL, DUP3_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd: MT call connected" ); |
5251 OstTrace0( TRACE_NORMAL, DUP3_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd: MT call connected" ); |
5263 iMessageRouter->Complete( |
5252 iMessageRouter->Complete( |
5264 EEtelCallAnswer, &callData, KErrNone ); |
5253 EEtelCallAnswer, &callData, KErrNone ); |
5265 } |
5254 } |
5266 } |
5255 } |
5267 else |
5256 // no else |
5268 { |
5257 |
5269 // MO/MT video call released. we have to remove pipe. |
|
5270 if ( iVideoCallReleased ) |
|
5271 { |
|
5272 TFLOGSTRING("TSY: CMmCallMessHandler::CsdVideoCallStatusInd: call MO/MT released"); |
|
5273 OstTrace0( TRACE_NORMAL, DUP4_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd: call MO/MT released" ); |
|
5274 //Remove Pipe for wideo telephony |
|
5275 PnsPipeRemoveReq(); |
|
5276 iVideoCallReleased = EFalse; |
|
5277 } |
|
5278 } |
|
5279 // CSD_VIDEO_CALL_STATUS_DISCONNECT arrives also when call establishment |
5258 // CSD_VIDEO_CALL_STATUS_DISCONNECT arrives also when call establishment |
5280 // fails |
5259 // fails |
5281 // reset call direction to avoid further unnecessary IPC completions |
5260 // reset call direction to avoid further unnecessary IPC completions |
5282 if ( iIsWaitingCall ) |
5261 if ( iIsWaitingCall ) |
5283 { |
5262 { |
5510 |
5489 |
5511 iIdRestrict = recentCallParams.iIdRestrict; |
5490 iIdRestrict = recentCallParams.iIdRestrict; |
5512 iTelNumber = callInfo->iDialledParty.iTelNumber; |
5491 iTelNumber = callInfo->iDialledParty.iTelNumber; |
5513 |
5492 |
5514 // Dial the call |
5493 // Dial the call |
5515 iCallOperationID = CSD_CALL_CREATE; |
|
5516 iCallDirection = RMobileCall::EMobileOriginated; |
5494 iCallDirection = RMobileCall::EMobileOriginated; |
5517 |
5495 CsdCallControlReq( CSD_CALL_CREATE ); |
5518 // Create Pipe for wideo telephony |
|
5519 // If creation succeed, then CsdCallControlReq( CSD_CALL_CREATE ) |
|
5520 // is called on PnsPipeCreateResp() |
|
5521 PnsPipeCreateReq( PN_PIPE_ENABLE ); |
|
5522 } |
5496 } |
5523 else |
5497 else |
5524 { |
5498 { |
5525 ret = KErrArgument; |
5499 ret = KErrArgument; |
5526 } |
5500 } |
5557 { |
5531 { |
5558 TFLOGSTRING("TSY: CMmCallMessHandler::AnswerIncomingDataCall. Send ATA"); |
5532 TFLOGSTRING("TSY: CMmCallMessHandler::AnswerIncomingDataCall. Send ATA"); |
5559 OstTrace0( TRACE_NORMAL, DUP2_CMMCALLMESSHANDLER_ANSWERINCOMINGDATACALL, "CMmCallMessHandler::AnswerIncomingDataCall, Send ATA" ); |
5533 OstTrace0( TRACE_NORMAL, DUP2_CMMCALLMESSHANDLER_ANSWERINCOMINGDATACALL, "CMmCallMessHandler::AnswerIncomingDataCall, Send ATA" ); |
5560 |
5534 |
5561 // Answer the call |
5535 // Answer the call |
5562 iCallOperationID = CSD_CALL_ANSWER; |
5536 CsdCallControlReq( CSD_CALL_ANSWER ); |
5563 |
|
5564 //Create Pipe for wideo telephony |
|
5565 // If creation succeed, then CsdCallControlReq( CSD_CALL_ANSWER ) |
|
5566 // is called on PnsPipeCreateResp() |
|
5567 PnsPipeCreateReq( PN_PIPE_ENABLE ); |
|
5568 } |
5537 } |
5569 // If we are setting auto answer, the status is unknown |
5538 // If we are setting auto answer, the status is unknown |
5570 else if ( RMobileCall::EStatusIdle >= iMobileCallInfo.iStatus ) |
5539 else if ( RMobileCall::EStatusIdle >= iMobileCallInfo.iStatus ) |
5571 { |
5540 { |
5572 // set status to Idle |
5541 // set status to Idle |
5678 #endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
5647 #endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
5679 |
5648 |
5680 TFLOGSTRING4("TSY: CMmCallMessHandler::PnsPipeCreateResp. TransactionId: %d, PipeHandle: %d, error code: %d", transId, iPipeHandle, errorCode ); |
5649 TFLOGSTRING4("TSY: CMmCallMessHandler::PnsPipeCreateResp. TransactionId: %d, PipeHandle: %d, error code: %d", transId, iPipeHandle, errorCode ); |
5681 OstTraceExt3( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_PNSPIPECREATERESP, "CMmCallMessHandler::PnsPipeCreateResp;transId=%hhu;pipeHandle=%hhu;errorCode=%hhu", transId, iPipeHandle, errorCode ); |
5650 OstTraceExt3( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_PNSPIPECREATERESP, "CMmCallMessHandler::PnsPipeCreateResp;transId=%hhu;pipeHandle=%hhu;errorCode=%hhu", transId, iPipeHandle, errorCode ); |
5682 |
5651 |
5683 if ( PN_PIPE_NO_ERROR == errorCode ) |
5652 if ( PN_PIPE_NO_ERROR != errorCode ) |
5684 { |
5653 { |
5685 // Dial or Answer the call |
5654 delete iDataPortHandler; |
5686 CsdCallControlReq( iCallOperationID ); |
5655 iDataPortHandler = NULL; |
5687 } |
5656 } |
5688 else |
5657 // no else |
5689 { |
5658 } |
5690 CCallDataPackage callData; |
5659 // no else |
5691 // set call id and mode |
|
5692 callData.SetCallIdAndMode( |
|
5693 iMobileCallInfo.iCallId, iMobileCallInfo.iService ); |
|
5694 TInt err = CMmStaticUtility::PacketDataCSCauseToEpocError( |
|
5695 errorCode, PN_PIPE ); |
|
5696 if ( RMobileCall::EMobileTerminated == iCallDirection ) |
|
5697 { |
|
5698 // answering video call fails |
|
5699 iMessageRouter->Complete( |
|
5700 EEtelCallAnswer, |
|
5701 &callData, |
|
5702 err ); |
|
5703 } |
|
5704 else |
|
5705 { |
|
5706 // dialling video call fails |
|
5707 // for MO calls pipe is created before iCallDirection is set |
|
5708 iMessageRouter->Complete( |
|
5709 EEtelCallDial, |
|
5710 &callData, |
|
5711 err ); |
|
5712 } |
|
5713 iCallDirection = RMobileCall::EDirectionUnknown; |
|
5714 } |
|
5715 } |
|
5716 } |
5660 } |
5717 |
5661 |
5718 // ---------------------------------------------------------------------------- |
5662 // ---------------------------------------------------------------------------- |
5719 // CMmCallMessHandler::PnsPipeRemoveReq |
5663 // CMmCallMessHandler::PnsPipeRemoveReq |
5720 // Construct a PNS_PIPE_REMOVE_REQ ISI-message. |
5664 // Construct a PNS_PIPE_REMOVE_REQ ISI-message. |
5722 // |
5666 // |
5723 TInt CMmCallMessHandler::PnsPipeRemoveReq() |
5667 TInt CMmCallMessHandler::PnsPipeRemoveReq() |
5724 { |
5668 { |
5725 TFLOGSTRING2("TSY: CMmCallMessHandler::PnsPipeRemoveReq. PipeHandle: %d", iPipeHandle ); |
5669 TFLOGSTRING2("TSY: CMmCallMessHandler::PnsPipeRemoveReq. PipeHandle: %d", iPipeHandle ); |
5726 OstTraceExt1( TRACE_NORMAL, CMMCALLMESSHANDLER_PNSPIPEREMOVEREQ, "CMmCallMessHandler::PnsPipeRemoveReq;aPipeHandle=%hhu", iPipeHandle ); |
5670 OstTraceExt1( TRACE_NORMAL, CMMCALLMESSHANDLER_PNSPIPEREMOVEREQ, "CMmCallMessHandler::PnsPipeRemoveReq;aPipeHandle=%hhu", iPipeHandle ); |
|
5671 |
|
5672 iPipeHandle = KInvalidPipeHandle; |
5727 |
5673 |
5728 // Create buffer for isi msg data |
5674 // Create buffer for isi msg data |
5729 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
5675 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
5730 TBuf8<SIZE_PNS_PIPE_REMOVE_REQ> data; |
5676 TBuf8<SIZE_PNS_PIPE_REMOVE_REQ> data; |
5731 #else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
5677 #else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
5741 KPipeTransID, |
5687 KPipeTransID, |
5742 PNS_PIPE_REMOVE_REQ, |
5688 PNS_PIPE_REMOVE_REQ, |
5743 data ); |
5689 data ); |
5744 } |
5690 } |
5745 |
5691 |
5746 // ---------------------------------------------------------------------------- |
|
5747 // CMmCallMessHandler::PnsPipeRemoveResp |
|
5748 // Breaks a PNS_PIPE_REMOVE_RESP ISI-message. |
|
5749 // ---------------------------------------------------------------------------- |
|
5750 // |
|
5751 void CMmCallMessHandler::PnsPipeRemoveResp( |
|
5752 const TIsiReceiveC& aIsiMessage ) |
|
5753 { |
|
5754 TFLOGSTRING("TSY: CMmCallMessHandler::PnsPipeRemoveResp"); |
|
5755 OstTrace0( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_PNSPIPEREMOVERESP, "CMmCallMessHandler::PnsPipeRemoveResp" ); |
|
5756 // Get Transaction Id from the ISI message |
|
5757 TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
5758 |
|
5759 if ( KPipeTransID == transId ) |
|
5760 { |
|
5761 // Get Errorcode from the ISI message |
|
5762 TUint8 errorCode( aIsiMessage.Get8bit( |
|
5763 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
5764 ISI_HEADER_SIZE + PNS_PIPE_REMOVE_RESP_OFFSET_ERRORCODE ) ); |
|
5765 #else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
5766 ISI_HEADER_SIZE + CM_PIPE_REMOVE_RESP_OFFSET_ERRORCODE ) ); |
|
5767 #endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
5768 |
|
5769 TFLOGSTRING4("TSY: CMmCallMessHandler::PnsPipeRemoveResp - traId: %d, PipeHandle: %d, ErrorCode: %d", transId, iPipeHandle, errorCode ); |
|
5770 OstTraceExt3( TRACE_NORMAL, CMMCALLMESSHANDLER_PNSPIPEREMOVERESP, "CMmCallMessHandler::PnsPipeRemoveResp;transId=%hhu;pipeHandle=%hhu;errorCode=%hhu", transId, iPipeHandle, errorCode ); |
|
5771 |
|
5772 iPipeHandle = KInvalidPipeHandle; |
|
5773 } |
|
5774 // no else |
|
5775 } |
|
5776 |
|
5777 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
5692 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
5778 |
5693 |
5779 // None |
5694 // None |
5780 |
5695 |
5781 // End of File |
5696 // End of File |