author | Dominic Pinkman <Dominic.Pinkman@Nokia.com> |
Thu, 11 Mar 2010 18:02:22 +0000 | |
changeset 3 | 46218c8b8afa |
parent 1 | 25a17d01db0c |
child 5 | f345bda72bc4 |
permissions | -rw-r--r-- |
1
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
2 |
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
3 |
<!-- This component and the accompanying materials are made available under the terms of the License |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
4 |
"Eclipse Public License v1.0" which accompanies this distribution, |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
5 |
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
6 |
<!-- Initial Contributors: |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
7 |
Nokia Corporation - initial contribution. |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
8 |
Contributors: |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
9 |
--> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
10 |
<!DOCTYPE task |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
11 |
PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
12 |
<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"> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
13 |
// Dynamic way of using multiple feature query. This is preferred |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
14 |
// way to fetch support statuses if there are several features to be |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
15 |
// queried, because it involves less inter-process communication. |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
16 |
TFeatureSet featset; |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
17 |
</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"> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
18 |
User::LeaveIfError( featset.Append( <featureUIDx> ) ); |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
19 |
User::LeaveIfError( featset.Append( <featureUIDx> ) ); |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
20 |
</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"> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
21 |
// Call NewLC() to create an instance of CFeatureDiscovery. |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
22 |
// The method leaves the instance of the object on the cleanup stack. |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
23 |
CFeatureDiscovery* testB = CFeatureDiscovery::NewLC(); |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
24 |
</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"> |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
25 |
// Call the exported IsSupported() method to query whether features |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
26 |
// are supported in the current environment or not. |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
27 |
TBool wcdmaSupported = testB->IsSupported(<featureUIDx>); |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
28 |
TBool gsmSupported = testB->IsSupported(<featureUIDx>); |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
29 |
</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 |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
30 |
dynamically using CFeatureDiscovery</linktext> </link> <link href="GUID-08ED8657-DB96-59AC-9016-602BD5680752.dita"><linktext>Querying a single feature |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
31 |
statically using CFeatureDiscovery</linktext> </link> <link href="GUID-DAC496E8-C8D0-5EC6-9A5D-5F5DA667D083.dita"><linktext>Querying a feature set statically |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
32 |
using CFeatureDiscovery</linktext> </link> <link href="GUID-B7A7E2E8-E727-5A01-8C1B-60679B6AA3D4.dita"><linktext>Querying a Single Feature |
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
33 |
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> |