|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: Method to read patchable constant value. |
|
14 // |
|
15 |
|
16 #include <e32base.h> |
|
17 #include <u32hal.h> |
|
18 #include <e32svr.h> |
|
19 #include <ssm/ssmpatchableconstants.h> |
|
20 |
|
21 #ifdef SYMBIAN_SSM_GRACEFUL_SHUTDOWN |
|
22 EXPORT_C TUint32 IsSsmGracefulShutdown() |
|
23 { |
|
24 TUint32 retVal = KSsmGracefulShutdown; |
|
25 |
|
26 #ifdef __WINS__ |
|
27 TUint32 valueOfKSsmGracefulShutdown = 0; |
|
28 // KSsmGracefulShutdown is a ROM patchable constant, so need an emulator equivalent |
|
29 // if WINS then read value from epoc.ini, requires licencees to set property in epoc.ini. |
|
30 // Usage: In epoc.ini patchdata_ssmcmn_dll_KSsmGracefulShutdown 0xFFFFFFFF (Can be any non-zero value) |
|
31 |
|
32 if (UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"patchdata_ssmcmn_dll_KSsmGracefulShutdown",&valueOfKSsmGracefulShutdown) == KErrNone) |
|
33 { |
|
34 retVal = valueOfKSsmGracefulShutdown; |
|
35 } |
|
36 #endif // __WINS__ |
|
37 return retVal; |
|
38 } |
|
39 #endif // SYMBIAN_SSM_GRACEFUL_SHUTDOWN |
|
40 |
|
41 EXPORT_C TUint32 IsSsmGracefulOffline() |
|
42 { |
|
43 TUint32 retVal = KSsmGracefulOffline; |
|
44 |
|
45 #ifdef __WINS__ |
|
46 // KSsmGracefulOffline is a ROM patchable constant, so need an emulator equivalent |
|
47 // if WINS then read value from epoc.ini, requires licencees to set property in epoc.ini. This value is 0xFFFFFFFF if feature is enabled. |
|
48 // Usage: In epoc.ini patchdata_KSsmGracefulOffline 0xFFFFFFFF (Can be any non-zero value) |
|
49 TUint32 readValueOfOffline = 0; |
|
50 if( UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalIntProperty, (TAny*)"patchdata_KSsmGracefulOffline", &readValueOfOffline) == KErrNone ) |
|
51 { |
|
52 retVal = readValueOfOffline; |
|
53 } |
|
54 #endif // __WINS__ |
|
55 return retVal; |
|
56 } |