33
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "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".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Maps extended error values to correct values.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef TSATEXTERRORUTILS_H
|
|
21 |
#define TSATEXTERRORUTILS_H
|
|
22 |
|
|
23 |
#include <e32std.h>
|
|
24 |
// CLASS DECLARATION
|
|
25 |
|
|
26 |
/**
|
|
27 |
* Extended GSM error utility class. Used to map extended error codes into
|
|
28 |
* correct Network errors. These values are used in SetUpCall, SendSs,
|
|
29 |
* SendUssd and SendSm TerminalResponses, when network returns error.
|
|
30 |
*
|
|
31 |
* @lib SatEngine.lib
|
|
32 |
* @since 3.0
|
|
33 |
*/
|
|
34 |
class TSatExtErrorUtils
|
|
35 |
{
|
|
36 |
|
|
37 |
public: // New functions
|
|
38 |
|
|
39 |
/**
|
|
40 |
* Maps extended error value to correct value.
|
|
41 |
* @param aExtError Extended GSM error defined in exterror.h
|
|
42 |
* @param aModifyMappedValue, should 8th bit changed into 1 or not.
|
|
43 |
* default is ETrue
|
|
44 |
* @return Hex number indicating the correct value
|
|
45 |
*/
|
|
46 |
IMPORT_C static TUint8 MapError(
|
|
47 |
TInt aExtError,
|
|
48 |
TBool aModifyMappedValue = ETrue );
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Check is given value GSM extended error
|
|
52 |
* @param aExtError Value to be checked
|
|
53 |
* @return TBool indicating is the value extended GSM error
|
|
54 |
*/
|
|
55 |
IMPORT_C static TBool IsExtendedError( TInt aExtError );
|
|
56 |
|
|
57 |
/**
|
|
58 |
* Check should given extended error to be handled as network error
|
|
59 |
* @param aExtError Value to be checked
|
|
60 |
* @return TBool indicating is the value network error
|
|
61 |
*/
|
|
62 |
IMPORT_C static TBool IsNetworkError( TInt aExtError );
|
|
63 |
|
|
64 |
private:
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Checks specific cases of error codes and changes the code,
|
|
68 |
* if neccessary.
|
|
69 |
* @param aExtErrorCode code to be checked
|
|
70 |
* @param aNwError, this is where the new nw value is set
|
|
71 |
*/
|
|
72 |
static void CheckSpecificCases( TInt aExtError, TUint8& aNwError );
|
|
73 |
|
|
74 |
};
|
|
75 |
|
|
76 |
#endif // TSATEXTERRORUTILS_H
|
|
77 |
|
|
78 |
// End of File
|