void CTestUtils::GetEventType(TUid aEventType, TDes& rOutput) { switch (aEventType.iUid) { case KLogCallEventType: rOutput = _L("Call"); break; case KLogDataEventType: rOutput = _L("Data"); break; case KLogFaxEventType: rOutput = _L("Fax"); break; case KLogShortMessageEventType: rOutput = _L("SMS"); break; case KLogMailEventType: rOutput = _L("Mail"); break; case KLogTaskSchedulerEventType: rOutput = _L("SchSvr"); break; default: rOutput.Num((TInt) aEventType.iUid); } }
void DegAndMinutesToGeo(const TDesC& aMin, TDes& aInto, TInt aSign) { aInto.Zero(); if (aMin.Compare(_L("0000.0000"))==0 || aMin.Compare(_L("00000.0000"))==0 || aMin.Length()<3) { return; } TInt decpos=aMin.Locate('.'); if (decpos==KErrNotFound || decpos<3) return; TReal deg, min; { TLex lex(aMin.Left(decpos-2)); if (lex.Val(deg)!=KErrNone) { return; } } { TLex lex(aMin.Mid(decpos-2)); if (lex.Val(min)!=KErrNone) { return; } if (deg==TReal(0) && min==TReal(0)) return; min/=TReal(60); } deg+=min; if (deg > TReal(180)) return; deg*=aSign; TRealFormat fmt; fmt.iTriLen=0; fmt.iPoint='.'; fmt.iPlaces=8; fmt.iType=KRealFormatCalculator; aInto.Num(deg, fmt); }
TErrorHandlerResponse CErrorHandlerWithState::HandleError(TDes& aErrorText,TDes& aContextText) { aErrorText.Num(iState); aContextText.Zero(); return(iState? EInfoDisplay: ENoDisplay); }