|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This file contains definitions of the test step classes for Conversion |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 #ifndef __TEST_STEP_CONVERSION_H__ |
|
20 #define __TEST_STEP_CONVERSION_H__ |
|
21 |
|
22 |
|
23 #include <imageconversion.h> |
|
24 #include <caf/caf.h> |
|
25 #include "TS_MM_ICL_FRM_CP.h" |
|
26 |
|
27 using namespace ContentAccess; |
|
28 |
|
29 |
|
30 const TInt KShowFrameInformation = 0x01; |
|
31 const TInt KShowFrameOption = 0x02; |
|
32 |
|
33 |
|
34 |
|
35 class CTestStepConversion : public CTest_MM_ICL_FRM_CP |
|
36 { |
|
37 public: |
|
38 |
|
39 void OpenImageForDecodeFromFileWithIntentL(const TDesC& aFilename, |
|
40 TIntent aIntent, |
|
41 const TDesC8& aMimeType = KNullDesC8); |
|
42 |
|
43 void OpenImageForDecodeFromFileWithIntentL(const TDesC& aFilename, |
|
44 TIntent aIntent, |
|
45 TUid aImageTypeUid, |
|
46 TUid aDecoderUid = KNullUid); |
|
47 |
|
48 |
|
49 TInt OpenImageForDecodeFromFileL(const TDesC& aFileName, TUid aCodecUid = KNullUid); |
|
50 TInt OpenPpmImageForDecodeFromFileL(const TDesC& aFileName, TUid aCodecUid = KNullUid, const TUid aPpmDecodeUid = KNullUid); |
|
51 TInt OpenImageForDecodeFromBufferL(const TDesC& aFileName, TUid aUid = KNullUid); |
|
52 void OpenBufferedImageL(const TDesC& aFilename, TInt aFrameNumber=0, TUid aUid=KNullUid, const CImageDecoder::TOptions aOptions=CImageDecoder::EOptionNone); |
|
53 |
|
54 TInt LoadPluginByContent(); |
|
55 TInt IdentifyFormatByContent(); |
|
56 TInt InitialazePluginWithImage(); |
|
57 TInt DecodeImageFrame(); |
|
58 |
|
59 TInt EncodeImageToMemoryL(const TDesC& aFilename, |
|
60 TUid aTypeImage); |
|
61 TInt EncodeImageFromBitmapToMemoryL(const TDesC& aSourceFilename, |
|
62 CFbsBitmap *theBitmap, |
|
63 TUid aTypeImageUid); |
|
64 |
|
65 TInt EncodeImageFromBitmapToFileL(const TDesC& aSourceFilename, |
|
66 TUid aTypeImageUid); |
|
67 |
|
68 |
|
69 TInt ListAvailableMIMEDecoders(); |
|
70 TInt ListAllAvailableDecoders() ; |
|
71 TInt ListAvailableMIMEEncoders(); |
|
72 TInt ListAllAvailableEncoders(); |
|
73 |
|
74 TInt FindMimeTypeL(const TDesC& aFilename); |
|
75 TInt EnquireDecoderUIDAndImplementationInfoL(const TDesC& aFileName); |
|
76 TInt EnquireEncoderUIDL(const TDesC& aFileName, TUid aTypeImageUid); |
|
77 |
|
78 TInt RequestNumberFramesL(const TDesC& aFileName); |
|
79 TInt RequestDecodeDataL(const TDesC& aFileName, TInt aParam); |
|
80 |
|
81 TInt EncodeImageSpecifyingParamL(TUid aTypeImageUid); |
|
82 TInt RetrieveEmbeddedCommentsL(const TDesC& aFilename); |
|
83 TAny PrintFrameOptions(const TFrameInfo& aFrameInfo); |
|
84 TAny PrintFrameInfo(const TFrameInfo& aFrameInfo); |
|
85 |
|
86 TInt RetrieveFrameInfoL(const TDesC& aFilename); |
|
87 |
|
88 //------ |
|
89 TInt ReadAndDecodeIncrementallyL(const TDesC& aFileName, TInt aStepBeforeCancel = 0); |
|
90 inline TInt StreamIncrement(TInt aValue); |
|
91 |
|
92 |
|
93 inline TAny StartProfiling(); |
|
94 inline TAny StopProfiling(); |
|
95 inline TAny LogProfile(); |
|
96 |
|
97 TInt DummyHalCall(); |
|
98 |
|
99 //For GT0210 MS3.4 File Handles API Testing. |
|
100 TInt DecodeUsingDecoderL(const TDesC& aFileName); |
|
101 void EncodeUsingEncoderL(const TDesC& aFileNameSrc); |
|
102 |
|
103 protected: |
|
104 // |
|
105 |
|
106 TInt PrepareEncodeDataL(TConvertInfo &aConvInfo, |
|
107 TImageDataBlock** aImageData, |
|
108 TFrameDataBlock** aFrameData); |
|
109 |
|
110 CTestStepConversion(const TDesC& aTestName) : |
|
111 CTest_MM_ICL_FRM_CP(aTestName) {} |
|
112 |
|
113 protected: |
|
114 //stub for profiling |
|
115 TInt aProfile; |
|
116 |
|
117 }; |
|
118 |
|
119 |
|
120 #endif // __TS_MM_ICL_FRM_CP_H__ |