libraries/iosrv/client/command_base.cpp
changeset 6 96d581d2147d
parent 0 7f656887cf89
child 23 092bcc217d9d
equal deleted inserted replaced
5:9c58252c6740 6:96d581d2147d
  3065 void CCommandBase::FormatErrorText(TDes& aDes, TInt aError, TRefByValue<const TDesC> aFmt, VA_LIST& aList) const
  3065 void CCommandBase::FormatErrorText(TDes& aDes, TInt aError, TRefByValue<const TDesC> aFmt, VA_LIST& aList) const
  3066 	{
  3066 	{
  3067 	TOverflowTruncate overflow;
  3067 	TOverflowTruncate overflow;
  3068 	aDes = _L("Error: ");
  3068 	aDes = _L("Error: ");
  3069 	aDes.AppendFormatList(aFmt, aList, &overflow);
  3069 	aDes.AppendFormatList(aFmt, aList, &overflow);
  3070 	aDes.AppendFormat(_L(" : %S (%d)\r\n"), &overflow, Stringify::Error(aError), aError);
  3070 	const TDesC* errorDesc = NULL;
       
  3071 	// See if we have an extension that knows about this error
       
  3072 	if (iExtension) errorDesc = iExtension->StringifyError(aError);
       
  3073 	// If the extension didn't know, fall back to Stringify::Error() to handle the system ones
       
  3074 	if (errorDesc == NULL) errorDesc = Stringify::Error(aError);
       
  3075 	aDes.AppendFormat(_L(" : %S (%d)\r\n"), &overflow, errorDesc, aError);
  3071 	}
  3076 	}
  3072 
  3077 
  3073 void CCommandBase::FormatWarningText(TDes& aDes, TRefByValue<const TDesC> aFmt, VA_LIST& aList) const
  3078 void CCommandBase::FormatWarningText(TDes& aDes, TRefByValue<const TDesC> aFmt, VA_LIST& aList) const
  3074 	{
  3079 	{
  3075 	TOverflowTruncate overflow;
  3080 	TOverflowTruncate overflow;
  3833 void CReaderChangeNotifier::DoCancel()
  3838 void CReaderChangeNotifier::DoCancel()
  3834 	{
  3839 	{
  3835 	iReadHandle.CancelNotifyChange();
  3840 	iReadHandle.CancelNotifyChange();
  3836 	}
  3841 	}
  3837 
  3842 
  3838 	
  3843 // 
       
  3844 
       
  3845 EXPORT_C TCommandExtensionVersion MCommandExtensionsV1::ExtensionVersion() const
       
  3846 	{
       
  3847 	return ECommandExtensionV1;
       
  3848 	}
       
  3849 
       
  3850 EXPORT_C const TDesC* MCommandExtensionsV1::StringifyError(TInt /*aError*/) const
       
  3851 	{
       
  3852 	return NULL; // By default we don't have anything additional
       
  3853 	}
       
  3854 
       
  3855 EXPORT_C void CCommandBase::SetExtension(MCommandExtensionsV1* aExtension)
       
  3856 	{
       
  3857 	iExtension = aExtension;
       
  3858 	}