Enabling Feature Data File Generation
The Feature Manager Database provides a public API for querying whether
managed Symbian platform features are supported on a device. Feature
information is sourced from the feature Manager Database xml file, which lists
the status of features on the device.
The BUILDROM
tool uses the -fm
option to
generate the features data file (features.dat
). The number of
features.dat
files generated depends on the total number of ROM
image partitions specified in the OBEY file that is used to create the ROM
image. For each ROM image partition, a features.dat
file is
generated.
Note: If a feature manager option (-fm
or
-nofm
) is not passed to BUILDROM
explicitly, the
-fm
option is used internally to generate a feature data file
using the default featuredatabase.xml
file in
\epoc32\rom\include
. For more details, refer to
BUILDROM command syntax.
The Feature Manager Database XML file
The feature manager database XML file is a master record of all the
features in the feature management and run-time systems for a given platform.
It includes information on the feature names, the feature UID values and the
default ranges. A range is used to describe attributes for a block of features.
The attributes for the range indicate the lowest and highest UIDs in the range.
DTD of the Feature Manager Database XML file
The DTD(Document Type Definitions) of the Feature Manager Database XML
file must be as follows:
<!ELEMENT hrhmacro EMPTY>
<!ATTLIST hrhmacro
exclude CDATA #IMPLIED
include CDATA #IMPLIED>
<!ELEMENT hfileheader (#PCDATA)>
<!ATTLIST hfileheader
interfacestatus CDATA #REQUIRED
interfacevisibility CDATA #REQUIRED>
<!ELEMENT featureset ((hfileheader?, feature+))>
<!ATTLIST featureset
hfilename CDATA #IMPLIED
ibyname CDATA #IMPLIED
namespace CDATA #IMPLIED>
<!ELEMENT featuredatabase ((featureset+, defaultfeaturerange*))>
<!ELEMENT feature ((hrhmacro, comment?))>
<!ATTLIST feature
name CDATA #REQUIRED
statusflags CDATA #REQUIRED
uid CDATA #REQUIRED
userdata CDATA #IMPLIED>
<!ELEMENT defaultfeaturerange ((comment?))>
<!ATTLIST defaultfeaturerange
higheruid CDATA #REQUIRED
loweruid CDATA #REQUIRED
support CDATA #REQUIRED>
<!ELEMENT comment (#PCDATA)>
Description of the Feature Manager database XML file elements
| |
hrhmacro
|
Represents the obey file macro used to control the feature
inclusion or exclusion from a product. It includes the following attributes.
exclude - defines an exclude macro that indicates a
feature exclusion in the product.
include - defines an include macro that indicates a
feature inclusion in the product.
|
hfileheader
|
Contains the information such as C++ H file header comments,
copyright and interface classification. It includes the following attributes:
interfacestatus - Indicates the status of an
interface. The two possible status are released or draft.
interfacevisibility - Indicates the accessibility of
an interface. The possible values are publishedAll (SDK), publishedPartner
(OEM) and internalTechnology.
|
featureset
|
Indicates a set of features in the feature management system. It
includes the following attributes:
ibyname - Indicates the name of the iby file (for
example, feature.iby ) that is to be generated by the
features.pl tool. If this attribute is not defined for a given
featureset, the obey file will not be generated.
hfilename - Indicates the name of the C++ header file
(for example, publicfeatureUID.h ) that is to be generated by the
features.pl tool.
namespace - Represents the name space used by the C++ identifier.
|
featuredatabase
|
The root element of a document. It includes the following
attributes:
featureset - Indicates a set of features. At least one
featureset element should be present in the feature database. For
each featureset a set of .iby and header files is
generated.
defaultfeaturerange - Contains details of UID ranges
allocated for features which are controlled by default supported/unsupport
status.
|
Feature
|
Describes the feature and includes the following sub-elements and
attributes:
hrhmacro - Represents the obey file macro used to
control feature inclusion or exclusion from a product.
comment - Describes the feature
name – Name of the feature, for example, Bluetooth.
statusflags - indicates the status flag of the
feature. This is a 32 bit hex number.
uid – unique id used to specify the feature. This is a
number.
userdata - stores the default user data value .
|
defaultfeaturerange
|
Contains the details of the Default Supported Range(DSR) and
includes the following sub-elements and attributes:
comment - describes the DSR
higheruid - indicates the upper UID in the range or
UID block
loweruid - indicates the lower UID in the range or UID
block
support - indicates whether to support
inclusion/exclusion of a feature UID range in a product. For example, if
support=exclude , the UIDs in the range will return Not
Supported to EFM clients.
|
Example Feature Manager database
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE featuredatabase SYSTEM "featuredatabase.dtd">
<featuredatabase>
<featureset ibyname="feature.iby" hfilename="featureUIDs.h" namespace="NSdkFeatures">
<hfileheader interfacestatus="@released" interfacevisibility="@publishedPartner">
// publicfeatureUID.h
//
// Copyright (c) Symbian Software Ltd 2007. All rights reserved.
//...................................................
</hfileheader>
<feature uid="0x10279806" statusflags="0x00000001" name="Fax" userdata="0x00000000">
<hrhmacro exclude="SYMBIAN_EXCLUDE_FAX"/>
<comment>
/**
Feature = FAX, status = "Supported" this feature should go to SDK
*/
</comment>
</feature>
<feature uid="0x10279808" statusflags="0x00000001" name="Bluetooth" userdata="0x00000000">
<hrhmacro include="SYMBIAN_INCLUDE_BLUETOOTH"/>
<comment>
/**
Feature = Bluetooth, status = "Supported" this feature should go to SDK
*/
</comment>
</feature>
<feature uid="0x102835B1" statusflags="0x00000001" name="KeypadNoSlider" userdata="0x00000001">
<hrhmacro exclude="SYMBIAN_EXCLUDE_KEYPADNOSLIDER"/>
<comment>
/**
Feature = KeypadNoSlider, status = "Supported" this feature should go to SDK
*/
</comment>
</feature>
</featureset>
<defaultfeaturerange loweruid="0x10279806" higheruid="0x10281805" support="include">
</defaultfeaturerange >
</featuredatabase>