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