/** * Notify reset for RMobilePhone::NotifyCipheringIndicatorStatus */ void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCipheringIndicatorStatus( RMobilePhone& aMobilePhone, TEtelRequestBase& aRequestStatus, RMobilePhone::TMobileCallCipheringIndicator& aIndicatorStatus, RMobilePhone::TMobileCallCipheringIndicator aExpectedIndicatorStatus, TInt aWantedStatus ) { // Wait for the request to complete TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort); ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCipheringIndicatorStatus did not complete")) while ( err == KErrNone && aRequestStatus.Int() == KErrNone && aIndicatorStatus != aExpectedIndicatorStatus ) { // Request has completed with incorrect result. Consume any outstanding // Repost notification until timeout or we get the right result. aMobilePhone.NotifyCipheringIndicatorStatus(aRequestStatus, aIndicatorStatus); err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort); } ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCipheringIndicatorStatus Wrong completion status")) ASSERT_EQUALS(aIndicatorStatus, aExpectedIndicatorStatus, _L("RMobilePhone::NotifyCipheringIndicatorStatus Wrong result")) // Cancel request if it is still pending if (aRequestStatus.Int() == KRequestPending) { aRequestStatus.Cancel(); } }