1 /* |
|
2 * Copyright (c) 2008-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 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 * Information shared between the Software Component Registry client and server implementations. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalComponent |
|
23 @released |
|
24 */ |
|
25 |
|
26 #ifndef SCRCOMMON_H |
|
27 #define SCRCOMMON_H |
|
28 |
|
29 #include <e32ver.h> |
|
30 #include <e32uid.h> |
|
31 #include <f32file.h> |
|
32 #include <e32std.h> |
|
33 #include <s32file.h> |
|
34 |
|
35 namespace Usif |
|
36 { |
|
37 /** Identifies the Software Component Registry Symbian OS Server. */ |
|
38 _LIT(KSoftwareComponentRegistryName, "!SoftwareComponentRegistry"); |
|
39 |
|
40 const TInt KScrVerMajor = 1; ///< SCR Server version major component. |
|
41 const TInt KScrVerMinor = 0; ///< SCR Server version minor component. |
|
42 const TInt KScrVerBuild = 0; ///< SCR Server version build component. |
|
43 |
|
44 inline TVersion ScrServerVersion(); |
|
45 |
|
46 /** |
|
47 Executable which hosts SCR Server. Required to launch the process. |
|
48 |
|
49 @see KUidScrServer |
|
50 */ |
|
51 _LIT(KScrServerImageName, "scrserver.exe"); |
|
52 |
|
53 /** |
|
54 Hosting the executable's secure ID. Required to launch the process. |
|
55 |
|
56 @see KScrServerImageName |
|
57 */ |
|
58 const TUid KUidScrServer = {0x10285BC0}; |
|
59 |
|
60 inline TUidType ScrServerImageFullUid(); |
|
61 |
|
62 enum TScrSessionFunction |
|
63 /** |
|
64 Functions supported by a SCR server session. |
|
65 */ |
|
66 { |
|
67 ECreateTransaction = 0x00, ///< Create a new transaction |
|
68 ERollbackTransaction = 0x01, ///< Roll back the transaction in progress |
|
69 ECommitTransaction = 0x02, ///< Commit the transaction in progress |
|
70 EAddComponent = 0x03, ///< Add a new component record into the SCR database |
|
71 EAddComponentDependency = 0x04, ///< Add a new dependency between two software components. |
|
72 ESetComponentLocalizableProperty = 0x05, ///< Set a string property of the component |
|
73 ESetComponentNumericProperty = 0x06, ///< Set a numeric property of the component |
|
74 ESetComponentBinaryProperty = 0x07, ///< Set a binary property of the component |
|
75 ERegisterComponentFile = 0x08, ///< Register a file to an existing component |
|
76 ESetFileStringProperty = 0x09, ///< Set a string property of the component's file |
|
77 ESetFileNumericProperty = 0x0A, ///< Set a string property of the component's file |
|
78 ESetComponentName = 0x0B, ///< Update the name of the component |
|
79 ESetComponentVendor = 0x0C, ///< Update the vendor of the component |
|
80 ESetComponentVersion = 0x0D, ///< Set the version of the component |
|
81 ESetIsComponentRemovable = 0x0E, ///< Set the removable attribute of the component |
|
82 ESetIsComponentDrmProtected = 0x0F, ///< Set the DRM protected attribute of the component. |
|
83 ESetIsComponentHidden = 0x10, ///< Set the hidden attribute of the component. |
|
84 ESetIsComponentKnownRevoked = 0x11, ///< Set the known-revoked attribute of the component. |
|
85 ESetIsComponentOriginVerified = 0x12, ///< Set the origin-verified attribute of the component. |
|
86 ESetComponentSize = 0x13, ///< Set the install-time size of the component |
|
87 EDeleteComponentProperty = 0x14, ///< Delete a property of the component |
|
88 EDeleteFileProperty = 0x15, ///< Delete a property of the component's file |
|
89 EUnregisterComponentFile = 0x16, ///< Deregister a component's file |
|
90 EDeleteComponent = 0x17, ///< Delete a component from the SCR database |
|
91 EDeleteComponentDependency = 0x18, ///< Delete an existing dependency between two software components. |
|
92 EGetSingleComponentSize = 0x19, ///< Retrieve the entry size of a given component id |
|
93 EGetSingleComponentData = 0x1A, ///< Retrieve the entry data of a given component id |
|
94 EGetFilePropertiesSize = 0x1B, ///< Retrieve the buffer size needed to write the file properties. |
|
95 EGetFilePropertiesData = 0x1C, ///< Retrieve the data of the file properties obtained from the SCR server. |
|
96 EGetSingleFilePropertySize = 0x1D, ///< Retrieve the buffer size needed to write the value of the single file property given. |
|
97 EGetSingleFilePropertyData = 0x1E, ///< Retrieve the data of the single file property. |
|
98 EGetComponentFilesCount = 0x1F, ///< Retrieve the number of files registered by a component |
|
99 EGetFileComponentsSize = 0x20, ///< Retrieve the buffer size needed to write the component IDs possessing the given file. |
|
100 EGetFileComponentsData = 0x21, ///< Retrieve the data of the component IDs. |
|
101 EGetComponentPropertiesSize = 0x22, ///< Retrieve the buffer size needed to write the given component's properties. |
|
102 EGetComponentPropertiesData = 0x23, ///< Retrieve the data of the component's properties obtained from the SCR server. |
|
103 EGetComponentSinglePropertySize = 0x24, ///< Retrieve the buffer size needed to write the value of the single component property given. |
|
104 EGetComponentSinglePropertyData = 0x25, ///< Retrieve the data of the single component property. |
|
105 EGetLocalComponentId = 0x26, ///< Retrieve the local component id of a given global component id. |
|
106 EGetComponentWithGlobalIdSize = 0x27, ///< Retrieve the component entry size of a given global component id |
|
107 EGetComponentWithGlobalIdData = 0x28, ///< Retrieve the component entry data of a given global component id |
|
108 EGetSupplierComponentsSize = 0x29, ///< Retrieve the buffer size needed to write the supplier global IDs of a given dependant component. |
|
109 EGetSupplierComponentsData = 0x2A, ///< Retrieve the data of the supplier global IDs of a given dependant component. |
|
110 EGetDependantComponentsSize = 0x2B, ///< Retrieve the buffer size needed to write the dependant global IDs of a given supplier component. |
|
111 EGetDependantComponentsData = 0x2C, ///< Retrieve the data of the dependant global IDs of a given supplier component. |
|
112 EGetComponentIdListSize = 0x2D, ///< Retrieve the buffer size needed to write the component IDs enumerated with a given filter. |
|
113 EGetComponentIdListData = 0x2E, ///< Retrieve the data of the component IDs enumerated with a given filter. |
|
114 EGetLogFileHandle = 0x2F, ///< Transfer the handle of the SCR log file to the client process |
|
115 EGetComponentSupportedLocalesListSize = 0x30, ///< Transfer the buffer size needed to write the list of matching supported languages |
|
116 EGetComponentSupportedLocalesListData = 0x31, ///< Retrieve the data of the list of matching supported languages |
|
117 EGetLocalizedComponentSize = 0x32, ///< Retrieve the localized information entry size of a given component id |
|
118 EGetLocalizedComponentData = 0x33, ///< Retrieve the localized information entry data of a given component id |
|
119 EGenerateNonNativeAppUid = 0x34, ///< Generate a new Application Uid which can be used to register non native applications. |
|
120 |
|
121 EGetApplicationLaunchersSize = 0x3A, ///< Gets the size of application launcher array |
|
122 EGetApplicationLaunchersData = 0x3B, ///< Gets the array application launchers |
|
123 |
|
124 EGetIsMediaPresent = 0x40, ///< Retrieve the presence info of medias where the component is installed. |
|
125 EGetIsComponentOrphaned = 0x41, ///< Retrieve whether the given component is orphaned. |
|
126 EGetIsComponentOnReadOnlyDrive = 0x42, ///< Retrieve if the component is present on a read-only drive. |
|
127 EGetIsComponentPresent = 0x43, ///< Retrieve if the software component is fully present. |
|
128 EGetComponentIdForApp = 0x44, ///< Retrieve the component Id for a given App. |
|
129 EGetAppUidsForComponentSize = 0x45, ///< Retrieve the size of the list of AppUids associated with a component. |
|
130 EGetAppUidsForComponentData = 0x46, ///< Retrieve the list of AppUids associated with a component. |
|
131 |
|
132 EAddApplicationEntry = 0x47, ///< Add a new application entry into SCR. |
|
133 EDeleteApplicationEntries = 0x48, ///< Delete the applications associated with a component from SCR. |
|
134 EDeleteApplicationEntry = 0x49, ///< Delete an application from SCR. |
|
135 ESetScomoState = 0x50, ///< Set the scomo state of a given component. |
|
136 ESetIsComponentPresent = 0x51, ///< Set the attribute if the component is present fully. |
|
137 EGetPluginUidWithMimeType = 0x52, ///< Retrieve the SIF plugin UID for a given MIME type. |
|
138 EGetPluginUidWithComponentId = 0x53, ///< Retrieves the SIF plugin UID for a given component Id. |
|
139 |
|
140 ESubSessCreateComponentsView = 0x60, ///< Creates a sub-session to handle a components view. |
|
141 ESubSessCreateFileList = 0x61, ///< Creates a sub-session to handle a file list. |
|
142 |
|
143 ESubSessCreateRegInfoForApp = 0x62, ///< Creates a sub-session to handle a App ID related query. |
|
144 ESubSessCreateAppRegInfo = 0x63, ///< Creates a sub-session to handle a query. |
|
145 |
|
146 EAddSoftwareType = 0x65, ///< Add a new software type to the SCR database with MIME types, unique and localized names. |
|
147 EDeleteSoftwareType = 0x66, ///< Delete an existing software type from the SCR database. |
|
148 EGetDeletedMimeTypes = 0x67, ///< Retrieve the list of MIME types deleted in last software type deletion operation. |
|
149 |
|
150 ESubSessCreateAppInfoView = 0x68, ///< Creates a sub-session to handle a appinfo view. |
|
151 ESubSessCreateAppRegistryView = 0x69 ///< Creates a sub-session to handle a application registration view. |
|
152 // NOTE: The range after this is used up. Add new function ids carefully. |
|
153 }; |
|
154 |
|
155 enum TScrSubSessionFunction |
|
156 /** |
|
157 Functions supported by a SCR server subsession. |
|
158 */ |
|
159 { |
|
160 EOpenComponentsView = 0x70, ///< A components view isopened on the server side by using a given filter |
|
161 EGetNextComponentSize = 0x71, ///< Get the size of the next component entry from the components view. |
|
162 EGetNextComponentData = 0x72, ///< Get the next component entry from the components view. |
|
163 EGetNextComponentSetSize = 0x73, ///< Get the size of the next component entry set from the components view. |
|
164 EGetNextComponentSetData = 0x74, ///< Get the next component entry set from the components view. |
|
165 EOpenFileList = 0x77, ///< A file list is opened on the server side by using a given filter |
|
166 EGetNextFileSize = 0x78, ///< Get the size of the next file from the present file list. |
|
167 EGetNextFileData = 0x79, ///< Get the next file from the present file list. |
|
168 EGetNextFileSetSize = 0x7A, ///< Get teh size of the next file set from the present file list. |
|
169 EGetNextFileSetData = 0x7B, ///< Get the next file set from the present file list. |
|
170 EOpenAppInfoView = 0x7C, ///< An AppInfo view is opened on the server side by using a given filter |
|
171 EGetNextAppInfoSize = 0x7D, ///< Next AppInfo size is calculated and sent to the client |
|
172 EGetNextAppInfoData = 0x7E, ///< Next AppInfo data is returned to the client |
|
173 |
|
174 ESetAppUid = 0x80, ///< AppId is set on the server side to be used for the specific subsession. |
|
175 EGetServiceUidSize = 0x88, ///< Get the size of the service Id list. |
|
176 EGetServiceUidList = 0x89, ///< Get the list of ServiceIds. |
|
177 EGetApplicationLanguage = 0x8A, ///< Get the Application Language of the App and is nearest to the device language. |
|
178 EGetDefaultScreenNumber = 0x8B, ///< Get the Default screen number specified for an App. |
|
179 EGetNumberOfOwnDefinedIcons = 0x8C, ///< Get the number of defined icons of a specified locale of the App. |
|
180 EGetAppForDataTypeAndService = 0x8D, ///< Get the AppUid with the specified type and ServiceId |
|
181 EGetAppForDataType = 0x8E, ///< Get the AppUid with the specified type and a highest priority. |
|
182 EGetViewSize = 0x8F, ///< Get the size of the view details of a given application |
|
183 EGetViewData = 0x90, ///< Get the array of view details of a given application |
|
184 EGetAppOwnedFilesSize = 0x91, ///< Get the size of files owned by given application |
|
185 EGetAppOwnedFilesData = 0x92, ///< Get the array of files owned by given application |
|
186 EGetAppCharacteristics = 0x93, ///< Get the characteristics of given application |
|
187 EGetAppIconForFileName = 0x94, ///< Get the application icon file name for given application |
|
188 EGetAppViewIconFileName = 0x95, ///< Get the application view icon file name for given application |
|
189 EGetAppServiceInfoSize = 0x96, ///< Get the size of the required service details associated with the parameters set in the filter. |
|
190 EGetAppServiceInfoData = 0x97, ///< Get the required service details associated with the parameters set in the filter. |
|
191 EGetApplicationInfo = 0x98, ///< Get the required app's information details contained in TAppRegInfo. |
|
192 |
|
193 EOpenApplicationRegistrationInfoView = 0xB0, ///< An Application registration view is opened on the server side |
|
194 EGetApplicationRegistrationSize = 0xB1, ///< Get the size of the next application registration data |
|
195 EGetApplicationRegistrationData = 0xB2, ///< Get the next application registration data |
|
196 EOpenApplicationRegistrationInfoForAppUidsView = 0xB3, ///< An Application registration AppUids view is opened on the server side |
|
197 }; |
|
198 |
|
199 /** |
|
200 Delay in microseconds before the SCR Server is shut down, after |
|
201 the last remaining session has been closed. |
|
202 */ |
|
203 static const TInt KScrServerShutdownPeriod = 2 * 1000 * 1000; |
|
204 |
|
205 /** Maximum length of a UID string. */ |
|
206 static const TInt KUidStringLen = 8; |
|
207 } // End of namespace Usif |
|
208 |
|
209 #include <usif/scr/scrcommon.inl> |
|
210 |
|
211 #endif // SCRCOMMON_H |
|