This page describes how to migrate notifiers to Symbian OS v9.1.
Notifier plug-in DLLs ("notifiers") allow components with no direct UI linkage to interact with the user through a UI element; for example, a dialog box.
You can migrate notifiers to Symbian OS v9.1 without major changes. Any notifier classes derived from MEikSrvNotifierBase must now derive from MEikSrvNotifierBase2. An enumeration is used to define an ECom-based notifier plug-in interface. This acts as a primary key to separate ECom-based notifier plug-ins from other types.
Note: The Symbian platform architecture still supports old-style (non-ECom-based) plug-ins.
Notifiers have the following features:
They can be installed in ROM (Z:), RAM (C:), or on a memory card (for example, E:).
They can be installed and un-installed using SIS files.
A single plug-in DLL can provide multiple notifiers. The plug-in DLL returns an array of MEikSrvNotifierBase2 class pointers through ECom.
Each notifier can have multiple implementations.
ECom defines standard framework functions that plug-ins implement. Here is an example of the required notifier source code:
EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray1() // Lib main entry point {...} EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray2() // Lib main entry point {...} // Adding ECom support #include <ImplementationProxy.h> const TImplementationProxy ImplementationTable[] = { IMPLEMENTATION_PROXY_ENTRY(0x10022238,NotifierArray1), IMPLEMENTATION_PROXY_ENTRY(0x10022237,NotifierArray2) }; EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) { aTableCount = sizeof(ImplementationTable)/sizeof(TImplementationProxy); return ImplementationTable; }
ECom uses resource files to define the main elements of application GUIs. Resource file names must have the format: <dll_uid>.rss.
The following UIDs may appear in the resource file.
Together, the plug-in_UID and channel_UID uniquely identify the notifier plug-in.
The following resource file corresponds to the C++ Source code, above. It defines two implementations of the notifier interface.
// 10021239.rss // #include "RegistryInfo.rh" #include "Uikon.hrh" RESOURCE REGISTRY_INFO theInfo { dll_uid = 0x10021239; interfaces = { INTERFACE_INFO { interface_uid = KUikonUidPluginInterfaceNotifiers; implementations = { IMPLEMENTATION_INFO { implementation_uid = 0x10022237; version_no = 1; display_name = "TTNOTIFY2V2 Plugin 1"; default_data = "TTNOTIFY2V2"; opaque_data = "0"; }, IMPLEMENTATION_INFO { implementation_uid = 0x10022238; version_no = 1; display_name = "TTNOTIFY2V2 Plugin 2"; default_data = "TTNOTIFY2V2"; opaque_data = "0"; } }; } }; }
This is an example project specification (.mmp) file for the notifier:
target TESTNOTIFIER.DLL targettype PLUGIN capability TrustedUI ProtServ UID 0x10009D8D 0x10021239 sourcepath ... userinclude ... systeminclude \epoc32\include \epoc32\include\techview lang SC start resource 10021239.rss target TESTNOTIFIER.rsc start resource TNOTDIAL.RSS targetpath \private\10003a4a header end source filename.cpp library ECOM.LIB
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.