Symbian3/SDK/Source/GUID-E4E656BF-E5F7-5125-AE88-60C3E9FCF0D2.dita
changeset 8 ae94777fff8f
parent 0 89d6a7a84779
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept id="GUID-E4E656BF-E5F7-5125-AE88-60C3E9FCF0D2" xml:lang="en"><title>InterfaceDefinition:
    12 <concept id="GUID-E4E656BF-E5F7-5125-AE88-60C3E9FCF0D2" xml:lang="en"><title>InterfaceDefinition: ECom Interface Definition Example Code</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 ECom Interface Definition Example Code</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 <section id="GUID-B84E1E5E-7141-52D2-A589-35F334058DE5"><title>Download</title> <p>Click 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
    14 <section id="GUID-B84E1E5E-7141-52D2-A589-35F334058DE5"><title>Download</title> <p>Click
    14 required 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
    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
    15 additional files: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-89fa6105-e749-4e5f-a233-a000e3b9390b.html" scope="peer">browse</xref>.  </section>
    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
    16 <section id="GUID-F68E5509-F824-43CE-ADC1-EEFFEAAE2A84"><title>Description</title> <p> <filepath>InterfaceDefinition</filepath> provides an example
    17 files: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-89fa6105-e749-4e5f-a233-a000e3b9390b.html" scope="peer">browse</xref>.  </section>
    17 ECom interface definition. It declares a base class, <codeph>CExampleInterface</codeph>, from which implementations of the interface should derive. </p> <p> <codeph>CExampleInterface</codeph> provides three <codeph>NewL()</codeph> functions that allow clients to get respectively: </p> <ul>
    18 <section><title>Description</title> <p> <filepath>InterfaceDefinition</filepath> provides
    18 <li id="GUID-C512F948-599C-5C46-AB2B-14348DFFD02A"><p>the default
    19 an example ECom interface definition. It declares a base class, <codeph>CExampleInterface</codeph>,
    19 implementation of the interface, using a specified custom resolver
    20 from which implementations of the interface should derive. </p> <p> <codeph>CExampleInterface</codeph> provides
    20 to determine what is the default </p> </li>
    21 three <codeph>NewL()</codeph> functions that allow clients to get respectively: </p> <ul>
    21 <li id="GUID-2B3B6E81-296C-554C-BB18-BCF54121C26F"><p>an implementation
    22 <li id="GUID-C512F948-599C-5C46-AB2B-14348DFFD02A"><p>the default implementation
    22 determined by the default resolver, using a specified string as a
    23 of the interface, using a specified custom resolver to determine what is the
    23 resolution parameter </p> </li>
    24 default </p> </li>
    24 <li id="GUID-F0FD51DC-CC1D-5D27-ABFE-9381A168E996"><p>an implementation
    25 <li id="GUID-2B3B6E81-296C-554C-BB18-BCF54121C26F"><p>an implementation determined
    25 determined by the default resolver, using a specified string as a
    26 by the default resolver, using a specified string as a resolution parameter </p> </li>
    26 resolution parameter, and passing some data to the implementation </p> </li>
    27 <li id="GUID-F0FD51DC-CC1D-5D27-ABFE-9381A168E996"><p>an implementation determined
    27 </ul> <p> <codeph>CExampleInterface</codeph> uses the overloads of <xref href="GUID-1344F049-81C4-3D17-AF46-8B5584680ADB.dita#GUID-1344F049-81C4-3D17-AF46-8B5584680ADB/GUID-ECFBCF8D-E372-36CD-8B60-0CFDBE01833E"><apiname>REComSession::CreateImplementation(TUid, TUid &amp;)</apiname></xref> to
    28 by the default resolver, using a specified string as a resolution parameter,
    28 implement these functions. </p> <p> <codeph>CExampleInterface</codeph> declares one pure virtual function, <codeph>DoMethodL()</codeph>, which supplies a service to the client. Implementations must implement
    29 and passing some data to the implementation </p> </li>
    29 this function. </p> <p> <filepath>InterfaceDefinition</filepath> also provides an example of a custom resolver, called <codeph>CExampleResolver</codeph>. Its behaviour is the same as ECom's default resolver. Because a
    30 </ul> <p> <codeph>CExampleInterface</codeph> uses the overloads of <codeph>REComSession::CreateImplementation()</codeph> to
    30 resolver is an implementation of the ECom <codeph>CResolver</codeph> interface, it requires a registration resource file (<filepath>100098ea.rss</filepath>), and an exported factory table (<filepath>Proxy.cpp</filepath>). </p> </section>
    31 implement these functions. </p> <p> <codeph>CExampleInterface</codeph> declares
    31 <section id="GUID-17AD128E-AAF6-4AEB-B423-EE6B17AC843B"><title>Class
    32 one pure virtual function, <codeph>DoMethodL()</codeph>, which supplies a
    32 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>
    33 service to the client. Implementations must implement this function. </p> <p> <filepath>InterfaceDefinition</filepath> also
    33 <section id="GUID-BDC71AA8-C20C-44CE-9D96-A79EED13E2BA"><title>Usage</title> <p>Building <filepath>InterfaceDefinition</filepath> exports the
    34 provides an example of a custom resolver, called <codeph>CExampleResolver</codeph>.
    34 files that contain the interface definition, <filepath>Interface.h</filepath> and <filepath>Interface.inl</filepath>, to <filepath>epoc32\include\</filepath>; produces a DLL <filepath>ExampleResolver.dll</filepath>; and compiles
    35 Its behaviour is the same as ECom's default resolver. Because a resolver is
    35 a resource file <filepath>ExampleResolver.rsc</filepath> in the <filepath>\resource\plugins\</filepath> directory. </p> <p>Implementations
    36 an implementation of the ECom <codeph>CResolver</codeph> interface, it requires
    36 of the interface are provided in the <xref href="GUID-711C387D-E10C-5469-872A-5B2BDACC9B91.dita">Interface Implementation</xref> example. </p> <p>A client program that accesses the interface is
    37 a registration resource file (<filepath>100098ea.rss</filepath>), and an exported
    37 provided in the <xref href="GUID-7B4A78D8-64BB-550E-ABC0-255312351215.dita">Interface Client</xref>example. </p> </section>
    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>
    38 </conbody></concept>