week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE task
PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task xml:lang="en" id="GUID-3D50D2DE-A202-5560-80AB-0DBAC332179F"><title>Querying a Feature Set Dynamically Using CFeatureDiscovery</title><shortdesc>How to query a feature set using <apiname>CFeatureDiscovery</apiname> dynamically. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody><context id="GUID-2D805B5A-E4F5-5677-8114-AA8E5F17A221"><p>To query whether a feature is supported in a feature set using <xref href="GUID-2C9E6E72-2858-37A1-9D43-4E8086569520.dita"><apiname>CFeatureDiscovery</apiname></xref> dynamically, take the following steps. </p> </context> <steps id="GUID-88C90174-AA62-55B4-B2A7-FDC8B833081F"><step id="GUID-889198A4-C9A7-56C2-8F92-A334C7569C57"><cmd/><info>Decide the set of features you want to query and determine their Uids, </info> </step> <step id="GUID-52AF6109-A249-5F38-9634-01BD72486DA6"><cmd/><info>create an instance of <xref href="GUID-7C19450F-41CF-3293-B8BF-4A4D6F795155.dita"><apiname>TFeatureSet</apiname></xref>, </info> <stepxmp><codeblock id="GUID-A4291810-0E7B-56BD-843F-6EF46DC523CE" xml:space="preserve">
// Dynamic way of using multiple feature query. This is preferred
// way to fetch support statuses if there are several features to be
// queried, because it involves less inter-process communication.
TFeatureSet featset;
</codeblock> </stepxmp> </step> <step id="GUID-B3F1CECE-D775-5543-BA94-B4AAD2D5246D"><cmd/><info>add each feature you want to query by calling the <xref href="GUID-15C03838-4E72-3459-AE9E-52359DC065FD.dita"><apiname>Append()</apiname></xref> function of <xref href="GUID-7C19450F-41CF-3293-B8BF-4A4D6F795155.dita"><apiname>TFeatureSet</apiname></xref> with the Uid of the feature as argument (one call for each feature), </info> <stepxmp><codeblock id="GUID-71DE607E-3204-5CA5-846B-998155071135" xml:space="preserve">
User::LeaveIfError( featset.Append( <featureUIDx> ) );
User::LeaveIfError( featset.Append( <featureUIDx> ) );
</codeblock> </stepxmp> </step> <step id="GUID-4F96DE36-2FA4-5465-8DDF-2EC53F468950"><cmd/><info>create an instance of <xref href="GUID-2C9E6E72-2858-37A1-9D43-4E8086569520.dita"><apiname>CFeatureDiscovery</apiname></xref>, </info> <stepxmp><codeblock id="GUID-F4DFBFD2-AF1E-5E0B-BE83-E2233268D364" xml:space="preserve">
// Call NewLC() to create an instance of CFeatureDiscovery.
// The method leaves the instance of the object on the cleanup stack.
CFeatureDiscovery* testB = CFeatureDiscovery::NewLC();
</codeblock> </stepxmp> </step> <step id="GUID-28A2A4F9-B510-5CE2-A3FC-FC7CC29D9242"><cmd/><info>call its <xref href="GUID-EA75A8A3-9862-3AAE-AC00-FCBEBA42BE34.dita"><apiname>FeaturesSupported()</apiname></xref> function with the <xref href="GUID-7C19450F-41CF-3293-B8BF-4A4D6F795155.dita"><apiname>TFeatureSet</apiname></xref> as argument, and </info> <stepxmp><codeblock id="GUID-516EA63D-42E3-5E6D-AD68-DD4A7E0EDE85" xml:space="preserve">
// Call the exported IsSupported() method to query whether features
// are supported in the current environment or not.
TBool wcdmaSupported = testB->IsSupported(<featureUIDx>);
TBool gsmSupported = testB->IsSupported(<featureUIDx>);
</codeblock> </stepxmp> </step> <step id="GUID-CC3CEDB9-7289-516E-968F-B04760CA6DA4"><cmd/><info>destroy the <xref href="GUID-2C9E6E72-2858-37A1-9D43-4E8086569520.dita"><apiname>CFeatureDiscovery</apiname></xref> instance when you have finished with it if it was created with <xref href="GUID-93132FF9-512F-30EC-8AB0-BD3E98F668E6.dita"><apiname>NewL()</apiname></xref> rather than <xref href="GUID-343E6447-4947-34EE-8641-3CB72930CCF6.dita"><apiname>NewLC()</apiname></xref>. </info> </step> </steps> </taskbody><related-links><link href="GUID-711594BD-9B8E-5E8A-A5A9-6C94F65AF064.dita"><linktext>Querying a single feature
dynamically using CFeatureDiscovery</linktext> </link> <link href="GUID-08ED8657-DB96-59AC-9016-602BD5680752.dita"><linktext>Querying a single feature
statically using CFeatureDiscovery</linktext> </link> <link href="GUID-DAC496E8-C8D0-5EC6-9A5D-5F5DA667D083.dita"><linktext>Querying a feature set statically
using CFeatureDiscovery</linktext> </link> <link href="GUID-B7A7E2E8-E727-5A01-8C1B-60679B6AA3D4.dita"><linktext>Querying a Single Feature
Dynamically Using RFeatureControl</linktext> </link> <link href="GUID-B71AC5E3-8AA8-55AD-916F-9E873926011B.dita"><linktext>Feature Manager Collection Overview</linktext> </link> <link href="GUID-1A22E574-831B-5D00-98BD-0DFFA9CC09A0.dita"><linktext>Feature Manager Query Tutorials</linktext> </link> </related-links></task>