Symbian3/SDK/Source/GUID-6E144992-AF5B-5CA3-9CC1-CFB5941103A9.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-6E144992-AF5B-5CA3-9CC1-CFB5941103A9" xml:lang="en"><title>Using
the Plug-in Framework</title><shortdesc>Clients of a plug-in framework use the C++ APIs provided by the
framework for interaction with the framework. Client calls to the interface
definition are translated directly through <codeph>REComSession</codeph> into
loading and unloading of the correct implementation library together with
construction and destruction of an appropriate interface implementation. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<steps id="GUID-B8EA3CE1-8777-574D-9ECA-45139EBCD939">
<step id="GUID-3993804F-49BD-5856-836F-02CD8148AC59"><cmd/>
<info>Link to the ECom framework library, <filepath>ecom.lib</filepath>. </info>
</step>
<step id="GUID-80234DBC-9A39-58A1-ACA5-D9421C86E269"><cmd/>
<info>Include the header file that contains the interface definition. </info>
</step>
<step id="GUID-F2C41BC8-232A-5F24-B12D-D13870D11B8D"><cmd/>
<info>Create an object using the interface instantiation methods and required
parameters. The object creation functions re over loaded. right variant based
on inputs available is chosen. </info>
</step>
<step id="GUID-5FD0AD96-2BAF-5D44-B9C4-3CBBF6F545B6"><cmd/>
<info>Use the object for calling the methods provided by the object as per
requirement. </info>
</step>
<step id="GUID-33BC48BE-3605-5BDE-9520-E8CA973050B9"><cmd/>
<info>Delete the object after use. </info>
</step>
<step id="GUID-25033DB0-874E-5060-889D-142A6D34CA05"><cmd/>
<info>Call <xref href="GUID-1344F049-81C4-3D17-AF46-8B5584680ADB.dita#GUID-1344F049-81C4-3D17-AF46-8B5584680ADB/GUID-1AACEF53-2CAD-34EC-A485-CE49BC8B9BD8"><apiname>REComSession::FinalClose()</apiname></xref> to clean up memory. </info>
</step>
</steps>
<postreq id="GUID-33EE5278-C28C-4E53-9826-3856F28873D5"><p>The code below depicts the steps involved in using the framework: </p><codeblock xml:space="preserve">LOCAL_C void doExample()
{
// object creation
    CExampleInterfaceDefinition* ex1 = CExampleInterfaceDefinition::NewL(); 

// calling the required methods 
    ex1-&gt;DoMethodL(); 

// deleting the object after use   
    delete ex1; 

// memory clean-up
    REcomSession:;FinalClose(); 
}
</codeblock></postreq>
</taskbody></task>