1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
14 // |
14 // |
15 |
15 |
16 |
16 |
17 |
17 |
18 // INCLUDE FILES |
18 // INCLUDE FILES |
19 |
|
20 #include "OstTraceDefinitions.h" |
|
21 #ifdef OST_TRACE_COMPILER_IN_USE |
|
22 #include "CMmCommonStaticUtilityTraces.h" |
|
23 #endif |
|
24 |
|
25 #include <etelmm.h> |
19 #include <etelmm.h> |
26 #include <etelmmerr.h> |
20 #include <etelmmerr.h> |
27 #include <exterror.h> |
21 #include <exterror.h> |
28 #include <ctsy/serviceapi/gsmerror.h> |
22 #include <ctsy/serviceapi/gsmerror.h> |
29 #include "CMmCommonStaticUtility.h" |
23 #include "CMmCommonStaticUtility.h" |
30 |
24 |
|
25 #include <ctsy/tflogger.h> |
31 #include <in_sock.h> |
26 #include <in_sock.h> |
32 |
27 |
33 // ======== MEMBER FUNCTIONS ======== |
28 // ======== MEMBER FUNCTIONS ======== |
34 |
29 |
35 // --------------------------------------------------------------------------- |
30 // --------------------------------------------------------------------------- |
42 // |
37 // |
43 TInt CMmCommonStaticUtility::EpocErrorCode( |
38 TInt CMmCommonStaticUtility::EpocErrorCode( |
44 TInt aCoreErrorCode, // core error |
39 TInt aCoreErrorCode, // core error |
45 TInt aExtendedErrorCode ) // extended error |
40 TInt aExtendedErrorCode ) // extended error |
46 { |
41 { |
47 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCOMMONSTATICUTILITY_EPOCERRORCODE_1, "TSY: CMmStaticUtility::EpocErrorCode, Error mapping done, \Core error: %d, Extended error: %d", aCoreErrorCode, aExtendedErrorCode ); |
42 TFLOGSTRING3("TSY: CMmStaticUtility::EpocErrorCode, Error mapping done, \ |
|
43 Core error: %d, Extended error: %d", aCoreErrorCode, aExtendedErrorCode ); |
48 |
44 |
49 TInt errorCode = ( aCoreErrorCode & 0x0000FFFF ) | |
45 TInt errorCode = ( aCoreErrorCode & 0x0000FFFF ) | |
50 ( aExtendedErrorCode << 16 ); |
46 ( aExtendedErrorCode << 16 ); |
51 |
47 |
52 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCOMMONSTATICUTILITY_EPOCERRORCODE_2, "TSY: CMmStaticUtility::EpocErrorCode. It was mapped \to the following Symbian OS error: %d", errorCode ); |
48 TFLOGSTRING2("TSY: CMmStaticUtility::EpocErrorCode. It was mapped \ |
|
49 to the following Symbian OS error: %d", errorCode ); |
53 |
50 |
54 return errorCode; |
51 return errorCode; |
55 } |
52 } |
56 |
53 |
57 // --------------------------------------------------------------------------- |
54 // --------------------------------------------------------------------------- |