sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef FEATDISCOVERYIMPL_H sl@0: #define FEATDISCOVERYIMPL_H sl@0: sl@0: // INCLUDES sl@0: #include sl@0: sl@0: #include "featurecontrol.h" sl@0: sl@0: class CFeatureDiscoveryImpl : public CBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: * This is a two-phase constructor method that is used to create sl@0: * a new instance of the CFeatureDiscoveryImpl class. sl@0: * sl@0: * @return a pointer to a new instance of the CFeatureDiscoveryImpl class. sl@0: * sl@0: * @leave Any One of the Symbian OS system-wide error codes sl@0: */ sl@0: static CFeatureDiscoveryImpl* NewL(); sl@0: sl@0: /** sl@0: * Destructor. sl@0: */ sl@0: virtual ~CFeatureDiscoveryImpl(); sl@0: sl@0: /** sl@0: * Static way to fetch information whether a certain feature is sl@0: * supported in the current envinronment. There is no need to create sl@0: * an instance of the class when using this method. sl@0: * sl@0: * @param aFeature is the feature UID of the feature that is queried. sl@0: * @return TBool indicating whether the feature is supported (ETrue) sl@0: * or not (EFalse). If the feature does not exist, the return value is sl@0: * EFalse. sl@0: * sl@0: * @leave Any One of the Symbian OS system-wide error codes sl@0: */ sl@0: static TBool IsFeatureSupportedL(TUid aFeature); sl@0: sl@0: /** sl@0: * Dynamic way to fetch information whether a certain feature is sl@0: * supported in the current environment. Before calling the method sl@0: * an instance of the CFeatureDiscoveryImpl class need to be created by sl@0: * using one of the factory methods, NewL() or NewLC(). The created sl@0: * instance must be deleted after use. sl@0: * sl@0: * @param aFeature is the feature UID of the feature that is queried. sl@0: * @return TBool indicating whether the feature is supported (ETrue) sl@0: * or not (EFalse). If the feature does not exist, the return value is sl@0: * EFalse. sl@0: */ sl@0: TBool IsSupported(TUid aFeature); sl@0: sl@0: /** sl@0: * Static way to fetch information whether set of features are sl@0: * supported in the current envinronment. There is no need to create sl@0: * an instance of the class when using this method. sl@0: * sl@0: * @param aFeatures is the wrapper class for feature array queried. sl@0: * @leave Any One of the Symbian OS system-wide error codes sl@0: */ sl@0: static void FeaturesSupportedL( TFeatureSet& aFeatures ); sl@0: sl@0: /** sl@0: * Dynamic way to fetch information whether set of features are sl@0: * supported in the current environment. Before calling the method sl@0: * an instance of the CFeatureDiscovery class need to be created by sl@0: * using one of the factory methods, NewL() or NewLC(). The created sl@0: * instance must be deleted after use. sl@0: * sl@0: * @param aFeatures is the wrapper class for feature array queried. sl@0: * @return KErrNone if status query succeeded. sl@0: * Otherwise one of the Symbian OS error codes sl@0: */ sl@0: TInt FeaturesSupported( TFeatureSet& aFeatures ); sl@0: sl@0: private: sl@0: sl@0: /** sl@0: * C++ default constructor. sl@0: */ sl@0: CFeatureDiscoveryImpl(); sl@0: sl@0: /** sl@0: * By default Symbian OS constructor is private. sl@0: */ sl@0: void ConstructL(); sl@0: sl@0: private: sl@0: sl@0: // Feature Manager server client sl@0: RFeatureControl iFeatControl; sl@0: } ; sl@0: sl@0: sl@0: #endif // FEATDISCOVERYIMPL_H sl@0: sl@0: // EOF