|
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-436B6DFE-D279-44BF-B099-B2547D50610A" xml:lang="en"><title>Write |
|
13 a resource file</title><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <context> <p>Each converter DLL requires an associated information file. |
|
15 This file allows the converter architecture to read the properties of the |
|
16 converters in the DLL without having to load the DLL itself.</p><p>The following |
|
17 information is written to a resource file:</p><ul> |
|
18 <li><p>A single <codeph>CONARC_RESOURCE_FILE</codeph> resource which contains |
|
19 an array of <codeph>CONVERTER_DATA</codeph> resources.</p></li> |
|
20 <li><p>Each <codeph>CONVERTER_DATA</codeph> resource describes the properties |
|
21 of a single converter. It specifies the UID of the converter, an array of |
|
22 MIME resources describing the data types from which the converter can convert |
|
23 and another array of MIME resources describing the data types to which the |
|
24 converter can convert.</p></li> |
|
25 <li><p>Each MIME resource specifies the supported MIME type. For example, |
|
26 text/html, and an array of <codeph>LANG_DATA</codeph> resources giving localized |
|
27 human-readable names for that MIME type.</p></li> |
|
28 <li><p>Each <codeph>LANG_DATA</codeph> resource specifies a language ID and |
|
29 a human-readable name for the MIME type in that language. </p></li> |
|
30 </ul><p><b>NOTE</b>: The resource file is included within a <codeph>start |
|
31 resource ...</codeph> end block in the project file. Its target path must |
|
32 be<filepath>\resource\convert\</filepath>.</p><p>The following example is |
|
33 an information file for a converter DLL that contains one converter:</p><codeblock xml:space="preserve">#include <conplugin.rh> |
|
34 #include "ExampleConv.hrh" |
|
35 RESOURCE CONARC_RESOURCE_FILE |
|
36 { |
|
37 converter_list = |
|
38 { |
|
39 CONVERTER_DATA |
|
40 { |
|
41 conv_uid = KExampleConvImplementationUid; // UID of the converter, as returned by CConverterBase2::Uid() |
|
42 from_list = |
|
43 { |
|
44 MIME |
|
45 { |
|
46 type = "example/qp"; |
|
47 lang_list = |
|
48 { |
|
49 // lang_id is a value from the TLanguage enumeration. 01 is English. |
|
50 LANG_DATA{lang_id=01;translation="quoted-printable"; |
|
51 } |
|
52 }; |
|
53 } |
|
54 }; |
|
55 to_list = |
|
56 { |
|
57 MIME |
|
58 { |
|
59 type = "example/text"; |
|
60 lang_list = |
|
61 { |
|
62 LANG_DATA |
|
63 { |
|
64 lang_id = 01; |
|
65 translation = "text"; |
|
66 }; |
|
67 } |
|
68 }; |
|
69 } |
|
70 }; |
|
71 }</codeblock></context> |
|
72 </taskbody></task> |