equal
deleted
inserted
replaced
858 iAsyncCallback->MatoPrepareComplete(error); |
858 iAsyncCallback->MatoPrepareComplete(error); |
859 } |
859 } |
860 |
860 |
861 void CMMFMdaAudioToneUtility::CancelPrepare() |
861 void CMMFMdaAudioToneUtility::CancelPrepare() |
862 { |
862 { |
863 // FIXME - do we need to cancel the callback? What if the callback is actually calling back another error? Probably best not to cancel... |
863 // xxx - do we need to cancel the callback? What if the callback is actually calling back another error? Probably best not to cancel... |
864 delete iToneConfig; |
864 delete iToneConfig; |
865 iToneConfig = NULL; |
865 iToneConfig = NULL; |
866 |
866 |
867 if (iState == EMdaAudioToneUtilityPrepared) |
867 if (iState == EMdaAudioToneUtilityPrepared) |
868 { |
868 { |
1035 iState = EMdaAudioToneUtilityNotReady; |
1035 iState = EMdaAudioToneUtilityNotReady; |
1036 iAsyncCallback->MatoPlayComplete(error); |
1036 iAsyncCallback->MatoPlayComplete(error); |
1037 } |
1037 } |
1038 else |
1038 else |
1039 { |
1039 { |
1040 if(iPlayStartObserver) |
1040 iAsyncCallback->MatoPlayStarted(KErrNone); |
1041 { |
|
1042 iAsyncCallback->MatoPlayStarted(KErrNone); |
|
1043 } |
|
1044 } |
1041 } |
1045 } |
1042 } |
1046 |
1043 |
1047 void CMMFMdaAudioToneUtility::CancelPlay() |
1044 void CMMFMdaAudioToneUtility::CancelPlay() |
1048 { |
1045 { |
1140 User::RequestComplete(s, KErrNone); |
1137 User::RequestComplete(s, KErrNone); |
1141 } |
1138 } |
1142 |
1139 |
1143 void CMMFMdaAudioToneObserverCallback::MatoPlayComplete(TInt aError) |
1140 void CMMFMdaAudioToneObserverCallback::MatoPlayComplete(TInt aError) |
1144 { |
1141 { |
1145 if(!IsActive()) |
1142 iAction = EPlayComplete; |
1146 { |
1143 iErrorCode = aError; |
1147 iAction = EPlayComplete; |
1144 |
1148 iErrorCode = aError; |
1145 TRequestStatus* s = &iStatus; |
1149 |
1146 SetActive(); |
1150 TRequestStatus* s = &iStatus; |
1147 User::RequestComplete(s, KErrNone); |
1151 SetActive(); |
|
1152 User::RequestComplete(s, KErrNone); |
|
1153 } |
|
1154 } |
1148 } |
1155 |
1149 |
1156 void CMMFMdaAudioToneObserverCallback::MatoPlayStarted(TInt aError) |
1150 void CMMFMdaAudioToneObserverCallback::MatoPlayStarted(TInt aError) |
1157 { |
1151 { |
1158 iAction = EPlayStarted; |
1152 iAction = EPlayStarted; |