|
1 /* |
|
2 * Copyright (c) 2008-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 * 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 |
|
120 EGetIsMediaPresent = 0x41, ///< Retrieve the presence info of medias where the component is installed. |
|
121 EGetIsComponentOrphaned = 0x42, ///< Retrieve whether the given component is orphaned. |
|
122 EGetIsComponentOnReadOnlyDrive = 0x43, ///< Retrieve if the component is present on a read-only drive. |
|
123 EGetIsComponentPresent = 0x44, ///< Retrieve if the software component is fully present. |
|
124 |
|
125 ESetScomoState = 0x50, ///< Set the scomo state of a given component. |
|
126 ESetIsComponentPresent = 0x51, ///< Set the attribute if the component is present fully. |
|
127 EGetPluginUidWithMimeType = 0x52, ///< Retrieve the SIF plugin UID for a given MIME type. |
|
128 EGetPluginUidWithComponentId = 0x53, ///< Retrieves the SIF plugin UID for a given component Id. |
|
129 |
|
130 ESubSessCreateComponentsView = 0x60, ///< Creates a sub-session to handle a components view. |
|
131 ESubSessCreateFileList = 0x61, ///< Creates a sub-session to handle a file list. |
|
132 |
|
133 EAddSoftwareType = 0x65, ///< Add a new software type to the SCR database with MIME types, unique and localized names. |
|
134 EDeleteSoftwareType = 0x66, ///< Delete an existing software type from the SCR database. |
|
135 EGetDeletedMimeTypes = 0x67, ///< Retrieve the list of MIME types deleted in last software type deletion operation. |
|
136 }; |
|
137 |
|
138 enum TScrSubSessionFunction |
|
139 /** |
|
140 Functions supported by a SCR server session. |
|
141 */ |
|
142 { |
|
143 EOpenComponentsView = 0x70, ///< A components view isopened on the server side by using a given filter |
|
144 EGetNextComponentSize = 0x71, ///< Get the size of the next component entry from the components view. |
|
145 EGetNextComponentData = 0x72, ///< Get the next component entry from the components view. |
|
146 EGetNextComponentSetSize = 0x73, ///< Get the size of the next component entry set from the components view. |
|
147 EGetNextComponentSetData = 0x74, ///< Get the next component entry set from the components view. |
|
148 EOpenFileList = 0x77, ///< A file list is opened on the server side by using a given filter |
|
149 EGetNextFileSize = 0x78, ///< Get the size of the next file from the present file list. |
|
150 EGetNextFileData = 0x79, ///< Get the next file from the present file list. |
|
151 EGetNextFileSetSize = 0x7A, ///< Get teh size of the next file set from the present file list. |
|
152 EGetNextFileSetData = 0x7B ///< Get the next file set from the present file list. |
|
153 }; |
|
154 |
|
155 /** |
|
156 Delay in microseconds before the SCR Server is shut down, after |
|
157 the last remaining session has been closed. |
|
158 */ |
|
159 static const TInt KScrServerShutdownPeriod = 2 * 1000 * 1000; |
|
160 |
|
161 /** Maximum length of a UID string. */ |
|
162 static const TInt KUidStringLen = 8; |
|
163 |
|
164 } // End of namespace Usif |
|
165 |
|
166 #include <usif/scr/scrcommon.inl> |
|
167 |
|
168 #endif // SCRCOMMON_H |