imagingandcamerafws/imaginginttest/Codecs/PPM1/PPM1Proxy.cpp
branchRCL_3
changeset 50 948c7f65f6d4
parent 0 40261b775718
equal deleted inserted replaced
49:735348f59235 50:948c7f65f6d4
       
     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 "PPM1Codec.h"
       
    19 #include "PPM1Uids.hrh"
       
    20 
       
    21 #include <icl/imageconstruct.h>
       
    22 
       
    23 class CPpmDecodeConstruct : public CImageDecodeConstruct
       
    24 	{
       
    25 public:
       
    26 	static CPpmDecodeConstruct* NewL();
       
    27 
       
    28 	// from CImageDecodeConstruct
       
    29 	CImageDecoderPlugin* NewPluginL() const;
       
    30 	};
       
    31 
       
    32 CPpmDecodeConstruct* CPpmDecodeConstruct::NewL()
       
    33 	{
       
    34 	CPpmDecodeConstruct* self = new (ELeave) CPpmDecodeConstruct;
       
    35 	CleanupStack::PushL(self);
       
    36 	self->ConstructL();
       
    37 	CleanupStack::Pop(self);
       
    38 	return self;
       
    39 	}
       
    40 
       
    41 CImageDecoderPlugin* CPpmDecodeConstruct::NewPluginL() const
       
    42 	{
       
    43 	return CPpmDecoder::NewL();
       
    44 	}
       
    45 
       
    46 class CPpmEncodeConstruct : public CImageEncodeConstruct
       
    47 	{
       
    48 public:
       
    49 	static CPpmEncodeConstruct* NewL();
       
    50 
       
    51 	// from CImageEncodeConstruct
       
    52 	CImageEncoderPlugin* NewPluginL() const;
       
    53 	};
       
    54 
       
    55 CPpmEncodeConstruct* CPpmEncodeConstruct::NewL()
       
    56 	{
       
    57 	CPpmEncodeConstruct* self = new (ELeave) CPpmEncodeConstruct;
       
    58 	CleanupStack::PushL(self);
       
    59 	self->ConstructL();
       
    60 	CleanupStack::Pop(self);
       
    61 	return self;
       
    62 	}
       
    63 
       
    64 CImageEncoderPlugin* CPpmEncodeConstruct::NewPluginL() const
       
    65 	{
       
    66 	return CPpmEncoder::NewL();
       
    67 	}
       
    68 
       
    69 // Exported proxy for instantiation method resolution
       
    70 
       
    71 // Define the Implementation UIDs for PPM decoder
       
    72 const TImplementationProxy ImplementationTable[] =
       
    73 	{
       
    74 		IMPLEMENTATION_PROXY_ENTRY(KPpm1DecoderImplementationUidValue, CPpmDecodeConstruct::NewL),
       
    75 		IMPLEMENTATION_PROXY_ENTRY(KPpm1DecoderRAWImplementationUidValue, CPpmDecodeConstruct::NewL),
       
    76 		IMPLEMENTATION_PROXY_ENTRY(KPpm1DecoderASCIIImplementationUidValue, CPpmDecodeConstruct::NewL),
       
    77 		IMPLEMENTATION_PROXY_ENTRY(KPpm1EncoderImplementationUidValud, CPpmEncodeConstruct::NewL)
       
    78 	};
       
    79 
       
    80 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
    81 	{
       
    82 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
    83 	return ImplementationTable;
       
    84 	}