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