|
1 /* |
|
2 * Copyright (c) 2007 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: Video Telephone local variation class definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef T_VTUILOCALVARIATION_H |
|
20 #define T_VTUILOCALVARIATION_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "tvtflagcontainer.h" |
|
25 |
|
26 // User selectable Call answer status values |
|
27 const TInt KAllwaysQuery = 0; |
|
28 const TInt KAllwaysAllow = 2; |
|
29 const TInt KNumberOfTbButtons = 6; |
|
30 |
|
31 /** |
|
32 * TVtUiVariationBase |
|
33 * |
|
34 * Base class for local variation classes. |
|
35 * |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS( TVtUiVariationBase ) : public TVtFlagContainer |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Reads variations from central reposityory. |
|
44 * and set default value in case error |
|
45 */ |
|
46 virtual void ReadL( const TInt adefault = -1 ); |
|
47 |
|
48 protected: |
|
49 |
|
50 /** |
|
51 * Returns UID of the repository to be read. |
|
52 */ |
|
53 virtual const TUid& Uid() const = 0; |
|
54 |
|
55 /** |
|
56 * ID of the key inside repository to be read. |
|
57 */ |
|
58 virtual TUint32 Key() const = 0; |
|
59 |
|
60 /** |
|
61 * Gets key value. |
|
62 */ |
|
63 virtual TUint32 ReceiveValue() const; |
|
64 |
|
65 }; |
|
66 |
|
67 /** |
|
68 * TVtUiVideoTelephonyVariation |
|
69 * |
|
70 * Video Telephony variation class. Reads VT local variation flags from the |
|
71 * CenRep and contains methods to query flag states. This class should be |
|
72 * instanced only once and same instance should be passesd as reference to |
|
73 * modules that need this local variation information. |
|
74 * |
|
75 * @since S60 v3.2 |
|
76 */ |
|
77 NONSHARABLE_CLASS( TVtUiVideoTelephonyVariation ) : public TVtUiVariationBase |
|
78 { |
|
79 |
|
80 public: |
|
81 |
|
82 /** |
|
83 * Return whether or not ScalingMethodENearest is set in local variation. |
|
84 * |
|
85 * @return ETrue if ScalingMethodENearest local variation flag is set, |
|
86 * EFalse otherwise. |
|
87 */ |
|
88 inline TBool IsScalingMethodENearest() const; |
|
89 |
|
90 /** |
|
91 * Return whether or not ScalingMethodEBilinear is set in local variation. |
|
92 * |
|
93 * @return ETrue if ScalingMethodEBilinear local variation flag is set, |
|
94 * EFalse otherwise. |
|
95 */ |
|
96 inline TBool IsScalingMethodEBilinear() const; |
|
97 |
|
98 /** |
|
99 * Return whether or not EnableBitReversal is set in local variation. |
|
100 * |
|
101 * @return ETrue if EnableBitReversal local variation flag is set, EFalse |
|
102 * otherwise. |
|
103 */ |
|
104 inline TBool IsEnableBitReversal() const; |
|
105 |
|
106 private: // from TVtUiVariationBase |
|
107 |
|
108 /** |
|
109 * @see TVtUiVariationBase::Uid |
|
110 */ |
|
111 const TUid& Uid() const; |
|
112 |
|
113 /** |
|
114 * @see TVtUiVariationBase::Key |
|
115 */ |
|
116 TUint32 Key() const; |
|
117 }; |
|
118 |
|
119 /** |
|
120 * TVtUiActiveIdleVariation |
|
121 * |
|
122 * Active Idle variation class. Reads AI local variation flags from the |
|
123 * CenRep and contains methods to query flag states. This class should be |
|
124 * instanced only once and same instance should be passesd as reference to |
|
125 * modules that need this local variation information. |
|
126 * |
|
127 * @since S60 v3.2 |
|
128 */ |
|
129 NONSHARABLE_CLASS( TVtUiActiveIdleVariation ) : public TVtUiVariationBase |
|
130 { |
|
131 |
|
132 public: |
|
133 /** |
|
134 * Return whether or not active idle is enabled in local variation. |
|
135 * |
|
136 * @return ETrue if active idle is enabled in local variation. |
|
137 */ |
|
138 TBool IsActiveIdleEnabled(); |
|
139 |
|
140 private: // from TVtUiVariationBase |
|
141 |
|
142 /** |
|
143 * @see TVtUiVariationBase::Uid |
|
144 */ |
|
145 const TUid& Uid() const; |
|
146 |
|
147 /** |
|
148 * @see TVtUiVariationBase::Key |
|
149 */ |
|
150 TUint32 Key() const; |
|
151 |
|
152 private: |
|
153 }; |
|
154 |
|
155 /** |
|
156 * TVtUiGsMuteVariation |
|
157 * |
|
158 * General settings (Gs) variation class. Reads GS local variation flags from the |
|
159 * CenRep and contains methods to query flag states and values. This class should be |
|
160 * instanced only once and same instance should be passesd as reference to |
|
161 * modules that need this local variation information. |
|
162 * |
|
163 * @since S60 v3.2 |
|
164 */ |
|
165 NONSHARABLE_CLASS( TVtUiGsMuteVariation ) : public TVtUiVariationBase |
|
166 { |
|
167 |
|
168 public: |
|
169 |
|
170 /** |
|
171 * Returns Gs mute state value from CanRep. |
|
172 * |
|
173 * @return Gs mute state value. |
|
174 */ |
|
175 TUint32 GsMuteState(); |
|
176 |
|
177 private: // from TVtUiVariationBase |
|
178 |
|
179 /** |
|
180 * @see TVtUiVariationBase::Uid |
|
181 */ |
|
182 const TUid& Uid() const; |
|
183 |
|
184 /** |
|
185 * @see TVtUiVariationBase::Key |
|
186 */ |
|
187 TUint32 Key() const; |
|
188 |
|
189 private: |
|
190 }; |
|
191 |
|
192 /** |
|
193 * TVtUiToolbarVariation |
|
194 * |
|
195 * Toolbar variation class. Reads TB local variation flags from the |
|
196 * CenRep and contains methods to query flag states and values. This class should be |
|
197 * instanced only once and same instance should be passesd as reference to |
|
198 * modules that need this local variation information. |
|
199 * |
|
200 * @since S60 v3.2 |
|
201 */ |
|
202 NONSHARABLE_CLASS( TVtUiToolbarVariation ) : public TVtUiVariationBase |
|
203 { |
|
204 |
|
205 public: |
|
206 /** |
|
207 * Returns number of toolbar buttons from CanRep. |
|
208 * |
|
209 * @return number of toolbar buttons. |
|
210 */ |
|
211 TUint32 NumberOfButtons(); |
|
212 |
|
213 private: // from TVtUiVariationBase |
|
214 |
|
215 /** |
|
216 * @see TVtUiVariationBase::Uid |
|
217 */ |
|
218 const TUid& Uid() const; |
|
219 |
|
220 /** |
|
221 * @see TVtUiVariationBase::Key |
|
222 */ |
|
223 TUint32 Key() const; |
|
224 |
|
225 private: |
|
226 }; |
|
227 |
|
228 |
|
229 #include "tvtuilocalvariation.inl" |
|
230 |
|
231 #endif // T_VTUILOCALVARIATION_H |