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 FEATMGRFEATUREENTRY_H
|
sl@0
|
21 |
#define FEATMGRFEATUREENTRY_H
|
sl@0
|
22 |
|
sl@0
|
23 |
#include <e32cmn.h>
|
sl@0
|
24 |
#include <featmgr/featurecmn.h>
|
sl@0
|
25 |
|
sl@0
|
26 |
class RReadStream;
|
sl@0
|
27 |
class RWriteStream;
|
sl@0
|
28 |
|
sl@0
|
29 |
|
sl@0
|
30 |
/**
|
sl@0
|
31 |
An enumeration for accessing internal feature status flags bits 24..31 used
|
sl@0
|
32 |
inside the server. See TFeatureFlags in published header featurecmn.h for the
|
sl@0
|
33 |
flag definitions 0..23.
|
sl@0
|
34 |
|
sl@0
|
35 |
@see TFeatureFlags
|
sl@0
|
36 |
@see TBitFlagsT
|
sl@0
|
37 |
@internalComponent
|
sl@0
|
38 |
*/
|
sl@0
|
39 |
enum TFeatureFlagsServer
|
sl@0
|
40 |
{
|
sl@0
|
41 |
// Do not define flags here for values 0..23. See TFeatureFlags enum.
|
sl@0
|
42 |
|
sl@0
|
43 |
/** If set, the feature flag is a Runtime feature flag (created at run time).
|
sl@0
|
44 |
if not set means source of feature flag is ROM or plug-in */
|
sl@0
|
45 |
EFeatureRuntime = 24,
|
sl@0
|
46 |
|
sl@0
|
47 |
// Reserved flags, these are not currently used in the server
|
sl@0
|
48 |
EFeatureFlagUnused25 = 25,
|
sl@0
|
49 |
EFeatureFlagUnused26 = 26,
|
sl@0
|
50 |
EFeatureFlagUnused27 = 27,
|
sl@0
|
51 |
EFeatureFlagUnused28 = 28,
|
sl@0
|
52 |
EFeatureFlagUnused29 = 29,
|
sl@0
|
53 |
EFeatureFlagUnused30 = 30,
|
sl@0
|
54 |
EFeatureFlagUnused31 = 31
|
sl@0
|
55 |
};
|
sl@0
|
56 |
|
sl@0
|
57 |
|
sl@0
|
58 |
// CLASS DECLARATION
|
sl@0
|
59 |
// @see corresponding client side class TFeatureEntry
|
sl@0
|
60 |
|
sl@0
|
61 |
class TFeatureServerEntry
|
sl@0
|
62 |
{
|
sl@0
|
63 |
public:
|
sl@0
|
64 |
|
sl@0
|
65 |
/**
|
sl@0
|
66 |
* Constructors.
|
sl@0
|
67 |
*/
|
sl@0
|
68 |
TFeatureServerEntry();
|
sl@0
|
69 |
TFeatureServerEntry( TUid aFeature );
|
sl@0
|
70 |
TFeatureServerEntry( TUid aFeature, TBitFlags32 aFlags, TUint32 aData );
|
sl@0
|
71 |
TFeatureServerEntry( TFeatureEntry& aEntry );
|
sl@0
|
72 |
|
sl@0
|
73 |
/**
|
sl@0
|
74 |
* Returns feature status flags.
|
sl@0
|
75 |
*/
|
sl@0
|
76 |
TBitFlags32 FeatureFlags() const;
|
sl@0
|
77 |
|
sl@0
|
78 |
/**
|
sl@0
|
79 |
* Returns feature data.
|
sl@0
|
80 |
*/
|
sl@0
|
81 |
TUint32 FeatureData() const;
|
sl@0
|
82 |
|
sl@0
|
83 |
/**
|
sl@0
|
84 |
* Returns feature UID.
|
sl@0
|
85 |
*/
|
sl@0
|
86 |
TUid FeatureUid() const;
|
sl@0
|
87 |
|
sl@0
|
88 |
/**
|
sl@0
|
89 |
* Internalize object from stream
|
sl@0
|
90 |
*/
|
sl@0
|
91 |
void InternalizeL( RReadStream& aStream );
|
sl@0
|
92 |
|
sl@0
|
93 |
/**
|
sl@0
|
94 |
* Externalize object from stream
|
sl@0
|
95 |
*/
|
sl@0
|
96 |
void ExternalizeL( RWriteStream& aStream ) const;
|
sl@0
|
97 |
|
sl@0
|
98 |
/**
|
sl@0
|
99 |
*This sets a feature's flags and data
|
sl@0
|
100 |
*/
|
sl@0
|
101 |
void inline Set( TFeatureServerEntry aEntry)
|
sl@0
|
102 |
{
|
sl@0
|
103 |
iFlags = aEntry.FeatureFlags();
|
sl@0
|
104 |
iData = aEntry.FeatureData();
|
sl@0
|
105 |
}
|
sl@0
|
106 |
|
sl@0
|
107 |
/**
|
sl@0
|
108 |
*This sets a feature's flags and data
|
sl@0
|
109 |
*/
|
sl@0
|
110 |
void inline Set(TBitFlags32 aFlags, TUint32 aData)
|
sl@0
|
111 |
{
|
sl@0
|
112 |
iFlags = aFlags;
|
sl@0
|
113 |
iData = aData;
|
sl@0
|
114 |
}
|
sl@0
|
115 |
|
sl@0
|
116 |
private:
|
sl@0
|
117 |
|
sl@0
|
118 |
/** UID of the feature. */
|
sl@0
|
119 |
TUid iFeatureID;
|
sl@0
|
120 |
|
sl@0
|
121 |
/** Value of the feature status flags.
|
sl@0
|
122 |
@see TFeatureFlags
|
sl@0
|
123 |
@see TFeatureFlagsServer */
|
sl@0
|
124 |
TBitFlags32 iFlags;
|
sl@0
|
125 |
|
sl@0
|
126 |
/** Data associated with feature. */
|
sl@0
|
127 |
TUint32 iData;
|
sl@0
|
128 |
};
|
sl@0
|
129 |
|
sl@0
|
130 |
/**
|
sl@0
|
131 |
* Defines TFeatureEntry array.
|
sl@0
|
132 |
*/
|
sl@0
|
133 |
typedef RArray<TFeatureServerEntry> RFeatureServerArray;
|
sl@0
|
134 |
|
sl@0
|
135 |
#endif // FEATMGRFEATUREENTRY_H
|
sl@0
|
136 |
|
sl@0
|
137 |
// End of File
|