imagingandcamerafws/imagingunittest/testcodec/inc/TestConvert.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 1999-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 //
       
    15 
       
    16 #ifndef __TESTCONVERT_H__
       
    17 #define __TESTCONVERT_H__
       
    18 
       
    19 #include "imageconversion.h"
       
    20 #include "TestCodec.h"
       
    21 #include <icl/imageplugin.h>
       
    22 
       
    23 // Decoder.
       
    24 class CTestReadCodec;
       
    25 class CTestDecoder : public CImageDecoderPlugin
       
    26 	{
       
    27 
       
    28 public:
       
    29 	static CTestDecoder* NewL(TBool aLeaveCorrupt = EFalse);
       
    30 	virtual ~CTestDecoder();
       
    31 
       
    32 	virtual void ImageType(TInt aFrameNumber, TUid& aImageType, TUid& aImageSubType) const;
       
    33 	CFrameInfoStrings* FrameInfoStringsL(RFs& aFs, TInt aFrameNumber);
       
    34 
       
    35 	// From CImageDecoderPlugin
       
    36 	virtual void DoConvert();
       
    37 	virtual TInt NumberOfImageComments() const;
       
    38 	virtual HBufC* ImageCommentL(TInt aCommentNumber) const;
       
    39 	virtual TInt NumberOfFrameComments(TInt aFrameNumber) const;
       
    40 	virtual HBufC* FrameCommentL(TInt aFrameNumber, TInt aCommentNumber) const;
       
    41 
       
    42 protected:
       
    43 	CTestDecoder(TBool aLeaveCorrupt = EFalse);
       
    44 
       
    45 	// From CImageDecoderPlugin
       
    46 	void ScanDataL();
       
    47 
       
    48 private:
       
    49 	TInt iMaxValue;
       
    50 	TBool iLeaveCorrupt;
       
    51 
       
    52 friend class CTestReadCodec;
       
    53 	};
       
    54 	
       
    55 
       
    56 // Encoder.
       
    57 class CTestWriteCodec;
       
    58 class CTestEncoder : public CImageEncoderPlugin
       
    59 	{
       
    60 
       
    61 public:
       
    62 	static CTestEncoder* NewL();
       
    63 	virtual ~CTestEncoder();
       
    64 
       
    65 	//From CImageEncoderPlugin
       
    66 	virtual void DoConvert();
       
    67 	virtual void PrepareEncoderL(const CFrameImageData* aFrameImageData);
       
    68 	virtual void UpdateHeaderL();
       
    69 
       
    70 protected:
       
    71 	CTestEncoder();
       
    72 
       
    73 friend class CTestWriteCodec;
       
    74 	};
       
    75 
       
    76 // Used to test decoder resolving through TOptions
       
    77 class CTestExtendedDecoder : public CTestDecoder
       
    78 	{
       
    79 public:
       
    80 	static CTestExtendedDecoder* NewL();
       
    81 	virtual ~CTestExtendedDecoder();
       
    82 protected:
       
    83 	CTestExtendedDecoder();
       
    84 
       
    85 	// From CImageDecoderPlugin
       
    86 	virtual void ScanDataL();
       
    87 };
       
    88 
       
    89 class CTestExtendedEncoder : public CTestEncoder
       
    90 	{
       
    91 public:
       
    92 	static CTestExtendedEncoder* NewL();
       
    93 	virtual ~CTestExtendedEncoder();
       
    94 
       
    95 private:
       
    96 	CTestExtendedEncoder();
       
    97 
       
    98 friend class CTestWriteCodec;
       
    99 	};
       
   100 	
       
   101 #endif // __TESTCONVERT_H__
       
   102