imaging/imagingunittest/testcodec/src/ExtendedTestProxy.cpp
changeset 0 5752a19fdefe
equal deleted inserted replaced
-1:000000000000 0:5752a19fdefe
       
     1 // Copyright (c) 2001-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 #include <ecom/ecom.h>
       
    17 #include <ecom/implementationproxy.h>
       
    18 #include "ExtendedPlugin.h"
       
    19 #include "ExtendedTestCodec.h"
       
    20 #include "ExtendedTestConvert.h"
       
    21 #include "TestUids.hrh"
       
    22 
       
    23 #include <icl/imageconstruct.h>
       
    24 
       
    25 //CExtendedTestDecodeConstruct
       
    26 class CExtendedTestDecodeConstruct : public CImageDecodeConstruct
       
    27 	{
       
    28 public:
       
    29 	static CExtendedTestDecodeConstruct* NewL();
       
    30 
       
    31 	// from CImageDecodeConstruct
       
    32 	virtual CImageDecoder* NewDecoderL() const;
       
    33 	virtual CImageDecoderPlugin* NewPluginL() const;
       
    34 	};
       
    35 
       
    36 CExtendedTestDecodeConstruct* CExtendedTestDecodeConstruct::NewL()
       
    37 	{
       
    38 	CExtendedTestDecodeConstruct* self = new (ELeave) CExtendedTestDecodeConstruct;
       
    39 	return self;
       
    40 	}
       
    41 
       
    42 CImageDecoder* CExtendedTestDecodeConstruct::NewDecoderL() const
       
    43 	{
       
    44 	return CExtendedDecoder::NewL();
       
    45 	}
       
    46 
       
    47 CImageDecoderPlugin* CExtendedTestDecodeConstruct::NewPluginL() const
       
    48 	{
       
    49 	return CExtendedTestDecoderPlugin::NewL();
       
    50 	}
       
    51 
       
    52 //CExtendedTestEncodeConstruct
       
    53 class CExtendedTestEncodeConstruct : public CImageEncodeConstruct
       
    54 	{
       
    55 public:
       
    56 	static CExtendedTestEncodeConstruct* NewL();
       
    57 
       
    58 	// from CImageEncodeConstruct
       
    59 	virtual CImageEncoder* NewEncoderL() const;
       
    60 	virtual CImageEncoderPlugin* NewPluginL() const;
       
    61 	};
       
    62 
       
    63 CExtendedTestEncodeConstruct* CExtendedTestEncodeConstruct::NewL()
       
    64 	{
       
    65 	CExtendedTestEncodeConstruct* self = new (ELeave) CExtendedTestEncodeConstruct;
       
    66 	return self;
       
    67 	}
       
    68 
       
    69 CImageEncoder* CExtendedTestEncodeConstruct::NewEncoderL() const
       
    70 	{
       
    71 	return CExtendedEncoder::NewL();
       
    72 	}
       
    73 
       
    74 CImageEncoderPlugin* CExtendedTestEncodeConstruct::NewPluginL() const
       
    75 	{
       
    76 	return CExtendedTestEncoderPlugin::NewL();
       
    77 	}
       
    78 
       
    79 // Exported proxy for instantiation method resolution
       
    80 
       
    81 // Define the Implementation UIDs for Extended Test decoder
       
    82 const TImplementationProxy ImplementationTable[] =
       
    83 	{
       
    84 		IMPLEMENTATION_PROXY_ENTRY(KExtendedTestDecoderImplementationUidValue, CExtendedTestDecodeConstruct::NewL),
       
    85 		IMPLEMENTATION_PROXY_ENTRY(KExtendedTestEncoderImplementationUidValue, CExtendedTestEncodeConstruct::NewL)
       
    86 	};
       
    87 
       
    88 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
    89 	{
       
    90 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
    91 	return ImplementationTable;
       
    92 	}