|
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 FEATMGRCLIENT_H |
|
21 #define FEATMGRCLIENT_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <babitflags.h> |
|
26 #include <featmgr/featurecmn.h> |
|
27 #include "featmgrclientserver.h" |
|
28 #include "featureclient.h" |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 Base class of the client-side handle to a session with the Feature Manager Server. |
|
34 |
|
35 */ |
|
36 NONSHARABLE_CLASS(RFeatMgrClient) : public RSessionBase, public MFeatureClient |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 C++ default constructor. |
|
42 */ |
|
43 RFeatMgrClient(); |
|
44 |
|
45 public: // New functions |
|
46 |
|
47 /** |
|
48 Connects to server |
|
49 |
|
50 @return KErrNone if connect succesfully, otherwise system wide error |
|
51 */ |
|
52 TInt Connect(); |
|
53 |
|
54 /** |
|
55 From MFeatureClient |
|
56 */ |
|
57 TInt FeatureSupported( TFeatureEntry& aFeature ) const; |
|
58 |
|
59 TInt FeaturesSupported( RFeatureArray& aFeatures ); |
|
60 |
|
61 TInt EnableFeature( TUid aFeature ) const; |
|
62 |
|
63 TInt DisableFeature( TUid aFeature ) const; |
|
64 |
|
65 TInt SetFeature( TUid aFeature, TBool aEnabled, TInt aData ) const; |
|
66 |
|
67 TInt SetFeature( TUid aFeature, TInt aData ) const; |
|
68 |
|
69 TInt AddFeature( TFeatureEntry aEntry ) const; |
|
70 |
|
71 TInt DeleteFeature( TUid aFeature ) const; |
|
72 |
|
73 void ListSupportedFeaturesL( RFeatureUidArray& aSupportedFeatures ); |
|
74 |
|
75 TInt RequestNotification( RFeatureUidArray& aFeatures, TUid& aFeatUid, |
|
76 TRequestStatus& aStatus ); |
|
77 |
|
78 TInt ReRequestNotification( TUid& aFeatUid, TRequestStatus& aStatus ); |
|
79 |
|
80 TInt RequestNotifyCancel( TUid aFeature ) const; |
|
81 |
|
82 TInt RequestNotifyCancelAll( ) const; |
|
83 |
|
84 TInt SWIStart() const; |
|
85 |
|
86 TInt SWIEnd() const; |
|
87 |
|
88 private: |
|
89 |
|
90 /** |
|
91 Return version of server |
|
92 @param |
|
93 @return version of server |
|
94 */ |
|
95 TVersion ServerVersion() const; |
|
96 |
|
97 /** |
|
98 Starts server |
|
99 @return KErrNone if started succesfully, otherwise system wide error |
|
100 */ |
|
101 TInt StartServer(); |
|
102 |
|
103 void SendUidArrayL(RFeatureUidArray& aFeatures, TInt &retval); |
|
104 |
|
105 void SendRcvFeatureArrayL(RFeatureArray& aFeatures, TInt &retval); |
|
106 |
|
107 private: |
|
108 |
|
109 TPtr8 iFeaturePckg; |
|
110 |
|
111 |
|
112 #ifdef EXTENDED_FEATURE_MANAGER_TEST |
|
113 // Public DEBUG API functions |
|
114 public: |
|
115 |
|
116 TInt NumberOfNotifyFeatures( void ) const; |
|
117 TInt CountAllocCells( void ) const; |
|
118 #endif |
|
119 |
|
120 }; |
|
121 |
|
122 #endif // FEATMGRCLIENT_H |
|
123 |
|
124 // End of File |