First public contribution.
2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef __T_ERRORCONVERTER_H__
20 #define __T_ERRORCONVERTER_H__
27 * This class provides useful functions to read and parse the input file.
29 class CErrorConverter : public CBase
32 IMPORT_C static CErrorConverter* NewL(void);
33 IMPORT_C static CErrorConverter* NewLC(void);
34 IMPORT_C virtual ~CErrorConverter();
38 Searches the list of standard error codes (e32err.h 0 to -46) finding the matching error code for the string
41 const TDesC& aResult [IN] - Error code string to be searched from
42 TInt &aError [OUT] - Matching error code if found
45 TBool - True if error code was found, False if it was not
47 IMPORT_C TBool GetExpectedResultL(const TDesC& aResult /*in*/, TInt &aError /*out*/);
49 Searches the list of standard error codes (e32err.h 0 to -46) finding the matching text representaion of the error code
52 TInt &aError [IN] - Error code to return the string of
53 HBufC*& aResult [OUT] -Reference to a pointer, pointing to the error string of the matching error code (Dont forget to free it)
56 TBool - True if error code was found, False if it was not
58 IMPORT_C TBool GetExpectedResultL(const TInt &aError /*in*/, HBufC*& aResult /*out*/);
60 IMPORT_C void AddErrorItem(const TDesC& aErrorName, const TInt &aErrorCode);
63 void ConstructL(void);
64 void CreateErrorMapL(void);
66 RPointerArray<CErrorItem> iErrorMap;