79
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 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: This file contains declearation of CMuiuFlags class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef CMUIUFLAGGER_H
|
|
22 |
#define CMUIUFLAGGER_H
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
#include <muiuflags.h>
|
|
26 |
#include <e32cmn.h>
|
|
27 |
|
|
28 |
// CONSTANTS
|
|
29 |
// MACROS
|
|
30 |
// DATA TYPES
|
|
31 |
struct TMuiuLocalFeatureItem
|
|
32 |
{
|
|
33 |
// The Central Repository ID to be used to access the feature
|
|
34 |
TUid iUid;
|
|
35 |
// The Key id that is used to get the value
|
|
36 |
TUint32 iKeyId;
|
|
37 |
// Value to be used to set the feature
|
|
38 |
TUint32 iFlag;
|
|
39 |
// iFlag is a flag (ETrue) or an index (EFalse)
|
|
40 |
TBool iIsFlag;
|
|
41 |
};
|
|
42 |
|
|
43 |
typedef RArray<TUint> TMuiuGlobalFeatureArray;
|
|
44 |
typedef RArray<TMuiuLocalFeatureItem> TMuiuLocalFeatureArray;
|
|
45 |
typedef RArray<TBool> TMuiuFlagArray;
|
|
46 |
|
|
47 |
// FUNCTION PROTOTYPES
|
|
48 |
// FORWARD DECLARATIONS
|
|
49 |
// CLASS DECLARATION
|
|
50 |
|
|
51 |
/**
|
|
52 |
* ?one_line_short_description.
|
|
53 |
* ?other_description_lines
|
|
54 |
*
|
|
55 |
* @lib ?library
|
|
56 |
* @since Series60 3.0
|
|
57 |
*/
|
|
58 |
class CMuiuFlags : public CBase
|
|
59 |
{
|
|
60 |
public: // Constructors and destructor
|
|
61 |
|
|
62 |
/**
|
|
63 |
*
|
|
64 |
* @since Series60 3.0
|
|
65 |
*/
|
|
66 |
IMPORT_C static CMuiuFlags* NewL(
|
|
67 |
const TMuiuGlobalFeatureArray* aGlobalFeatures = NULL,
|
|
68 |
const TMuiuLocalFeatureArray* aLocalFeatures = NULL,
|
|
69 |
const TMuiuFlagArray* aFlags = NULL );
|
|
70 |
|
|
71 |
/**
|
|
72 |
*
|
|
73 |
* @since Series60 3.0
|
|
74 |
*/
|
|
75 |
IMPORT_C static CMuiuFlags* NewLC(
|
|
76 |
const TMuiuGlobalFeatureArray* aGlobalFeatures = NULL,
|
|
77 |
const TMuiuLocalFeatureArray* aLocalFeatures = NULL,
|
|
78 |
const TMuiuFlagArray* aFlags = NULL );
|
|
79 |
|
|
80 |
|
|
81 |
IMPORT_C virtual ~CMuiuFlags();
|
|
82 |
|
|
83 |
public: // New functions
|
|
84 |
|
|
85 |
inline TBool GF(
|
|
86 |
const TUint aGlobalFlag ) const;
|
|
87 |
inline TBool LF(
|
|
88 |
const TUint aLocalFeature ) const;
|
|
89 |
|
|
90 |
inline void SetFlag(
|
|
91 |
const TUint aFlag );
|
|
92 |
inline void ClearFlag(
|
|
93 |
const TUint aFlag );
|
|
94 |
inline TBool Flag(
|
|
95 |
const TUint aFlag ) const;
|
|
96 |
inline void ChangeFlag(
|
|
97 |
const TUint aFlag,
|
|
98 |
const TBool aNewState );
|
|
99 |
|
|
100 |
public: // Functions from base classes
|
|
101 |
|
|
102 |
protected: // New virtual functions
|
|
103 |
protected: // New functions
|
|
104 |
protected: // Functions from base classes
|
|
105 |
|
|
106 |
private: // Constructors and destructor
|
|
107 |
|
|
108 |
CMuiuFlags();
|
|
109 |
void ConstructL(
|
|
110 |
const TMuiuGlobalFeatureArray* aGlobalFeatures,
|
|
111 |
const TMuiuLocalFeatureArray* aLocalFeatures,
|
|
112 |
const TMuiuFlagArray* aFlags );
|
|
113 |
|
|
114 |
private: // New virtual functions
|
|
115 |
private: // New functions
|
|
116 |
|
|
117 |
// FLAG HANDLERS
|
|
118 |
|
|
119 |
/**
|
|
120 |
*
|
|
121 |
* @since Series60 3.0
|
|
122 |
*/
|
|
123 |
void PrepareGlobalFeaturesL(
|
|
124 |
const TMuiuGlobalFeatureArray& aGlobalFeatures );
|
|
125 |
|
|
126 |
/**
|
|
127 |
*
|
|
128 |
* @since Series60 3.0
|
|
129 |
*/
|
|
130 |
void PrepareLocalFeaturesL(
|
|
131 |
const TMuiuLocalFeatureArray& aLocalFeatures );
|
|
132 |
|
|
133 |
/**
|
|
134 |
*
|
|
135 |
* @since Series60 3.0
|
|
136 |
*/
|
|
137 |
void PrepareGeneralFlags(
|
|
138 |
const TMuiuFlagArray& aFlags );
|
|
139 |
|
|
140 |
inline void ChangeGF(
|
|
141 |
const TUint aGlobalFlag,
|
|
142 |
const TBool aNewState );
|
|
143 |
|
|
144 |
inline void ChangeLF(
|
|
145 |
const TUint aLocalFlag,
|
|
146 |
const TBool aNewState );
|
|
147 |
|
|
148 |
inline void HandleSetFlag(
|
|
149 |
TMuiuFlags& aFlags,
|
|
150 |
const TUint aFlag ) const;
|
|
151 |
inline void HandleClearFlag(
|
|
152 |
TMuiuFlags& aFlags,
|
|
153 |
const TUint aFlag ) const;
|
|
154 |
inline TBool HandleFlag(
|
|
155 |
const TMuiuFlags& aFlags,
|
|
156 |
const TUint aFlag ) const;
|
|
157 |
inline void HandleChangeFlag(
|
|
158 |
TMuiuFlags& aFlags,
|
|
159 |
const TUint aFlag,
|
|
160 |
const TBool aNewState ) const;
|
|
161 |
|
|
162 |
private: // Functions from base classes
|
|
163 |
|
|
164 |
public: // Data
|
|
165 |
protected: // Data
|
|
166 |
private: // Data
|
|
167 |
|
|
168 |
// Flag storage for global features
|
|
169 |
TMuiuFlags iGlobalFeatures;
|
|
170 |
// Flag storage for local features
|
|
171 |
TMuiuFlags iLocalFeatures;
|
|
172 |
// Flag storage for basic flags
|
|
173 |
TMuiuFlags iFlags;
|
|
174 |
};
|
|
175 |
|
|
176 |
#include <muiuflagger.inl>
|
|
177 |
|
|
178 |
#endif // CMUIUFLAGGER_H
|
|
179 |
|
|
180 |
// End of File
|