|
1 /* |
|
2 * Copyright (c) 2006-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: Stubs for thumbnail and attribute context |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "stub_glxfetchcontexts.h" |
|
22 |
|
23 // this flag defines the return value for CGlxThumbnailContext::RequestCountL |
|
24 extern TInt gThumbnailContextRequestCount = 1; |
|
25 // this flag defines the return value for CGlxAttributeContext::RequestCountL |
|
26 extern TInt gAttributeContextRequestCount = 1; |
|
27 // this flag defines the return value for GlxAttributeRetriever::RetrieveL |
|
28 extern TInt gGlxAttributeRetrieverRetrieveL = 1; |
|
29 // this flag defines the return value for TGlxMedia::GetDimensions |
|
30 extern TBool gTGlxMediaGetDimensions = ETrue; |
|
31 // this flag defines if the test is meant to be an alloc test |
|
32 extern TBool gFetchContextAllocTest = EFalse; |
|
33 |
|
34 // helper macro to do an alloc if we are in alloc test |
|
35 #define MAKE_ALLOC_L \ |
|
36 if( gFetchContextAllocTest ) \ |
|
37 { TInt* alloc = new( ELeave ) TInt; \ |
|
38 delete alloc; } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // Stub for GlxAttributeRetriever --> |
|
42 // ----------------------------------------------------------------------------- |
|
43 EXPORT_C TInt GlxAttributeRetriever::RetrieveL( |
|
44 const MGlxFetchContext& /*aContext*/, |
|
45 MGlxMediaList& /*aList*/, |
|
46 TBool /*aShowDialog*/ ) |
|
47 { |
|
48 return gGlxAttributeRetrieverRetrieveL; |
|
49 } |
|
50 |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // <-- Stub for GlxAttributeRetriever |
|
54 // ----------------------------------------------------------------------------- |
|
55 |
|
56 // ----------------------------------------------------------------------------- |
|
57 // Stub for TGlxMedia --> |
|
58 // ----------------------------------------------------------------------------- |
|
59 EXPORT_C TBool TGlxMedia::GetDimensions( TSize& /*aSize*/ ) const |
|
60 { |
|
61 return gTGlxMediaGetDimensions; |
|
62 } |
|
63 // ----------------------------------------------------------------------------- |
|
64 // <-- Stub for TGlxMedia |
|
65 // ----------------------------------------------------------------------------- |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // Stub for CGlxThumbnailContext --> |
|
69 // ----------------------------------------------------------------------------- |
|
70 CGlxThumbnailContext* CGlxThumbnailContext::NewL( |
|
71 MGlxMediaListIterator* aIterator ) |
|
72 { |
|
73 return new( ELeave ) CGlxThumbnailContext( aIterator ); |
|
74 } |
|
75 |
|
76 CGlxThumbnailContext::CGlxThumbnailContext( |
|
77 MGlxMediaListIterator* /*aIterator*/ ) |
|
78 { |
|
79 } |
|
80 |
|
81 CGlxThumbnailContext::~CGlxThumbnailContext() |
|
82 { |
|
83 } |
|
84 |
|
85 void CGlxThumbnailContext::AddSpecForItemL( |
|
86 TInt /*aWidth*/, TInt /*aHeight*/, TInt /*aFocusOffset*/ ) |
|
87 { |
|
88 MAKE_ALLOC_L |
|
89 } |
|
90 |
|
91 void CGlxThumbnailContext::SetDefaultSpec( |
|
92 TInt /*aWidth*/, TInt /*aHeight*/ ) |
|
93 { |
|
94 } |
|
95 |
|
96 void CGlxThumbnailContext::SetHighQualityOnly( TBool /*aHighQualityOnly*/ ) |
|
97 { |
|
98 } |
|
99 |
|
100 // From MGlxFetchContext |
|
101 void CGlxThumbnailContext::AllAttributesL( |
|
102 const MGlxMediaList* /*aList*/, |
|
103 TInt /*aListIndex*/, |
|
104 RArray<TMPXAttribute>& /*aAttributes*/ ) const |
|
105 { |
|
106 MAKE_ALLOC_L |
|
107 } |
|
108 |
|
109 TInt CGlxThumbnailContext::AttributeRequestL( |
|
110 const MGlxMediaList* /*aList*/, |
|
111 RArray<TInt>& /*aItemIndices*/, |
|
112 RArray<TMPXAttribute>& /*aAttributes*/, |
|
113 CMPXAttributeSpecs*& /*aDetailedSpecs*/ ) const |
|
114 { |
|
115 MAKE_ALLOC_L |
|
116 return 0; |
|
117 } |
|
118 |
|
119 TInt CGlxThumbnailContext::RequestCountL( |
|
120 const MGlxMediaList* /*aList*/) const |
|
121 { |
|
122 MAKE_ALLOC_L |
|
123 return gThumbnailContextRequestCount; |
|
124 } |
|
125 |
|
126 void CGlxThumbnailContext::HandleResolutionChanged() |
|
127 { |
|
128 } |
|
129 |
|
130 TInt CGlxThumbnailContext::SelectItemL( |
|
131 const MGlxMediaList* /*aList*/, |
|
132 TInt& /*aError*/) const |
|
133 { |
|
134 MAKE_ALLOC_L |
|
135 return 0; |
|
136 } |
|
137 |
|
138 TUint CGlxThumbnailContext::GetThumbnailScoreL( |
|
139 TInt /*aIndexInList*/, |
|
140 const MGlxMediaList* /*aList*/, |
|
141 TInt /*aDistance*/, |
|
142 TInt& /*aError*/) const |
|
143 { |
|
144 MAKE_ALLOC_L |
|
145 return 0; |
|
146 } |
|
147 |
|
148 const CGlxThumbnailContext::TFetchSpec& CGlxThumbnailContext::SpecForIndex( |
|
149 TInt /*aListIndex*/, const MGlxMediaList* /*aList*/ ) const |
|
150 { |
|
151 return iDefaultSpec; |
|
152 } |
|
153 // ----------------------------------------------------------------------------- |
|
154 // <-- Stub for CGlxThumbnailContext |
|
155 // ----------------------------------------------------------------------------- |
|
156 |
|
157 // ----------------------------------------------------------------------------- |
|
158 // Stub for CGlxDefaultThumbnailContext --> |
|
159 // ----------------------------------------------------------------------------- |
|
160 CGlxDefaultThumbnailContext* CGlxDefaultThumbnailContext::NewL() |
|
161 { |
|
162 return new( ELeave ) CGlxDefaultThumbnailContext; |
|
163 } |
|
164 |
|
165 CGlxDefaultThumbnailContext::~CGlxDefaultThumbnailContext() |
|
166 { |
|
167 } |
|
168 |
|
169 void CGlxDefaultThumbnailContext::SetRangeOffsets( |
|
170 TInt /*aFrontOffset*/, TInt /*aRearOffset*/ ) |
|
171 { |
|
172 } |
|
173 |
|
174 CGlxDefaultThumbnailContext::CGlxDefaultThumbnailContext() |
|
175 : CGlxThumbnailContext( NULL ) |
|
176 { |
|
177 } |
|
178 // ----------------------------------------------------------------------------- |
|
179 // <-- Stub for CGlxDefaultThumbnailContext |
|
180 // ----------------------------------------------------------------------------- |
|
181 |
|
182 // ----------------------------------------------------------------------------- |
|
183 // Stub for TGlxFromFocusOutwardIterator --> |
|
184 // ----------------------------------------------------------------------------- |
|
185 TGlxFromFocusOutwardIterator::TGlxFromFocusOutwardIterator() |
|
186 { |
|
187 } |
|
188 |
|
189 TGlxFromFocusOutwardIterator::~TGlxFromFocusOutwardIterator() |
|
190 { |
|
191 } |
|
192 |
|
193 void TGlxFromFocusOutwardIterator::SetToFirst(const MGlxMediaList* ) |
|
194 { |
|
195 } |
|
196 |
|
197 TInt TGlxFromFocusOutwardIterator::operator++(TInt) |
|
198 { |
|
199 return 0; |
|
200 } |
|
201 |
|
202 TBool TGlxFromFocusOutwardIterator::InRange(TInt ) const |
|
203 { |
|
204 return EFalse; |
|
205 } |
|
206 |
|
207 // ----------------------------------------------------------------------------- |
|
208 // <-- Stub for TGlxFromFocusOutwardBlockyIterator |
|
209 // ----------------------------------------------------------------------------- |
|
210 |
|
211 // ----------------------------------------------------------------------------- |
|
212 // Stub for TGlxFromFocusOutwardIterator --> |
|
213 // ----------------------------------------------------------------------------- |
|
214 TGlxFromFocusOutwardBlockyIterator::TGlxFromFocusOutwardBlockyIterator() |
|
215 { |
|
216 } |
|
217 |
|
218 TGlxFromFocusOutwardBlockyIterator::~TGlxFromFocusOutwardBlockyIterator() |
|
219 { |
|
220 } |
|
221 |
|
222 void TGlxFromFocusOutwardBlockyIterator::SetToFirst(const MGlxMediaList* ) |
|
223 { |
|
224 } |
|
225 |
|
226 TInt TGlxFromFocusOutwardBlockyIterator::operator++(TInt) |
|
227 { |
|
228 return 0; |
|
229 } |
|
230 |
|
231 TBool TGlxFromFocusOutwardBlockyIterator::InRange(TInt ) const |
|
232 { |
|
233 return EFalse; |
|
234 } |
|
235 |
|
236 // ----------------------------------------------------------------------------- |
|
237 // <-- Stub for TGlxFromFocusOutwardBlockyIterator |
|
238 // ----------------------------------------------------------------------------- |
|
239 |
|
240 // ----------------------------------------------------------------------------- |
|
241 // Stub for CGlxAttributeContext --> |
|
242 // ----------------------------------------------------------------------------- |
|
243 CGlxAttributeContext::CGlxAttributeContext(MGlxMediaListIterator* ) |
|
244 { |
|
245 } |
|
246 |
|
247 CGlxAttributeContext::~CGlxAttributeContext() |
|
248 { |
|
249 } |
|
250 |
|
251 void CGlxAttributeContext::AddAttributeL(const TMPXAttribute& ) |
|
252 { |
|
253 MAKE_ALLOC_L |
|
254 } |
|
255 |
|
256 void CGlxAttributeContext::RemoveAttribute(const TMPXAttribute& ) |
|
257 { |
|
258 } |
|
259 |
|
260 void CGlxAttributeContext::SetGranularity(TUint ) |
|
261 { |
|
262 } |
|
263 |
|
264 TInt CGlxAttributeContext::AttributeRequestL(const MGlxMediaList* , RArray<TInt>& , |
|
265 RArray<TMPXAttribute>& , CMPXAttributeSpecs*& ) const |
|
266 { |
|
267 MAKE_ALLOC_L |
|
268 return 0; |
|
269 } |
|
270 |
|
271 void CGlxAttributeContext::AllAttributesL(const MGlxMediaList* , TInt , |
|
272 RArray<TMPXAttribute>& ) const |
|
273 { |
|
274 MAKE_ALLOC_L |
|
275 } |
|
276 |
|
277 TInt CGlxAttributeContext::RequestCountL(const MGlxMediaList* ) const |
|
278 { |
|
279 MAKE_ALLOC_L |
|
280 return gAttributeContextRequestCount; |
|
281 } |
|
282 // ----------------------------------------------------------------------------- |
|
283 // <-- Stub for CGlxAttributeContext |
|
284 // ----------------------------------------------------------------------------- |
|
285 |
|
286 // ----------------------------------------------------------------------------- |
|
287 // Stub for CGlxDefaultAttributeContext --> |
|
288 // ----------------------------------------------------------------------------- |
|
289 CGlxDefaultAttributeContext* CGlxDefaultAttributeContext::NewL() |
|
290 { |
|
291 return new( ELeave ) CGlxDefaultAttributeContext; |
|
292 } |
|
293 |
|
294 CGlxDefaultAttributeContext::~CGlxDefaultAttributeContext() |
|
295 { |
|
296 } |
|
297 |
|
298 CGlxDefaultAttributeContext::CGlxDefaultAttributeContext() |
|
299 : CGlxAttributeContext( NULL ) |
|
300 { |
|
301 } |
|
302 |
|
303 void CGlxDefaultAttributeContext::SetRangeOffsets( |
|
304 TInt , TInt ) |
|
305 { |
|
306 } |
|
307 // ----------------------------------------------------------------------------- |
|
308 // <-- Stub for CGlxDefaultAttributeContext |
|
309 // ----------------------------------------------------------------------------- |
|
310 |
|
311 // ----------------------------------------------------------------------------- |
|
312 // Stub for TMPXAttribute --> |
|
313 // ----------------------------------------------------------------------------- |
|
314 EXPORT_C TMPXAttribute::TMPXAttribute(TInt , TUint ) |
|
315 { |
|
316 } |
|
317 |
|
318 EXPORT_C TMPXAttribute::TMPXAttribute(const TMPXAttributeData& /*aData*/) |
|
319 { |
|
320 } |
|
321 |
|
322 EXPORT_C TBool TMPXAttribute::Match( const TMPXAttribute& , const TMPXAttribute& ) |
|
323 { |
|
324 return EFalse; |
|
325 } |
|
326 // ----------------------------------------------------------------------------- |
|
327 // <-- Stub for TMPXAttribute |
|
328 // ----------------------------------------------------------------------------- |