|
1 /* |
|
2 * Copyright (c) 2007-2009 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 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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 //all the constant value needs to be in a separate file |
|
22 //Care should be taken not to define the exported data in the same source file in which |
|
23 //they are referred, lest the compiler inline's it. If inlined, the data cannot be patched. |
|
24 //Hence, the definition of data must be put in a separate source file and they must be |
|
25 //referred in other source files by using 'extern' qualifier |
|
26 |
|
27 |
|
28 /** |
|
29 Patchable constant used in the shutdown server. |
|
30 Used to calculate the shutdown timer with KShtdwnTimeoutClient. |
|
31 It represents the base timeout value in microseconds. |
|
32 |
|
33 The timeout is calculated as: |
|
34 KShtdwnTimeoutBase + KShtdwnTimeoutClient * numClients, |
|
35 where numClients is the number of connecting clients. |
|
36 |
|
37 If the timeout value is; |
|
38 -1, the timer is not used, the server will wait for all client's registration |
|
39 before executing the shutdown; |
|
40 0, the timer expires immediately, the server will execute the shutdown immediately, |
|
41 not waiting for any client's re-registration. |
|
42 other value greater than 0, the server will wait a certain period of time for the clients' registration |
|
43 and execute the shutdown if the timer expires or all clients re-register. |
|
44 |
|
45 Licensees who wish to alter these patchable constants will need to define |
|
46 these ROM build-time macros in their product HRH or IBY files. |
|
47 |
|
48 The new values must follow the rule: |
|
49 KShtdwnTimeoutBase >= -1 and |
|
50 KShtdwnTimeoutClient >= 0. |
|
51 |
|
52 Otherwise, the server panics with KErrNotSupported. |
|
53 |
|
54 @internalComponent |
|
55 @see KShtdwnTimeoutClient |
|
56 */ |
|
57 EXPORT_C extern const TInt32 KShtdwnTimeoutBase = 1000000; |
|
58 |
|
59 /** |
|
60 Patchable data used in the shutdown server. |
|
61 Used to calculate the shutdown timer with KShtdwnTimeoutBase. |
|
62 It represents the timeout value for each client in microseconds. |
|
63 @internalComponent |
|
64 @see KShtdwnTimeoutBase |
|
65 */ |
|
66 EXPORT_C extern const TInt32 KShtdwnTimeoutClient = 500000; |