|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-B541BD01-29BE-4CB7-9420-ABEE0BDC9BA4" xml:lang="en"><title>Writing |
|
13 a Standard Registration Resource File</title><shortdesc>For Symbian OS V9.1 and onwards, the name of the standard registration |
|
14 resource file must be the same as that of the executable with <filepath>.rss</filepath> extension. |
|
15 All the registration resource structure types are defined in <codeph>RegistryInfo.rh</codeph>. |
|
16 This file has to be included in the registration resource file. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
17 <steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-8-1-11-1-1-8-1-4-1-5-1-4-1-5-1-4-1-3-1"> |
|
18 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-8-1-11-1-1-8-1-4-1-5-1-4-1-5-1-4-1-3-1-1"><cmd>Define a single <codeph>REGISTRY_INFO</codeph> resource. |
|
19 </cmd> |
|
20 </step> |
|
21 <step id="GUID-0711500A-DB15-4AF2-86E7-07751B7D0CE6"><cmd>Set the dll_uid |
|
22 to the DLL's UID. </cmd> |
|
23 </step> |
|
24 <step id="GUID-73CC8347-CE83-43E4-81D2-FFB10C058E5B"><cmd>Set interfaces member |
|
25 to be an array of <codeph>INTERFACE_INFO</codeph> resources. </cmd> |
|
26 <info><p>Each <codeph>INTERFACE_INFO</codeph> resource defines registration |
|
27 information for implementations of the interface identified by interface_uid |
|
28 member. The information takes the form of an array of <codeph>IMPLEMENTATION_INFO</codeph> resources. |
|
29 </p></info> |
|
30 </step> |
|
31 <step id="GUID-BB178AA4-0BE4-4DC2-9A4E-28D8AFEBA2A2"><cmd>Each <codeph>IMPLEMENTATION_INFO</codeph> resource |
|
32 declares the properties of a single implementation. It has five members: </cmd> |
|
33 <substeps id="GUID-D09853C8-5054-4D4D-AE76-E5787263F02B"> |
|
34 <substep id="GUID-5F45453F-4D21-4983-ABA8-DB2F025A9326"><cmd><codeph>implementation_uid</codeph>: |
|
35 An unique identifier for the implementation. </cmd> |
|
36 <info><p>For this value, use a new UID allocated by Symbian Signed. The allocated |
|
37 value can be from the protected or non-protected range of UIDs. </p></info> |
|
38 </substep> |
|
39 <substep id="GUID-2AC39D58-D817-43D4-8130-F012C7CBA9A9"><cmd><codeph>version_no</codeph>: |
|
40 The version of the interface implementation. </cmd> |
|
41 </substep> |
|
42 <substep id="GUID-4F545F1B-AD20-4EFC-B09A-6F7E19E27B75"><cmd><codeph>display_name</codeph>: |
|
43 The external name of the implementation. </cmd> |
|
44 </substep> |
|
45 <substep id="GUID-078E43CD-C238-4361-86D7-5372CA9ACD23"><cmd><codeph>default_data</codeph>: |
|
46 The data identifier field used by the resolver to determine if the implementation |
|
47 matches a client request. </cmd> |
|
48 </substep> |
|
49 <substep id="GUID-CE0BE654-08E5-4693-AF25-9098080640B9"><cmd><codeph>opaque_data</codeph>: |
|
50 A binary data field that can contain additional data. This additional data |
|
51 can be used by the custom resolvers. </cmd> |
|
52 </substep> |
|
53 </substeps> |
|
54 </step> |
|
55 </steps> |
|
56 <example><p>The following example depicts a resource registration file for |
|
57 an implementation collection with two implementations.</p><codeblock xml:space="preserve">// 10009DB1.RSS |
|
58 // |
|
59 #include "RegistryInfo.rh" |
|
60 |
|
61 RESOURCE REGISTRY_INFO theInfo |
|
62 { |
|
63 dll_uid = 0x10009DB1; |
|
64 interfaces = |
|
65 { |
|
66 INTERFACE_INFO |
|
67 { |
|
68 interface_uid = 0x10009DC0; |
|
69 implementations = |
|
70 { |
|
71 IMPLEMENTATION_INFO |
|
72 { |
|
73 implementation_uid = 0x10009DC3; |
|
74 version_no = 1; |
|
75 display_name = "Implementation name 1"; |
|
76 default_data = "text/wml"; |
|
77 opaque_data = "some extra data"; |
|
78 }, |
|
79 IMPLEMENTATION_INFO |
|
80 { |
|
81 implementation_uid = 0x10009DC4; |
|
82 version_no = 1; |
|
83 display_name = "Implementation name 1"; |
|
84 default_data = "text/xml||Type of data handled"; |
|
85 opaque_data = ""; |
|
86 } |
|
87 }; |
|
88 } |
|
89 }; |
|
90 }</codeblock></example> |
|
91 </taskbody><related-links> |
|
92 <link href="GUID-64D62DD8-3D9C-4659-9658-C0B4D74D6E69.dita"><linktext>Writing |
|
93 the Version 2 Registration Resource File</linktext></link> |
|
94 <link href="GUID-39186342-960A-46A4-BC35-851F53665FA8.dita"><linktext>Writing the |
|
95 Version 3 Registration Resource File</linktext></link> |
|
96 </related-links></task> |