CAF defines an ECom plug-in interface for third-party CAF agents. The interface allows new agents to be integrated dynamically, if required. In order to use CAF content, applications use the resource files.
The default_data section of an CA agent or CA agent proxy's resource file is used to specify three pieces of information:
The buffer size required by this agent to recognize a file when ContentAccess::CAgentManager::RecognizeFileL() is called.
A list of supplier MIME types supported by this agent.
A list of consumer MIME types supported by this agent.
The buffer size section is separated from the supplier MIME types by a '|' character and the supplier MIME types are separated from the consumer MIME types by a ':' character.
The following example explains the default_data section for an OMA DRM agent:
default_data="100|application/vnd.oma.drm.message,application/vnd.oma.drm.rights+xml:application/vnd.oma.drm.content";
The opaque_data section is used to specify the agent's private directory under c:\private\. This is the SID (SecureId) of the server which owns the directory, for example:
opaque_data="12345678";
If the agent does not have a corresponding private directory or does not wish to provide access to that directory, it must just leave the opaque_data section as an empty string.
// 101FE8F1.rss // UIDs quick-ref // // ECom DLL UID: 0x101FE8F1 // CA agent interface UID: 0x10204740 // Test CAA Implementation: 0x101FE8F2 #include "RegistryInfo.rh" RESOURCE REGISTRY_INFO theInfo { dll_uid = 0x101FE8F1; interfaces = { INTERFACE_INFO { interface_uid = 0x10204740; implementations = { IMPLEMENTATION_INFO { implementation_uid = 0x101FE8F2; version_no = 1; display_name = "Test Agent"; default_data = "255|application/vnd.oma.drm.message,application/vnd.oma.drm.content:application/vnd.oma.drm.content"; // Sample CAF types opaque_data = "12345678"; } }; } }; }
0x10009D8D — the ECom DLL UID. Identifies a DLL as an ECom plug-in.
0x101FC2CE — the Content Access Agent v1.0 interface. An implementation of ContentAccess::CAgentFactory::NewL().
0x10204740 — the Content Access Agent v2.0 interface. An implementation of ContentAccess::CAgentFactory::NewL().
Note: When writing a new CA agent, all other UIDs used in the above examples must be replaced by new UIDs from the Symbian UID generator.
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.