|
1 /* |
|
2 * Copyright (c) 2009-2010 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: |
|
15 * Declaration of the global constants. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef GLOBALS_H_ |
|
21 #define GLOBALS_H_ |
|
22 |
|
23 // Constants |
|
24 |
|
25 // Bootstrap UID |
|
26 const TUid KUidBootstrap = TUid::Uid(0x2002CCCD); |
|
27 |
|
28 // Minimum supported version of bootstrap.sis |
|
29 const TVersion KMinBootstrapSisVersion(0, 9, 00); |
|
30 |
|
31 // Define the bootstrap version to be used. |
|
32 // Currently the versions supported are 1, 2, 3 and 4. |
|
33 const TInt KBootstrapVersion = 4; |
|
34 |
|
35 // Bootstrap-ADM command line protocol version |
|
36 const TUint32 KBootstrapAdmProtocolVersion = 15; |
|
37 |
|
38 // Command line arguments present |
|
39 const TUint32 KCmdLineProtocolVerBits = 4; |
|
40 const TUint32 KCmdLineBitProtocolVerMask = (2 << KCmdLineProtocolVerBits ) - 1; // KBootstrapAdmProtocolVersion must fit into this |
|
41 const TUint32 KCmdLineBitBootstrapVersion = 2 << (KCmdLineProtocolVerBits ); |
|
42 const TUint32 KCmdLineBitWrapperUid = 2 << (KCmdLineProtocolVerBits+1); |
|
43 const TUint32 KCmdLineBitIAP = 2 << (KCmdLineProtocolVerBits+2); |
|
44 const TUint32 KCmdLineBitADMLaunchControl = 2 << (KCmdLineProtocolVerBits+3); |
|
45 const TUint32 KCmdLineBitFileDep = 2 << (KCmdLineProtocolVerBits+4); |
|
46 const TUint32 KCmdLineBitFileSis = 2 << (KCmdLineProtocolVerBits+5); |
|
47 const TInt KCmdLineParamLengths[] = { |
|
48 11, 11, 11, 11, 11, 0, 0 ,0 |
|
49 }; |
|
50 |
|
51 /** |
|
52 * The maximum amount of real time to be used when trying to get |
|
53 * access to installer is KIterationTimer * KAttemptsToAccessInstaller (in us) |
|
54 * |
|
55 * Default time is 100ms. |
|
56 */ |
|
57 const TInt KIterationTimer = 100000; // in microseconds |
|
58 const TInt KAttemptsToAccessInstaller = 20; |
|
59 |
|
60 // Number of download retry attempts from the CDownloadHandler::HandleDMgrEventL() |
|
61 const TInt KDownloadConnectionRetries = 3; |
|
62 |
|
63 // Number of download restart attempts from the state machine |
|
64 const TInt KDownloadRestartRetries = 3; |
|
65 |
|
66 // Maximum length of popup dialog message |
|
67 const TInt KMaxMsgSize = 128; |
|
68 |
|
69 // Amount of data to be downloaded before user is prompted when using packet data connection |
|
70 // 0 = Prompt always for packet data connections, but not for WLAN (except when Ovi Store is running) |
|
71 const TInt KDownloadPromptThreshold = 0; //5 * 1024 * 1024; |
|
72 |
|
73 // Cmd line values to indicate the starting behaviour of ADM |
|
74 const TInt KCmdLineCancelAdm = 1; |
|
75 const TInt KCmdLineCancelAdmNoResume = 2; |
|
76 const TInt KCmdLineLaunchAdm = 3; |
|
77 |
|
78 // Value for invalid IAP ID |
|
79 const TUint KInvalidIapId = KMaxTUint; |
|
80 |
|
81 // TODO: make the URL runtime configurable |
|
82 _LIT8(KDefaultDepServerUrl, ""); |
|
83 |
|
84 enum VersionResult |
|
85 { |
|
86 EEqualVersion, |
|
87 EGreaterFirstVersion, |
|
88 EGreaterSecondVersion |
|
89 }; |
|
90 |
|
91 enum EDownloadError |
|
92 { |
|
93 EDlErrNoError = 0, |
|
94 EDlErrCancelled, |
|
95 EDlErrNetworkFailure, |
|
96 EDlErrNotEnoughSpace, |
|
97 EDlErrFileNotFound, |
|
98 EDlErrDownloadFailure |
|
99 }; |
|
100 |
|
101 #endif /* GLOBALS_H_ */ |