Symbian3/SDK/Source/GUID-E4E656BF-E5F7-5125-AE88-60C3E9FCF0D2.dita
changeset 0 89d6a7a84779
child 8 ae94777fff8f
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     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 concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-E4E656BF-E5F7-5125-AE88-60C3E9FCF0D2" xml:lang="en"><title>InterfaceDefinition:
       
    13 ECom Interface Definition Example Code</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section id="GUID-B84E1E5E-7141-52D2-A589-35F334058DE5"><title>Download</title> <p>Click
       
    15 on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-4d91db5b-1dd7-43ba-9ce8-1c2a1f08a120.zip" scope="external">Ecom.zip</xref></p>Download some additional files required
       
    16 by the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-89fa6105-e749-4e5f-a233-a000e3b9390b.zip" scope="external">CommonFramework</xref><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-4d91db5b-1dd7-43ba-9ce8-1c2a1f08a120.html" scope="peer">browse</xref> to view the example code. </p>View the additional
       
    17 files: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-89fa6105-e749-4e5f-a233-a000e3b9390b.html" scope="peer">browse</xref>.  </section>
       
    18 <section><title>Description</title> <p> <filepath>InterfaceDefinition</filepath> provides
       
    19 an example ECom interface definition. It declares a base class, <codeph>CExampleInterface</codeph>,
       
    20 from which implementations of the interface should derive. </p> <p> <codeph>CExampleInterface</codeph> provides
       
    21 three <codeph>NewL()</codeph> functions that allow clients to get respectively: </p> <ul>
       
    22 <li id="GUID-C512F948-599C-5C46-AB2B-14348DFFD02A"><p>the default implementation
       
    23 of the interface, using a specified custom resolver to determine what is the
       
    24 default </p> </li>
       
    25 <li id="GUID-2B3B6E81-296C-554C-BB18-BCF54121C26F"><p>an implementation determined
       
    26 by the default resolver, using a specified string as a resolution parameter </p> </li>
       
    27 <li id="GUID-F0FD51DC-CC1D-5D27-ABFE-9381A168E996"><p>an implementation determined
       
    28 by the default resolver, using a specified string as a resolution parameter,
       
    29 and passing some data to the implementation </p> </li>
       
    30 </ul> <p> <codeph>CExampleInterface</codeph> uses the overloads of <codeph>REComSession::CreateImplementation()</codeph> to
       
    31 implement these functions. </p> <p> <codeph>CExampleInterface</codeph> declares
       
    32 one pure virtual function, <codeph>DoMethodL()</codeph>, which supplies a
       
    33 service to the client. Implementations must implement this function. </p> <p> <filepath>InterfaceDefinition</filepath> also
       
    34 provides an example of a custom resolver, called <codeph>CExampleResolver</codeph>.
       
    35 Its behaviour is the same as ECom's default resolver. Because a resolver is
       
    36 an implementation of the ECom <codeph>CResolver</codeph> interface, it requires
       
    37 a registration resource file (<filepath>100098ea.rss</filepath>), and an exported
       
    38 factory table (<filepath>Proxy.cpp</filepath>). </p> </section>
       
    39 <section><title>Class Summary</title><p><xref href="GUID-1344F049-81C4-3D17-AF46-8B5584680ADB.dita"><apiname>REComSession</apiname></xref></p><p><xref href="GUID-6E3118A3-4CE5-32AD-9C73-5CDD7B54D9EC.dita"><apiname>TEComResolverParams</apiname></xref></p><p><xref href="GUID-DABE7E22-BDF6-3A2E-99F1-3453706A694E.dita"><apiname>RImplInfoPtrArray</apiname></xref></p><p><xref href="GUID-38D97F70-383E-3950-B052-CB56965B0B48.dita"><apiname>CResolver</apiname></xref></p></section>
       
    40 <section><title>Usage</title> <p>Building <filepath>InterfaceDefinition</filepath> exports
       
    41 the files that contain the interface definition, <filepath>Interface.h</filepath> and <filepath>Interface.inl</filepath>,
       
    42 to <filepath>epoc32\include\</filepath>; produces a DLL <filepath>ExampleResolver.dll</filepath>;
       
    43 and compiles a resource file <filepath>ExampleResolver.rsc</filepath> in the <filepath>\resource\plugins\</filepath> directory. </p> <p>Implementations
       
    44 of the interface are provided in the <xref href="GUID-711C387D-E10C-5469-872A-5B2BDACC9B91.dita">Interface
       
    45 Implementation</xref> example. </p> <p>A client program that accesses the
       
    46 interface is provided in the <xref href="GUID-7B4A78D8-64BB-550E-ABC0-255312351215.dita">Interface
       
    47 Client</xref>example. </p> </section>
       
    48 </conbody></concept>