288 } |
288 } |
289 case KQueryIMSI: |
289 case KQueryIMSI: |
290 { |
290 { |
291 TBuf8<RMobilePhone::KIMSISize> buf; |
291 TBuf8<RMobilePhone::KIMSISize> buf; |
292 buf.Copy(iId); |
292 buf.Copy(iId); |
293 CATResult* cimi = CATResult::NewLC(EATCIMI, EATReadResult, TATParam(buf)); |
293 CATResult* cimi = CATResult::NewLC(EATCIMI, EATActionResult, TATParam(buf)); |
294 SendResponseL(*cimi); |
294 SendResponseL(*cimi); |
295 CleanupStack::PopAndDestroy(cimi); |
295 CleanupStack::PopAndDestroy(cimi); |
296 CATResult* ok = CATResult::NewLC(EATOK); |
296 CATResult* ok = CATResult::NewLC(EATOK); |
297 SendResponseL(*ok); |
297 SendResponseL(*ok); |
298 CleanupStack::PopAndDestroy(ok); |
298 CleanupStack::PopAndDestroy(ok); |
787 default: |
787 default: |
788 TRACE_INFO(_L("Error: default in CREG")); |
788 TRACE_INFO(_L("Error: default in CREG")); |
789 break; |
789 break; |
790 }; |
790 }; |
791 break; |
791 break; |
792 } |
792 } |
793 case EATCSQ: |
|
794 { |
|
795 TRACE_INFO(_L("Requesting Signal strength")); |
|
796 LEAVE_IF_ERROR(params.Append(TATParam(iPhoneStatus->GetRssiStrength()))) |
|
797 LEAVE_IF_ERROR(params.Append(TATParam(KBerUnknown))) |
|
798 code = CATResult::NewL(EATCSQ, EATReadResult, ¶ms); |
|
799 TRACE_INFO(_L("done")); |
|
800 break; |
|
801 } |
|
802 |
|
803 case EATCGSN: |
|
804 { |
|
805 TBuf8<RMobilePhone::KPhoneSerialNumberSize> buf; |
|
806 buf.Copy(iIdentity.iSerialNumber); |
|
807 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
|
808 code = CATResult::NewL(EATCGSN, EATReadResult, ¶ms); |
|
809 break; |
|
810 } |
|
811 case EATCGMI: |
|
812 { |
|
813 TBuf8<RMobilePhone::KPhoneManufacturerIdSize> buf; |
|
814 buf.Copy(iIdentity.iManufacturer); |
|
815 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
|
816 code = CATResult::NewL(EATCGMI, EATReadResult, ¶ms); |
|
817 break; |
|
818 } |
|
819 case EATCGMM: |
|
820 { |
|
821 TBuf8<RMobilePhone::KPhoneModelIdSize> buf; |
|
822 buf.Copy(iIdentity.iModel); |
|
823 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
|
824 code = CATResult::NewL(EATCGMM, EATReadResult, ¶ms); |
|
825 break; |
|
826 } |
|
827 case EATCGMR: |
|
828 { |
|
829 TBuf8<RMobilePhone::KPhoneRevisionIdSize> buf; |
|
830 buf.Copy(iIdentity.iRevision); |
|
831 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
|
832 code = CATResult::NewL(EATCGMR, EATReadResult, ¶ms); |
|
833 break; |
|
834 } |
|
835 case EATCIMI: |
|
836 { |
|
837 iEtelQuery->SetServiceId(KQueryIMSI); |
|
838 iPhone.GetSubscriberId(iEtelQuery->iStatus, iId); |
|
839 iEtelQuery->GoActive(); |
|
840 break; |
|
841 } |
|
842 case EATCOLP: |
793 case EATCOLP: |
843 { |
794 { |
844 LEAVE_IF_ERROR(params.Append(TATParam(TInt(iProtocolStatus->iOutgoingCallNotif)))) |
795 LEAVE_IF_ERROR(params.Append(TATParam(TInt(iProtocolStatus->iOutgoingCallNotif)))) |
845 code = CATResult::NewL(EATCOLP, EATReadResult, ¶ms); |
796 code = CATResult::NewL(EATCOLP, EATReadResult, ¶ms); |
846 break; |
797 break; |
1038 // ----------------------------------------------------------------------------- |
989 // ----------------------------------------------------------------------------- |
1039 // |
990 // |
1040 void CBtmcProtocol::HandleActionCommandL(const CATCommand& aCmd) |
991 void CBtmcProtocol::HandleActionCommandL(const CATCommand& aCmd) |
1041 { |
992 { |
1042 TRACE_FUNC |
993 TRACE_FUNC |
1043 |
994 RATResultPtrArray resarr; |
|
995 ATObjArrayCleanupResetAndDestroyPushL(resarr); |
|
996 CATResult* code = NULL; |
|
997 RATParamArray params; |
|
998 CleanupClosePushL(params); |
1044 switch (aCmd.Id()) |
999 switch (aCmd.Id()) |
1045 { |
1000 { |
1046 case EATCNUM: |
1001 case EATCNUM: |
1047 { |
1002 { |
1048 iNumber = CBtmcNumber::NewL(*this, *this, CActive::EPriorityStandard, KServiceGetSubscriber); |
1003 iNumber = CBtmcNumber::NewL(*this, *this, CActive::EPriorityStandard, KServiceGetSubscriber); |
1052 case EATCLCC: |
1007 case EATCLCC: |
1053 { |
1008 { |
1054 iCallStatus->HandleClccL(); |
1009 iCallStatus->HandleClccL(); |
1055 break; |
1010 break; |
1056 } |
1011 } |
|
1012 case EATCSQ: |
|
1013 { |
|
1014 TRACE_INFO(_L("Requesting Signal strength")); |
|
1015 LEAVE_IF_ERROR(params.Append(TATParam(iPhoneStatus->GetRssiStrength()))) |
|
1016 LEAVE_IF_ERROR(params.Append(TATParam(KBerUnknown))) |
|
1017 code = CATResult::NewL(EATCSQ, EATActionResult, ¶ms); |
|
1018 TRACE_INFO(_L("done")); |
|
1019 break; |
|
1020 } |
|
1021 case EATCGMI: |
|
1022 { |
|
1023 TBuf8<RMobilePhone::KPhoneManufacturerIdSize> buf; |
|
1024 buf.Copy(iIdentity.iManufacturer); |
|
1025 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
|
1026 code = CATResult::NewL(EATCGMI, EATActionResult, ¶ms); |
|
1027 break; |
|
1028 } |
|
1029 case EATCGMM: |
|
1030 { |
|
1031 TBuf8<RMobilePhone::KPhoneModelIdSize> buf; |
|
1032 buf.Copy(iIdentity.iModel); |
|
1033 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
|
1034 code = CATResult::NewL(EATCGMM, EATActionResult, ¶ms); |
|
1035 break; |
|
1036 } |
|
1037 case EATCGMR: |
|
1038 { |
|
1039 TBuf8<RMobilePhone::KPhoneRevisionIdSize> buf; |
|
1040 buf.Copy(iIdentity.iRevision); |
|
1041 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
|
1042 code = CATResult::NewL(EATCGMR, EATActionResult, ¶ms); |
|
1043 break; |
|
1044 } |
|
1045 case EATCIMI: |
|
1046 { |
|
1047 iEtelQuery->SetServiceId(KQueryIMSI); |
|
1048 iPhone.GetSubscriberId(iEtelQuery->iStatus, iId); |
|
1049 iEtelQuery->GoActive(); |
|
1050 break; |
|
1051 } |
1057 case EATCGSN: |
1052 case EATCGSN: |
1058 { |
1053 { |
1059 CATResult* code = NULL; |
|
1060 RATResultPtrArray resarr; |
|
1061 ATObjArrayCleanupResetAndDestroyPushL(resarr); |
|
1062 RATParamArray params; |
|
1063 CleanupClosePushL(params); |
|
1064 TBuf8<RMobilePhone::KPhoneSerialNumberSize> buf; |
1054 TBuf8<RMobilePhone::KPhoneSerialNumberSize> buf; |
1065 buf.Copy(iIdentity.iSerialNumber); |
1055 buf.Copy(iIdentity.iSerialNumber); |
1066 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
1056 LEAVE_IF_ERROR(params.Append(TATParam(buf))) |
1067 code = CATResult::NewL(EATCGSN, EATActionResult, ¶ms); |
1057 code = CATResult::NewL(EATCGSN, EATActionResult, ¶ms); |
1068 CleanupStack::PopAndDestroy(¶ms); |
|
1069 CleanupStack::PushL(code); |
|
1070 resarr.AppendL(code); |
|
1071 CleanupStack::Pop(code); |
|
1072 CATResult* ok = CATResult::NewL(EATOK); |
|
1073 CleanupStack::PushL(ok); |
|
1074 resarr.AppendL(ok); |
|
1075 CleanupStack::Pop(ok); |
|
1076 SendResponseL(resarr); |
|
1077 CleanupStack::PopAndDestroy(&resarr); |
|
1078 CmdHandlingCompletedL(); |
|
1079 break; |
1058 break; |
1080 } |
1059 } |
1081 default: |
1060 default: |
1082 LEAVE(KErrNotSupported); |
1061 LEAVE(KErrNotSupported); |
1083 } |
1062 } |
|
1063 CleanupStack::PopAndDestroy(¶ms); |
|
1064 if (code) |
|
1065 { |
|
1066 CleanupStack::PushL(code); |
|
1067 resarr.AppendL(code); |
|
1068 CleanupStack::Pop(code); |
|
1069 CATResult* ok = CATResult::NewL(EATOK); |
|
1070 CleanupStack::PushL(ok); |
|
1071 resarr.AppendL(ok); |
|
1072 CleanupStack::Pop(ok); |
|
1073 SendResponseL(resarr); |
|
1074 CmdHandlingCompletedL(); |
|
1075 } |
|
1076 CleanupStack::PopAndDestroy(&resarr); |
1084 } |
1077 } |
1085 |
1078 |
1086 void CBtmcProtocol::DoSendProtocolDataL() |
1079 void CBtmcProtocol::DoSendProtocolDataL() |
1087 { |
1080 { |
1088 TRACE_INFO((_L("credit %d"), iCredit)) |
1081 TRACE_INFO((_L("credit %d"), iCredit)) |