|
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-743BFB3C-7B88-4A5C-A655-A50DEB45FC46" xml:lang="en"><title>Creating |
|
13 an installer as an in-process plug-in</title><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-12-1-5-1-1-6-1-4-1-4-1-3-1-5-1-2-1"> |
|
15 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-12-1-5-1-1-6-1-4-1-4-1-3-1-5-1-2-1-1"><cmd/> |
|
16 <info> <p>Create an ECom plug-in implementation of the <xref href="GUID-CD380D01-8649-36E4-8435-C6F600D5A5CF.dita"><apiname>CSifPlugin</apiname></xref> interface. |
|
17 For detailed information about creating an ECom plug-in interface implementation, |
|
18 see the <xref href="GUID-F94CEC6D-C602-550F-9B12-856493F3C509.dita">Implementing |
|
19 an Interface</xref> section. </p> <p>For example: </p> <codeblock id="GUID-C49BDE13-8928-5305-80A7-C5FDE77C9CF5" xml:space="preserve">Class CSamplePlugin : public CSifPlugin |
|
20 { |
|
21 public: |
|
22 static CSamplePlugin* NewL(); |
|
23 ~CSamplePlugin(); |
|
24 |
|
25 //Define all virtual functions of CSifPlugin |
|
26 ... |
|
27 |
|
28 void GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext, |
|
29 CComponentInfo& aComponentInfo, TRequestStatus& aStatus); |
|
30 void GetComponentInfo(RFile& aFileHandle, const TSecurityContext& aSecurityContext, |
|
31 CComponentInfo& aComponentInfo, TRequestStatus& aStatus); |
|
32 |
|
33 void Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext, |
|
34 const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, |
|
35 TRequestStatus& aStatus); |
|
36 |
|
37 ... |
|
38 |
|
39 private: |
|
40 CSamplePlugin() {} |
|
41 void ConstructL(); |
|
42 CSamplePlugin(const CSamplePlugin &); |
|
43 CSamplePlugin & operator =(const CSamplePlugin &); |
|
44 };</codeblock> </info> |
|
45 </step> |
|
46 <step id="GUID-48B8E4D6-8D55-414F-A33F-2D1C597A4A6F"><cmd>Export the implementation factories by declaring an array containing |
|
47 the ECom implementation and an appropriate exported function. For detailed |
|
48 information about exporting the implementation factories, see the <xref href="GUID-895A685E-83E8-51A3-A823-3A0E07B1E609.dita">Exporting |
|
49 the Implementation Factories </xref> section.</cmd> |
|
50 </step> |
|
51 <step id="GUID-16AC7BCD-3445-4615-8E82-73EBBE7592C7"><cmd/> |
|
52 <info><p>Publish the properties of your ECom implementation in a registration |
|
53 resource file. For detailed information publishing the properties in a registration |
|
54 resource file, see the <xref href="GUID-9A9103E4-27B0-5CF3-855A-DCD44795A5C0.dita">Providing |
|
55 registry information</xref> section. </p> <p>For example: </p> <codeblock id="GUID-525E615B-4843-5C26-AC11-80CE4F421474" xml:space="preserve">// ECOM DLL UID: 0x1028634F |
|
56 // ECOM interface UID: 0x10285BC2 (KUidSifPlugin) |
|
57 // ECOM Implementation: 0x10286350 |
|
58 |
|
59 #include <ecom/registryinfo.rh> |
|
60 |
|
61 RESOURCE REGISTRY_INFO so_registry |
|
62 { |
|
63 dll_uid = 0x1028634F; |
|
64 interfaces = |
|
65 { |
|
66 INTERFACE_INFO |
|
67 { |
|
68 interface_uid = 0x10285BC2; |
|
69 |
|
70 implementations = |
|
71 { |
|
72 IMPLEMENTATION_INFO |
|
73 { |
|
74 implementation_uid = 0x10286350; |
|
75 version_no = 1; |
|
76 default_data = ""; |
|
77 opaque_data = ""; |
|
78 } |
|
79 }; |
|
80 } |
|
81 }; |
|
82 }</codeblock></info> |
|
83 </step> |
|
84 <step id="GUID-D838CBF1-6607-4DE8-B9ED-8D86838BE4DD"><cmd>Create a DLL with target type as <codeph>plugin</codeph>. </cmd> |
|
85 </step> |
|
86 </steps> |
|
87 </taskbody></task> |