Using the Plug-in Framework

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 REComSession into loading and unloading of the correct implementation library together with construction and destruction of an appropriate interface implementation.

Steps

  1. Link to the ECom framework library, ecom.lib.
  2. Include the header file that contains the interface definition.
  3. 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.
  4. Use the object for calling the methods provided by the object as per requirement.
  5. Delete the object after use.
  6. Call REComSession::FinalClose() to clean up memory.

Next actions

The code below depicts the steps involved in using the framework:

LOCAL_C void doExample()
{
// object creation
    CExampleInterfaceDefinition* ex1 = CExampleInterfaceDefinition::NewL(); 

// calling the required methods 
    ex1->DoMethodL(); 

// deleting the object after use   
    delete ex1; 

// memory clean-up
    REcomSession:;FinalClose(); 
}