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: Cropped thumbnail generation task unit tests. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __UT_CGLXTNZOOMEDIMAGETASK_H__ |
|
21 #define __UT_CGLXTNZOOMEDIMAGETASK_H__ |
|
22 |
|
23 // EXTERNAL INCLUDES |
|
24 |
|
25 #include <CEUnitTestSuiteClass.h> |
|
26 #include <f32file.h> |
|
27 |
|
28 // INTERNAL INCLUDES |
|
29 |
|
30 #include "mglxtnthumbnailcreatorclient.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 |
|
34 class CGlxtnFileUtility; |
|
35 class CGlxtnZoomedImageTask; |
|
36 class CFbsBitmap; |
|
37 |
|
38 #include <e32def.h> |
|
39 #ifndef NONSHARABLE_CLASS |
|
40 #define NONSHARABLE_CLASS(x) class x |
|
41 #endif |
|
42 |
|
43 // CLASS DEFINITION |
|
44 /** |
|
45 * |
|
46 * EUnitWizard generated test class. |
|
47 * |
|
48 */ |
|
49 NONSHARABLE_CLASS( UT_CGlxtnZoomedImageTask ) |
|
50 : public CEUnitTestSuiteClass, public MGlxtnThumbnailCreatorClient |
|
51 { |
|
52 public: // Constructors and destructors |
|
53 |
|
54 /** |
|
55 * Two phase construction |
|
56 */ |
|
57 static UT_CGlxtnZoomedImageTask* NewL(); |
|
58 static UT_CGlxtnZoomedImageTask* NewLC(); |
|
59 /** |
|
60 * Destructor |
|
61 */ |
|
62 ~UT_CGlxtnZoomedImageTask(); |
|
63 |
|
64 private: // Constructors and destructors |
|
65 |
|
66 UT_CGlxtnZoomedImageTask(); |
|
67 void ConstructL(); |
|
68 |
|
69 private: // From MGlxtnThumbnailCreatorClient |
|
70 void ThumbnailFetchComplete(const TGlxMediaId& aItemId, |
|
71 TGlxThumbnailQuality aQuality, TInt aErrorCode); |
|
72 void ThumbnailDeletionComplete(const TGlxMediaId& aItemId, TInt aErrorCode); |
|
73 void FilterAvailableComplete( const RArray<TGlxMediaId>& aIdArray, |
|
74 TInt aErrorCode ); |
|
75 void FetchFileInfoL(CGlxtnFileInfo* aInfo, const TGlxMediaId& aItemId, |
|
76 TRequestStatus* aStatus); |
|
77 void CancelFetchUri(const TGlxMediaId& aItemId); |
|
78 MGlxtnThumbnailStorage* ThumbnailStorage(); |
|
79 |
|
80 private: // New methods |
|
81 |
|
82 void SetupL(); |
|
83 void Teardown(); |
|
84 |
|
85 void UT_CGlxtnZoomedImageTask_ConstructL(); |
|
86 void UT_CGlxtnZoomedImageTask_GenerateL(); |
|
87 |
|
88 void DoGenerateL(const TDesC& aUri); |
|
89 |
|
90 private: // Data |
|
91 |
|
92 CGlxtnFileUtility* iFileUtility; |
|
93 CGlxtnZoomedImageTask* iZoomedImageTask; |
|
94 CFbsBitmap* iBitmap; |
|
95 TPtrC iUri; |
|
96 TGlxThumbnailQuality iQuality; |
|
97 TInt iError; |
|
98 |
|
99 EUNIT_DECLARE_TEST_TABLE; |
|
100 |
|
101 }; |
|
102 |
|
103 #endif // __UT_CGLXTNZOOMEDIMAGETASK_H__ |
|
104 |
|
105 // End of file |
|