|
1 /* |
|
2 * Copyright (c) 2003, 2004, 2005 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 #ifndef WIDGETREGISTRYCONSTANTS_H |
|
20 #define WIDGETREGISTRYCONSTANTS_H |
|
21 |
|
22 #include <e32cmn.h> |
|
23 |
|
24 // forward declarations |
|
25 class CWidgetEntry; |
|
26 class CWidgetInfo; |
|
27 |
|
28 // Constants |
|
29 const TUid KWidgetRegistryServerUid = { 0x10282F06 }; |
|
30 const TUid KUidWidgetUi = { 0x10282822 }; |
|
31 const TUid KUidWidgetLauncher = { 0x10282821 }; |
|
32 |
|
33 #define WIDGETPROPERTYLISTVERSION 3 |
|
34 // Before changing these, consider that there will be widgets |
|
35 // installed on removable memory cards according to an allocation |
|
36 // scheme using these bounds. |
|
37 const TInt32 KWidgetUidLowerBound = 0x2000DAD2; |
|
38 const TInt32 KWidgetUidUpperBound = 0x2000DEB9; |
|
39 |
|
40 // The current allocation scheme splits the range into two so that |
|
41 // in-device memory uses one range and removable memory cards use a |
|
42 // separate range. Eventually, removable memory is probably going to |
|
43 // have to use a reallocation scheme on insertion. |
|
44 const TInt32 KWidgetUidInternalMemoryStart = KWidgetUidLowerBound; |
|
45 const TInt32 KWidgetUidExternalMemoryStart = (KWidgetUidLowerBound + KWidgetUidUpperBound + 1) / 2; // half way |
|
46 const TInt32 KWidgetUidExternalMemoryStop = KWidgetUidUpperBound; |
|
47 |
|
48 const TInt KWidgetRegistryClientVersionMajor = 0; |
|
49 const TInt KWidgetRegistryClientVersionMinor = 1; |
|
50 const TInt KWidgetRegistryClientVersionBuild = 1; |
|
51 const TInt KWidgetRegistryServerAsynchronousSlotCount = 4; |
|
52 const TInt KWidgetRegistryVal = KMaxFileName; |
|
53 const TInt KShutdownDelay = 200000; |
|
54 const TInt KWidgetRegistryGranularity = 100; |
|
55 const TInt KWidgetRegistryServerStartupAttempts = 2; |
|
56 |
|
57 // Literal constants |
|
58 _LIT( KWidgetRegistryName, "!WidgetRegistry" ); // name to connect to |
|
59 _LIT( KWidgetRegistryImage, "WidgetRegistry" ); // DLL/EXE name |
|
60 _LIT8( KWidgetMime, "application/x-nokia-widget"); |
|
61 _LIT( KLauncherApp, "widgetlauncher.exe" ); |
|
62 |
|
63 |
|
64 // Enumerations |
|
65 enum TWidgetRegistryClientOpCodes |
|
66 { |
|
67 EOpCodeRegisterWidget = 0, // do not change, used in capability policy |
|
68 EOpCodeDeRegisterWidget = 1,// do not change, used in capability policy |
|
69 EOpCodeWidgetExists, |
|
70 EOpCodeIsWidget, |
|
71 EOpCodeIsWidgetRunning, |
|
72 EOpCodeWidgetCount, |
|
73 EOpCodeInstalledWidgetsPhase1, |
|
74 EOpCodeInstalledWidgetsPhase2, |
|
75 EOpCodeRunningWidgetsPhase1, |
|
76 EOpCodeRunningWidgetsPhase2, |
|
77 EOpCodeGetWidgetBundleId, |
|
78 EOpCodeGetWidgetBundleName, |
|
79 EOpCodeGetWidgetPropertyValue, |
|
80 EOpCodeGetWidgetPath, |
|
81 EOpCodeGetWidgetUid, |
|
82 EOpCodeGetWidgetUidForUrl, |
|
83 EOpCodeGetAvailableUid, |
|
84 EOpCodeSetActive, |
|
85 EOpCodeWidgetRegistryDisconnect, |
|
86 EOpCodeGetLprojName, |
|
87 EOpCodeSecurityPolicyId, |
|
88 EOpCodeSetWidgetInMiniView, |
|
89 EOpCodeIsWidgetInMiniView, |
|
90 EOpCodeSetWidgetInFullView, |
|
91 EOpCodeIsWidgetInFullView, |
|
92 EOpCodeSetWidgetPromptNeeded, |
|
93 EOpCodeIsWidgetPromptNeeded, |
|
94 EOpWidgetSapiAccessState, |
|
95 EOpCodeNotSupported // must be last |
|
96 }; |
|
97 |
|
98 |
|
99 enum TWidgetPropertyId |
|
100 { |
|
101 // version must be first |
|
102 EWidgetPropertyListVersion = 0, // int |
|
103 // increment version when changing list of properties so when properties |
|
104 // are written to file with a version header then they can be read in |
|
105 // by backwards compatible future versions |
|
106 |
|
107 // begin from bundle XML configuration file |
|
108 EBundleIdentifier, // required; string; ex.: com.nokia.widget.HelloWorld |
|
109 EBundleName, // required; string; example: Hello World |
|
110 EBundleDisplayName, // required; string; example: Hello World |
|
111 EMainHTML, // required; string; example: HellowWorld.html |
|
112 EBundleShortVersion, // optional; string; example: 1.0 |
|
113 EBundleVersion, // optional; string; example: 1.0 |
|
114 EHeight, // optional; integer; example: 100 |
|
115 EWidth, // optional; integer; example: 100 |
|
116 // TODO remove EAllowFullAccess (grep and remove all mentions) |
|
117 EAllowFullAccess, // optional; int internally 0 or 1 |
|
118 EAllowNetworkAccess, // optional; int internally 0 or 1 |
|
119 |
|
120 // begin internal properties |
|
121 EDriveName, // string; |
|
122 EBasePath, // string; install path for widget, includes drive |
|
123 EIconPath, // string; icon path only |
|
124 EUrl, // string; |
|
125 EFileSize, // int |
|
126 EUid, // TUid |
|
127 ENokiaWidget, // int 0 (not Nokia DTD) or 1 (Nokia DTD) |
|
128 EMiniViewEnable, //optional; int internally 0 0r 1 |
|
129 EBlanketPermGranted, //optional; int internally 0 0r 1 |
|
130 |
|
131 // end property list, begin special values |
|
132 EWidgetPropertyIdCount, // must be at end of properties |
|
133 EWidgetPropertyIdInvalid = 1000 // must be after EWidgetPropertyIdCount |
|
134 }; |
|
135 |
|
136 |
|
137 typedef RArray<TUid> RUidArray; |
|
138 |
|
139 typedef RPointerArray<CWidgetInfo> RWidgetInfoArray; |
|
140 |
|
141 #endif |