mmplugins/imagingplugins/codecs/TIFFCodec/TIFFProxy.cpp
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     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 <icl/icl_uids.hrh>
       
    19 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    20 #include <icl/icl_uids_const.hrh>
       
    21 #include <icl/icl_uids_def.hrh>
       
    22 #endif
       
    23 #include "TIFFCodec.h"
       
    24 
       
    25 #include <icl/imageconstruct.h>
       
    26 
       
    27 class CTiffDecodeConstruct : public CImageDecodeConstruct
       
    28 	{
       
    29 public:
       
    30 	static CTiffDecodeConstruct* NewL();
       
    31 
       
    32 	// from CImageDecodeConstruct
       
    33 	CImageDecoderPlugin* NewPluginL() const;
       
    34 	};
       
    35 
       
    36 CTiffDecodeConstruct* CTiffDecodeConstruct::NewL()
       
    37 	{
       
    38 	CTiffDecodeConstruct* self = new (ELeave) CTiffDecodeConstruct;
       
    39 	CleanupStack::PushL(self);
       
    40 	self->ConstructL();
       
    41 	CleanupStack::Pop(self);
       
    42 	return self;
       
    43 	}
       
    44 
       
    45 CImageDecoderPlugin* CTiffDecodeConstruct::NewPluginL() const
       
    46 	{
       
    47 	return CTiffDecoder::NewL();
       
    48 	}
       
    49 
       
    50 class CTiffLittleEndianDecodeConstruct : public CTiffDecodeConstruct
       
    51 	{
       
    52 public:
       
    53 	static CTiffLittleEndianDecodeConstruct* NewL();
       
    54 
       
    55 	// from CImageDecodeConstruct
       
    56 	CImageDecoderPlugin* NewPluginL() const;
       
    57 	};
       
    58 
       
    59 CTiffLittleEndianDecodeConstruct* CTiffLittleEndianDecodeConstruct::NewL()
       
    60 	{
       
    61 	CTiffLittleEndianDecodeConstruct* self = new (ELeave) CTiffLittleEndianDecodeConstruct;
       
    62 	CleanupStack::PushL(self);
       
    63 	self->ConstructL();
       
    64 	CleanupStack::Pop(self);
       
    65 	return self;
       
    66 	}
       
    67 
       
    68 CImageDecoderPlugin* CTiffLittleEndianDecodeConstruct::NewPluginL() const
       
    69 	{
       
    70 	return CTiffDecoder::NewLittleEndianL();
       
    71 	}
       
    72 
       
    73 class CTiffBigEndianDecodeConstruct : public CTiffDecodeConstruct
       
    74 	{
       
    75 public:
       
    76 	static CTiffBigEndianDecodeConstruct* NewL();
       
    77 
       
    78 	// from CImageDecodeConstruct
       
    79 	CImageDecoderPlugin* NewPluginL() const;
       
    80 	};
       
    81 
       
    82 CTiffBigEndianDecodeConstruct* CTiffBigEndianDecodeConstruct::NewL()
       
    83 	{
       
    84 	CTiffBigEndianDecodeConstruct* self = new (ELeave) CTiffBigEndianDecodeConstruct;
       
    85 	CleanupStack::PushL(self);
       
    86 	self->ConstructL();
       
    87 	CleanupStack::Pop(self);
       
    88 	return self;
       
    89 	}
       
    90 
       
    91 CImageDecoderPlugin* CTiffBigEndianDecodeConstruct::NewPluginL() const
       
    92 	{
       
    93 	return CTiffDecoder::NewBigEndianL();
       
    94 	}
       
    95 
       
    96 // Exported proxy for instantiation method resolution
       
    97 
       
    98 // Define the Implementation UIDs for TIFF decoder
       
    99 const TImplementationProxy ImplementationTable[] =
       
   100 	{
       
   101 		IMPLEMENTATION_PROXY_ENTRY(KTIFFDecoderImplementationUidValue, CTiffDecodeConstruct::NewL),
       
   102 		IMPLEMENTATION_PROXY_ENTRY(KTIFFDecoderLittleEndianImplementationUidValue, CTiffLittleEndianDecodeConstruct::NewL),
       
   103 		IMPLEMENTATION_PROXY_ENTRY(KTIFFDecoderBigEndianImplementationUidValue, CTiffBigEndianDecodeConstruct::NewL),
       
   104 	};
       
   105 
       
   106 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
   107 	{
       
   108 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
   109 	return ImplementationTable;
       
   110 	}