1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/featuremgmt/featuremgr/src/featdiscovery/featdiscoveryimpl.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,119 @@
1.4 +/*
1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +#ifndef FEATDISCOVERYIMPL_H
1.24 +#define FEATDISCOVERYIMPL_H
1.25 +
1.26 +// INCLUDES
1.27 +#include <e32base.h>
1.28 +
1.29 +#include "featurecontrol.h"
1.30 +
1.31 +class CFeatureDiscoveryImpl : public CBase
1.32 + {
1.33 + public:
1.34 +
1.35 + /**
1.36 + * This is a two-phase constructor method that is used to create
1.37 + * a new instance of the CFeatureDiscoveryImpl class.
1.38 + *
1.39 + * @return a pointer to a new instance of the CFeatureDiscoveryImpl class.
1.40 + *
1.41 + * @leave Any One of the Symbian OS system-wide error codes
1.42 + */
1.43 + static CFeatureDiscoveryImpl* NewL();
1.44 +
1.45 + /**
1.46 + * Destructor.
1.47 + */
1.48 + virtual ~CFeatureDiscoveryImpl();
1.49 +
1.50 + /**
1.51 + * Static way to fetch information whether a certain feature is
1.52 + * supported in the current envinronment. There is no need to create
1.53 + * an instance of the class when using this method.
1.54 + *
1.55 + * @param aFeature is the feature UID of the feature that is queried.
1.56 + * @return TBool indicating whether the feature is supported (ETrue)
1.57 + * or not (EFalse). If the feature does not exist, the return value is
1.58 + * EFalse.
1.59 + *
1.60 + * @leave Any One of the Symbian OS system-wide error codes
1.61 + */
1.62 + static TBool IsFeatureSupportedL(TUid aFeature);
1.63 +
1.64 + /**
1.65 + * Dynamic way to fetch information whether a certain feature is
1.66 + * supported in the current environment. Before calling the method
1.67 + * an instance of the CFeatureDiscoveryImpl class need to be created by
1.68 + * using one of the factory methods, NewL() or NewLC(). The created
1.69 + * instance must be deleted after use.
1.70 + *
1.71 + * @param aFeature is the feature UID of the feature that is queried.
1.72 + * @return TBool indicating whether the feature is supported (ETrue)
1.73 + * or not (EFalse). If the feature does not exist, the return value is
1.74 + * EFalse.
1.75 + */
1.76 + TBool IsSupported(TUid aFeature);
1.77 +
1.78 + /**
1.79 + * Static way to fetch information whether set of features are
1.80 + * supported in the current envinronment. There is no need to create
1.81 + * an instance of the class when using this method.
1.82 + *
1.83 + * @param aFeatures is the wrapper class for feature array queried.
1.84 + * @leave Any One of the Symbian OS system-wide error codes
1.85 + */
1.86 + static void FeaturesSupportedL( TFeatureSet& aFeatures );
1.87 +
1.88 + /**
1.89 + * Dynamic way to fetch information whether set of features are
1.90 + * supported in the current environment. Before calling the method
1.91 + * an instance of the CFeatureDiscovery class need to be created by
1.92 + * using one of the factory methods, NewL() or NewLC(). The created
1.93 + * instance must be deleted after use.
1.94 + *
1.95 + * @param aFeatures is the wrapper class for feature array queried.
1.96 + * @return KErrNone if status query succeeded.
1.97 + * Otherwise one of the Symbian OS error codes
1.98 + */
1.99 + TInt FeaturesSupported( TFeatureSet& aFeatures );
1.100 +
1.101 + private:
1.102 +
1.103 + /**
1.104 + * C++ default constructor.
1.105 + */
1.106 + CFeatureDiscoveryImpl();
1.107 +
1.108 + /**
1.109 + * By default Symbian OS constructor is private.
1.110 + */
1.111 + void ConstructL();
1.112 +
1.113 + private:
1.114 +
1.115 + // Feature Manager server client
1.116 + RFeatureControl iFeatControl;
1.117 + } ;
1.118 +
1.119 +
1.120 +#endif // FEATDISCOVERYIMPL_H
1.121 +
1.122 +// EOF