This page describes how to migrate data recognizers to the secure version of the Symbian platform.
Converting data recognizers into ECOM plugins
Changing the ECOM resource file - Change the ECOM resource file to specify:
interface UID. This identifies the plugin scheme, and should be 0x101F7D87 for data recognizers
implementation UID. This uniquely identifies the plugin.
For example:
#include <RegistryInfo.rh>
RESOURCE REGISTRY_INFO r_registry
{
dll_uid = <DLLUID>; // Should match the name of this file
// The name of the resource file is <DLLUID>.rss
interfaces =
{
INTERFACE_INFO
{
interface_uid = 0x101F7D87; // Const for all data recognizers
implementations =
{
IMPLEMENTATION_INFO
{
implementation_uid = <Unique Implementation Uid>;
version_no = 1;
display_name = "DataRecName";
default_data = "";
opaque_data = "";
}
};
}
};
}
Changing the source code -
Both the data recognizer's .h and .cpp files need code adding to create the data recognizer. For example:example.h
class CExampleDataRecognizer : public CApaDataRecognizerType
{
public:
static CApaDataRecognizerType* CreateRecognizerL();
};
example.cpp
CApaDataRecognizerType* CExampleDataRecognizer::CreateRecognizerL()
{
return new (ELeave) CExampleDataRecognizer ();
}
const TImplementationProxy ImplementationTable[] =
{
IMPLEMENTATION_PROXY_ENTRY(UNIQUE IMPLEMENTATION UID, CExampleDataRecognizer::CreateRecognizerL)
};
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
{
aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
return ImplementationTable;
}
// Remove the previously EXPORTED function
EXPORT_C CApaDataRecognizerType* CreateRecognizer ()
{
}
Converting data recognizers into pre-platform security style plugins
You can convert data recognizers into plug-ins of the sort used before Platform Security was introduced by:
Changing the source code - The data recognizer's .cpp file needs code adding to create the data recognizer. For example:
example.cpp
EXPORT_C CApaDataRecognizerType* CreateRecognizer()
{
CExampleDataRecognizer * thing=NULL;
thing = new CExampleDataRecognizer();
return thing; // null if new failed
}
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.