os/persistentdata/featuremgmt/featuremgr/src/featdiscovery/featdiscoveryimpl.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 
    19 
    20 #ifndef FEATDISCOVERYIMPL_H 
    21 #define FEATDISCOVERYIMPL_H 
    22 
    23 //  INCLUDES
    24 #include <e32base.h>
    25 
    26 #include "featurecontrol.h"
    27 
    28 class CFeatureDiscoveryImpl : public CBase
    29     {
    30     public:
    31 	    
    32 	    /**
    33 	    * This is a two-phase constructor method that is used to create
    34 	    * a new instance of the CFeatureDiscoveryImpl class.
    35 	    *
    36 	    * @return a pointer to a new instance of the CFeatureDiscoveryImpl class.
    37 	    *
    38 	    * @leave Any One of the Symbian OS system-wide error codes
    39 	    */
    40 		static CFeatureDiscoveryImpl* NewL();
    41 	
    42 	    /**
    43 	    * Destructor.
    44 	    */
    45 		virtual ~CFeatureDiscoveryImpl();
    46 	
    47 		/**
    48 	    * Static way to fetch information whether a certain feature is 
    49 	    * supported in the current envinronment. There is no need to create
    50 	    * an instance of the class when using this method.
    51 	    *
    52 	    * @param aFeature is the feature UID of the feature that is queried.
    53 	    * @return TBool indicating whether the feature is supported (ETrue)
    54 	    * or not (EFalse). If the feature does not exist, the return value is 
    55 	    * EFalse.
    56 	    *
    57 	    * @leave Any One of the Symbian OS system-wide error codes
    58 	    */
    59 	    static TBool IsFeatureSupportedL(TUid aFeature);
    60 	
    61 		/**
    62 	    * Dynamic way to fetch information whether a certain feature is 
    63  		* supported in the current environment. Before calling the method 
    64 	    * an instance of the CFeatureDiscoveryImpl class need to be created by 
    65 	    * using one of the factory methods, NewL() or NewLC(). The created 
    66 	    * instance must be deleted after use.
    67 	    *
    68 	    * @param aFeature is the feature UID of the feature that is queried.
    69 	    * @return TBool indicating whether the feature is supported (ETrue)
    70 	    * or not (EFalse). If the feature does not exist, the return value is 
    71 	    * EFalse.
    72 	    */
    73 		TBool IsSupported(TUid aFeature);
    74 
    75 		/**
    76 		* Static way to fetch information whether set of features are 
    77 		* supported in the current envinronment. There is no need to create
    78 		* an instance of the class when using this method.
    79 		*
    80 		* @param aFeatures is the wrapper class for feature array queried.
    81 		* @leave Any One of the Symbian OS system-wide error codes
    82 		*/
    83 		static void FeaturesSupportedL( TFeatureSet& aFeatures );
    84 
    85 		/**
    86 	    * Dynamic way to fetch information whether set of features are 
    87  		* supported in the current environment. Before calling the method 
    88 	    * an instance of the CFeatureDiscovery class need to be created by 
    89 	    * using one of the factory methods, NewL() or NewLC(). The created 
    90 	    * instance must be deleted after use.
    91 	    *	    
    92 	    * @param aFeatures is the wrapper class for feature array queried.
    93 	    * @return KErrNone if status query succeeded.
    94 	    *         Otherwise one of the Symbian OS error codes
    95 	    */
    96 		TInt FeaturesSupported( TFeatureSet& aFeatures );
    97 			  
    98     private:
    99 
   100 	    /**
   101 	    * C++ default constructor.
   102 	    */
   103 			CFeatureDiscoveryImpl();
   104 	
   105 	    /**
   106 	    * By default Symbian OS constructor is private.
   107 	    */
   108 	    void ConstructL();
   109 	    
   110     private:
   111 
   112 		// Feature Manager server client 
   113 		RFeatureControl iFeatControl;
   114     } ;
   115 
   116 
   117 #endif  // FEATDISCOVERYIMPL_H 
   118 
   119 // EOF