diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-711594BD-9B8E-5E8A-A5A9-6C94F65AF064.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-711594BD-9B8E-5E8A-A5A9-6C94F65AF064.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,33 @@ + + + + + +Querying a Single Feature Dynamically Using CFeatureDiscoveryHow to query a feature using CFeatureDiscovery dynamically.

To query whether a feature is supported using CFeatureDiscovery dynamically, take the following steps.

Determine the Uid of the feature. Create an instance of CFeatureDiscovery thus, + // Dynamic way of using the class using NewL(): + + // Call NewL() to create an instance of CFeatureDiscovery. + CFeatureDiscovery* testA = CFeatureDiscovery::NewL(); + or thus + // Dynamic way of using the class using NewLC(): + + // Call NewLC() to create an instance of CFeatureDiscovery. + // The method leaves the instance of the object on the cleanup stack. + CFeatureDiscovery* testB = CFeatureDiscovery::NewLC(); + call its IsSupported() function with the Uid of the feature as argument, and // Call the exported IsSupported() method to query whether features + // are supported in the current environment or not. + TBool usbSupported = testA->IsSupported(<featureUIDx>); + TBool mmcSupported = testA->IsSupported(<featureUIDx>); + delete the instance of CFeatureDiscovery if it was not created using NewLC(). // Delete the created instance of CFeatureDiscovery. + delete testA; +

IsSupported() returns KErrNone if the feature is supported or else an error message.

Querying a single feature + statically using CFeatureDiscovery Querying a feature set dynamically + using CFeatureDiscovery Querying a feature set statically + using CFeatureDiscovery Querying a Single Feature + Dynamically Using RFeatureControl Feature Manager Collection Overview Feature Manager Query Tutorials
\ No newline at end of file