Symbian3/PDK/Source/GUID-641A276D-F618-50CE-BA5A-658DCC26BAB5.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     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-641A276D-F618-50CE-BA5A-658DCC26BAB5" xml:lang="en"><title>Creating
       
    13 an Implementation Project File </title><abstract>An implementation project file is a .mmp file, which specifies the
       
    14 essential elements of the implementation. The project files are used for project
       
    15 development. The implementation project file contains information (source
       
    16 file, build file) about the implementation that is being built.<shortdesc>The
       
    17 format of implementation project file is dependent on the version of Symbian
       
    18 platform used. The differences basically reflect the introduction of platform
       
    19 security into Symbian OS v9.0 and later versions. </shortdesc></abstract><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    20 <steps-unordered id="GUID-C62C17ED-E41C-54FA-BA0A-9C10A49E159B">
       
    21 <step id="GUID-BB98ED98-0E27-4865-857D-01BC54ACB226"><cmd>For creating a plug-in project file for Symbian OS v9.1 and later: </cmd>
       
    22 <substeps id="GUID-A24F641F-EF19-46A2-8B4B-883E726AE909">
       
    23 <substep id="GUID-F4AC55A1-0B66-4F17-8B24-2BE518949884"><cmd/>
       
    24 <info>Set <codeph>TARGET</codeph> to the standard DLL name. <codeph>TARGET</codeph> contains
       
    25 the final binary name of the project generated. </info>
       
    26 <info>The plug-in DLL file is stored along other binaries in the<filepath>\Sys\Bin</filepath> directory.
       
    27 The plug-in framework does not discover plug-ins installed in the pre v9.1
       
    28 location, <filepath>\System\Libs\Plugins</filepath>. </info>
       
    29 </substep>
       
    30 <substep id="GUID-3D73991A-AC41-428C-92B8-1B8C6CDD7419"><cmd/>
       
    31 <info>Set <codeph>TARGETTYPE</codeph> to PLUGIN. <codeph>TARGETTYPE</codeph> specifies
       
    32 the type of binary. </info>
       
    33 <info>Set <codeph>TARGETTYPE</codeph> to PLUGIN3 for DLLs supporting the extension
       
    34 interfaces. PLUGIN3 DLLs are given the UID2 value of 0x10009D93. </info>
       
    35 </substep>
       
    36 <substep id="GUID-9C78513D-ACDC-4C26-BFF0-74E6410212A8"><cmd/>
       
    37 <info>Set <codeph>UID</codeph> to plug-in framework DLL recognition UID followed
       
    38 by the unique UID of the plug-in. </info>
       
    39 <info>UID of the plug-in must be the same as the one specified in the <codeph>dll_uid</codeph> member
       
    40 in the <xref href="GUID-9A9103E4-27B0-5CF3-855A-DCD44795A5C0.dita">registration
       
    41 resource file</xref>. </info>
       
    42 </substep>
       
    43 <substep id="GUID-52CCD76E-8FCA-45F1-89BC-5EF582E692C4"><cmd/>
       
    44 <info>Set <codeph>VENDORID</codeph> to the vendor creating the plug-ins. </info>
       
    45 </substep>
       
    46 <substep id="GUID-B5F9FBB6-232B-4508-9C0F-2B49C226AB1A"><cmd/>
       
    47 <info>Set <codeph>CAPABILITY</codeph> to the capabilities of the plug-in in
       
    48 the variable. </info>
       
    49 <info>If the plug-in is assigned no capabilities, only client processes with
       
    50 no capabilities can use them. </info>
       
    51 <info>For more information, see <xref href="GUID-9E4D75C0-D797-5541-8E52-3C6D154CC74A.dita">ECom
       
    52 and the Platform Security Architecture</xref>. </info>
       
    53 </substep>
       
    54 <substep id="GUID-596BA5E8-0E55-41F9-925A-BDF0C2743090"><cmd/>
       
    55 <info>Set <codeph>SOURCEPATH</codeph> to the path where the source files exist. </info>
       
    56 <info>The path set in this variable must be relative to the path of the project
       
    57 file. </info>
       
    58 </substep>
       
    59 <substep id="GUID-EDBA217E-F553-4B58-99BD-72BFF47237DD"><cmd/>
       
    60 <info>Set <codeph>SOURCE</codeph> to the name of the source file. </info>
       
    61 </substep>
       
    62 <substep id="GUID-90CC5B05-0530-4276-A32B-703A97F77ADF"><cmd/>
       
    63 <info>Set <codeph>USERINCLUDE</codeph> to the path where the user provided
       
    64 header files are available. </info>
       
    65 <info>The path set in this variable must be relative to the path of the project
       
    66 file. </info>
       
    67 </substep>
       
    68 <substep id="GUID-0C3EB2DA-064E-42F0-9D13-BA5B14EC4476"><cmd/>
       
    69 <info>Set <codeph>SYSTEMINCLUDE</codeph> to<codeph>\epoc32\include\ecom</codeph>. <codeph>SYSTEMINCLUDE</codeph> specifies
       
    70 the path to OS provided header files. </info>
       
    71 </substep>
       
    72 <substep id="GUID-68701E84-5C98-4C37-9F0B-72320E7016A4"><cmd/>
       
    73 <info>Set <codeph>RESOURCE</codeph> to the registration resource file of the
       
    74 implementation. </info>
       
    75 <info>From v9.1, the name of the registration resource file must be the same
       
    76 as that of the executable. </info>
       
    77 <info>For example, if the plug-in is <filepath>foo.dll</filepath>, then its
       
    78 registration resource file must be called <filepath>foo.rsc</filepath>. This
       
    79 is because plug-in framework uses the names of the registration resource file
       
    80 to find the plug-in DLLs. </info>
       
    81 <info>A simple <codeph>START RESOURCE</codeph> statement is of the following
       
    82 form: </info>
       
    83 <stepxmp><codeblock id="GUID-B4DAAEEF-0FDA-5192-81F5-650946430C2E" xml:space="preserve">START RESOURCE foo.rss
       
    84 END</codeblock> </stepxmp>
       
    85 <info>This builds a file named <filepath>foo.rsc</filepath>. Registration
       
    86 resource files are always built into the target directory <filepath>\Resource\Plugins</filepath>.
       
    87 There is no need to explicitly set the target directory for the <filepath>.rsc</filepath> file
       
    88 in the project file, the build tools take care of it. </info>
       
    89 <info>Where the registration resource source file is still named after the
       
    90 UID of the DLL, the built resource file can be renamed to be the same as the
       
    91 DLL, using the <codeph>TARGET</codeph> keyword. For example: </info>
       
    92 <stepxmp><codeblock id="GUID-E2636CC2-9658-57CD-B57E-FF244CFE6A59" xml:space="preserve">START RESOURCE 10009DB0.rss
       
    93 TARGET foo.rsc
       
    94 END</codeblock> </stepxmp>
       
    95 <info>This builds the <filepath>10009DB0.rss</filepath> source file into <filepath>\Resource\Plugins\foo.rsc</filepath>. </info>
       
    96 </substep>
       
    97 <substep id="GUID-C4476628-A6A3-4A85-9F8D-C11B70EF8A71"><cmd/>
       
    98 <info>Set the variable <codeph>LIBRARY</codeph> to <filepath>ecom.lib</filepath>. </info>
       
    99 <info>The binary links against the specified <filepath>.lib</filepath> file. </info>
       
   100 </substep>
       
   101 </substeps>
       
   102 </step>
       
   103 <step id="GUID-B2656101-01BA-5E5C-9E30-4B28172FC3AD"><cmd/>
       
   104 <info><p>For creating a plug-in project file for Symbian OS v9.0 and earlier: </p></info>
       
   105 <substeps id="GUID-B966B7D5-737A-494C-B6E9-74FE8D13DCB5">
       
   106 <substep id="GUID-157FEA53-CC94-428D-A9AF-529CDBE25120"><cmd/>
       
   107 <info>Set <codeph>TARGET</codeph> to the standard DLL name. <codeph>TARGET</codeph> contains
       
   108 the final binary name of the project generated. </info>
       
   109 </substep>
       
   110 <substep id="GUID-0FAC1E07-1D7C-4E6D-B317-0234DD58777A"><cmd/>
       
   111 <info>Set <codeph>TARGETTYPE</codeph> as ECOMIIC. <codeph>TARGETTYPE</codeph> specifies
       
   112 the type of binary. </info>
       
   113 </substep>
       
   114 <substep id="GUID-34D0442D-9176-4B72-BF58-0E22A1268A6A"><cmd/>
       
   115 <info>Set <codeph>UID</codeph> to the plug-in framework DLL recognition UID
       
   116 followed by the unique UID of the plug-in. </info>
       
   117 <info>Unique UID of the plug-in must be the same as the one specified in the <codeph>dll_uid</codeph> member
       
   118 in the <xref href="GUID-9A9103E4-27B0-5CF3-855A-DCD44795A5C0.dita">registration
       
   119 resource file</xref>. </info>
       
   120 </substep>
       
   121 <substep id="GUID-A9F72D37-A1F9-4586-9FEE-9C7234867E3E"><cmd/>
       
   122 <info>Set <codeph>SOURCEPATH</codeph> to the path where the source files exist. </info>
       
   123 <info>The path set for this variable must be relative to the path of the project
       
   124 file. </info>
       
   125 </substep>
       
   126 <substep id="GUID-DE91B9A8-A3EB-4E02-8DA8-7D43F0043A39"><cmd/>
       
   127 <info>Set <codeph>SOURCE</codeph> to the name of the source file. </info>
       
   128 </substep>
       
   129 <substep id="GUID-F9D4D6B1-0F6A-45A3-B9D8-653AFC7DA1BE"><cmd/>
       
   130 <info>Set <codeph>USERINCLUDE</codeph> to the path where the user provided
       
   131 header files are available. </info>
       
   132 <info>The path set in this variable must be relative to the path of the project
       
   133 file. </info>
       
   134 </substep>
       
   135 <substep id="GUID-6B7059F8-3525-4A3A-815B-6AF80FCA2390"><cmd/>
       
   136 <info>Set <codeph>SYSTEMINCLUDE</codeph> to<codeph>\epoc32\include\ecom</codeph>.
       
   137 SYSTEMINCLUDE specifies the path to OS provided header files. </info>
       
   138 </substep>
       
   139 <substep id="GUID-E3E217A8-607C-474B-911B-98A1CFC6DEA7"><cmd/>
       
   140 <info>Set <codeph>RESOURCE</codeph> to the registration resource file of the
       
   141 implementation. </info>
       
   142 <info>The registration resource file .rss need not have the same name as the
       
   143 DLL. It is required to be named after the UID of the DLL. </info>
       
   144 </substep>
       
   145 <substep id="GUID-D1F69266-3516-4E1F-9A5F-DD9215DBA886"><cmd/>
       
   146 <info>Set <codeph>LIBRARY</codeph> to <filepath>ecom.lib</filepath>. The binary
       
   147 links to the <filepath>.lib</filepath> file. </info>
       
   148 </substep>
       
   149 </substeps>
       
   150 </step>
       
   151 </steps-unordered>
       
   152 <example id="GUID-D34B6A0A-45E5-5C1F-ABDA-78EB7100622E"><title>Creating an
       
   153 implementation project file example</title> <p> <b> For Symbian OS v9.1 and
       
   154 later </b>  </p> <codeblock id="GUID-CBF66575-365D-5587-8435-9B3BE58A0AA2" xml:space="preserve">// ExampleInterfaceImplementation.mmp
       
   155 //
       
   156 TARGET     ExampleInterfaceImplementation.dll
       
   157 TARGETTYPE PLUGIN
       
   158 
       
   159 // ECom Dll recognition UID followed by the unique dll UID 
       
   160 UID 0x10009D8D 0x10009DB0
       
   161 
       
   162 VENDORID 0x70000001
       
   163 
       
   164 CAPABILITY All -TCB
       
   165 
       
   166 SOURCEPATH \ExampleInterfaceImplementation
       
   167 SOURCE     ExampleInterfaceImplementation.cpp
       
   168 
       
   169 USERINCLUDE  \ExampleInterfaceImplementation \inc
       
   170 SYSTEMINCLUDE  \epoc32\include
       
   171 SYSTEMINCLUDE  \epoc32\include\ecom
       
   172 
       
   173 START RESOURCE 10009DB0.rss
       
   174 TARGET            ExampleInterfaceImplementation.rsc
       
   175 END
       
   176 
       
   177 LIBRARY euser.lib
       
   178 LIBRARY ecom.lib</codeblock> <p> <b> For Symbian OS v9.0 and earlier </b>  </p> <codeblock id="GUID-B88DE9DD-169C-5F8B-89A6-6B9D50138773" xml:space="preserve">// ExampleInterfaceImplementation.mmp
       
   179 //
       
   180 TARGET ExampleInterfaceImplementation.dll
       
   181 TARGETTYPE ECOMIIC
       
   182 
       
   183 // ECom Dll recognition UID followed by the unique dll UID 
       
   184 UID 0x10009D8D 0x10009DB0
       
   185 
       
   186 SOURCEPATH \ExampleInterfaceImplementation
       
   187 SOURCE ExampleInterfaceImplementation.cpp
       
   188 
       
   189 USERINCLUDE  \ExampleInterfaceImplementation \inc
       
   190 SYSTEMINCLUDE  \epoc32\include
       
   191 SYSTEMINCLUDE  \epoc32\include\ecom
       
   192 
       
   193 RESOURCE 10009DB0.rss
       
   194 
       
   195 LIBRARY euser.lib
       
   196 LIBRARY ecom.lib</codeblock> </example>
       
   197 </taskbody></task>