Link against: FeatDiscovery.lib
None
#include <FeatDiscovery.h>
Feature Discovery API provides methods which are used to query which features are supported in the environment. A feature is a functionality that can be optionally left out of some product configurations. Features often depend on the underlying hardware. For example, MMC support or USB support can be features. The API consist of the CFeatureDiscovery class which is used together with feature IDs defined in the featureinfo.h file.
Usage:
#include <FeatDiscovery.h> #include <featureinfo.h> // for feature definitions // If querying only one feature, it is more efficient to use the class // via the static method, IsFeatureSupportedL(). // When querying more than one feature, it is more efficient to use the // class by creating an instance and calling the IsSupported() method. // Static way of using the class: TBool isSupported = CFeatureDiscovery::IsFeatureSupportedL(KFeatureIdUsb); // Dynamic way of using the class using NewL(): // Call NewL() to create an instance of CFeatureDiscovery. CFeatureDiscovery* testA = CFeatureDiscovery::NewL(); // Call the exported IsSupported() method to query whether features // are supported in the current environment or not. TBool usbSupported = testA->IsSupported(KFeatureIdUsb); TBool mmcSupported = testA->IsSupported(KFeatureIdMmc); // Delete the created instance of CFeatureDiscovery. delete testA; // 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 the exported IsSupported() method to query whether features // are supported in the current environment or not. TBool wcdmaSupported = testB->IsSupported(KFeatureIdProtocolWcdma); TBool gsmSupported = testB->IsSupported(KFeatureIdProtocolGsm); // Pop and delete the created instance of CFeatureDiscovery. CleanupStack::PopAndDestroy();
Public Member Functions | |
virtual | ~CFeatureDiscovery () |
Destructor. | |
IMPORT_C TBool | IsSupported (TInt aFeature) const |
Dynamic way to fetch information whether a certain feature is supported in the current environment. | |
Static Public Member Functions | |
static IMPORT_C CFeatureDiscovery * | NewL () |
This is a two-phase constructor method that is used to create a new instance of the CFeatureDiscovery class. | |
static IMPORT_C CFeatureDiscovery * | NewLC () |
This is a two-phase constructor method that is used to create a new instance of the CFeatureDiscovery class. | |
static IMPORT_C TBool | IsFeatureSupportedL (TInt aFeature) |
Static way to fetch information whether a certain feature is supported in the current envinronment. |
|
Destructor. |
|
Static way to fetch information whether a certain feature is supported in the current envinronment. There is no need to create an instance of the class when using this method.
|
|
Dynamic way to fetch information whether a certain feature is supported in the current environment. Before calling the method an instance of the CFeatureDiscovery class need to be created by using one of the factory methods, NewL() or NewLC(). The created instance must be deleted after use.
|
|
This is a two-phase constructor method that is used to create a new instance of the CFeatureDiscovery class.
|
|
This is a two-phase constructor method that is used to create a new instance of the CFeatureDiscovery class. This method leaves the instance of the object on the cleanup stack.
|