Symbian ECOM plug-in instance details

Source: Internet
Author: User

Symbian ECOM plug-in instance details 1. What is ECOM
ECOM is a Client/Server framework that provides services for plug-in instantiation, parsing, and analysis. Essentially, it puts the functional requirements of many applications into a DLL and allows the client to access it through interfaces.
ECOM plug-in was introduced in s60 2nd. It was introduced in Symbian OS v7.0s and later versions and changed in the third edition.
Plug-ins are applications written according to certain interface specifications. Therefore, writing plug-ins must use the C ++ polymorphism to complete interface classes and implementation classes. The main function of the plug-in is to complete the function extension without having to modify and implement the application. The Calling mechanism must be completed in advance in the application.

2. ECOM Architecture
The ECOM architecture includes the following components:
1) Interface Definition
2) interface implementation
3) ECOM framework
4) parser

3. ecomshape (instance provided by Nokia Forum) directory structure
/Client -- client, using plug-ins
/Plugin -- plug-in implementation
/Shaperesolver -- parser
/Shaperesolver/INC/shapinterface. H Interface Definition

4. Interface Definition
/Shaperesolver/INC/shapinterface. h
/Shaperesolver/INC/shapinterface. INL
Including:
Instantiation function newl, plug-in export Function
Destructor ~ Cshape
Functional pure virtual function draw
Member variable tuid idtor_id_key

5. ECOM framework
1) ecomp Client
You can use recomsession to perform basic functions such as parsing, constructor, and constructor.
2) ECOM Server
Manage clinet requests
Implementation and resource files are stored in/Symbian/libs/plugins before Symbian OS v9.1
After
Implemented in/sys/bin
Resource file stored in/resource/plugins

6.2nd to 3nd
Uid3 changed from 0x1xxxxxxx to 0 xexxxxxxx
In 3nd, you need to call recomsession: finalclose () in the destructor of Appui to release the plug-in DLL.
The object type in the. MMP file -- targettype changes from ecomiic to plugin.
The resource file name has also changed:
Start resource 101f5465. RSS
Target ecomcalculateplugin. RSC
End
The RSC Name of the third edition must be the same as that of the DLL, while that of the second edition must be the same as that of uid3.
In version 3, implementation_proxy_entry is used in the implementation table. For details, see proxy. cpp.
Const timplementationproxy implementationtable [] =
{
# Ifdef _ series60_3x __
Implementation_proxy_entry (0x101f614e,
Cshaperesolver: newl)
# Else
{0x101f614e}, cshaperesolver: newl}
# Endif
};
The ECOM entry function:
Tint e32dll ()
{
Return kerrnone;
}
2nd needs to be written, not in 3nd.

7. Custom parser -- Custom Resolver
When different selection algorithms are required, we provide Custom Resolver, And the Custom Resolver is provided in ecomshape, which is the default resolver used in ecomcalculator.
Resolver is also an ECOM plug-in. It must inherit cresolver. The following three points must be defined or implemented:
1) The constructor needs to pass in the mpublicregistry object
2) Implement the identifyimplementationl and listalll pure virtual functions
3) In version 3, you need protsev (allowing the server application to register with a protected name. The protected name is "! ") Capability.

8. Register ECOM
The registration of ECOM is written in an RSS file. the RSC file is compiled and stored in the register directory of the system ECOM plug-in, so that the system can find that you are an ecom dll.
The RSC file name 2nd generated after RSS compilation must be the same as uid3, and 3nd must be the same as the DLL name.
# Include <ECOM/registryinfo. RH>
For details about the structure, refer to the example. ^ ~ ^.

9. Note
If the UID of the plugin changes, the new plugin of the ecom framework must delete the following two files:
ECOM. Rom. dat
ECOM. idx
2nd file:/series60_v20/epoc32/wins/C/system/data/plugins
3nd file:/s60_3rd/epoc32/winscw/C/private/10009d8f

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.