diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-E4E656BF-E5F7-5125-AE88-60C3E9FCF0D2.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-E4E656BF-E5F7-5125-AE88-60C3E9FCF0D2.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,48 @@ + + + + + +InterfaceDefinition: +ECom Interface Definition Example Code +
Download

Click +on the following link to download the example: Ecom.zip

Download some additional files required +by the example: CommonFramework

Click: browse to view the example code.

View the additional +files: browse.
+
Description

InterfaceDefinition provides +an example ECom interface definition. It declares a base class, CExampleInterface, +from which implementations of the interface should derive.

CExampleInterface provides +three NewL() functions that allow clients to get respectively:

    +
  • the default implementation +of the interface, using a specified custom resolver to determine what is the +default

  • +
  • an implementation determined +by the default resolver, using a specified string as a resolution parameter

  • +
  • an implementation determined +by the default resolver, using a specified string as a resolution parameter, +and passing some data to the implementation

  • +

CExampleInterface uses the overloads of REComSession::CreateImplementation() to +implement these functions.

CExampleInterface declares +one pure virtual function, DoMethodL(), which supplies a +service to the client. Implementations must implement this function.

InterfaceDefinition also +provides an example of a custom resolver, called CExampleResolver. +Its behaviour is the same as ECom's default resolver. Because a resolver is +an implementation of the ECom CResolver interface, it requires +a registration resource file (100098ea.rss), and an exported +factory table (Proxy.cpp).

+
Class Summary

REComSession

TEComResolverParams

RImplInfoPtrArray

CResolver

+
Usage

Building InterfaceDefinition exports +the files that contain the interface definition, Interface.h and Interface.inl, +to epoc32\include\; produces a DLL ExampleResolver.dll; +and compiles a resource file ExampleResolver.rsc in the \resource\plugins\ directory.

Implementations +of the interface are provided in the Interface +Implementation example.

A client program that accesses the +interface is provided in the Interface +Clientexample.

+
\ No newline at end of file