mmplugins/imagingplugins/codecs/WMFCodec/WMFProxy.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 "WMFConvert.h"
       
    24 
       
    25 #include <icl/imageconstruct.h>
       
    26 
       
    27 class CWmfDecodeConstruct : public CImageDecodeConstruct
       
    28 	{
       
    29 public:
       
    30 	static CWmfDecodeConstruct* NewL();
       
    31 
       
    32 	// from CImageDecodeConstruct
       
    33 	CImageDecoderPlugin* NewPluginL() const;
       
    34 	};
       
    35 
       
    36 CWmfDecodeConstruct* CWmfDecodeConstruct::NewL()
       
    37 	{
       
    38 	CWmfDecodeConstruct* self = new (ELeave) CWmfDecodeConstruct;
       
    39 	CleanupStack::PushL(self);
       
    40 	self->ConstructL();
       
    41 	CleanupStack::Pop(self);
       
    42 	return self;
       
    43 	}
       
    44 
       
    45 CImageDecoderPlugin* CWmfDecodeConstruct::NewPluginL() const
       
    46 	{
       
    47 	return CWmfDecoder::NewL();
       
    48 	}
       
    49 
       
    50 class CWmfStdDecodeConstruct : public CWmfDecodeConstruct
       
    51 	{
       
    52 public:
       
    53 	static CWmfStdDecodeConstruct* NewL();
       
    54 
       
    55 	// from CWmfDecodeConstruct
       
    56 	CImageDecoderPlugin* NewPluginL() const;
       
    57 	};
       
    58 
       
    59 CWmfStdDecodeConstruct* CWmfStdDecodeConstruct::NewL()
       
    60 	{
       
    61 	CWmfStdDecodeConstruct* self = new (ELeave) CWmfStdDecodeConstruct;
       
    62 	CleanupStack::PushL(self);
       
    63 	self->ConstructL();
       
    64 	CleanupStack::Pop(self);
       
    65 	return self;
       
    66 	}
       
    67 
       
    68 CImageDecoderPlugin* CWmfStdDecodeConstruct::NewPluginL() const
       
    69 	{
       
    70 	return CWmfDecoder::NewStdL();
       
    71 	}
       
    72 
       
    73 class CWmfApmDecodeConstruct : public CWmfDecodeConstruct
       
    74 	{
       
    75 public:
       
    76 	static CWmfApmDecodeConstruct* NewL();
       
    77 
       
    78 	// from CWmfDecodeConstruct
       
    79 	CImageDecoderPlugin* NewPluginL() const;
       
    80 	};
       
    81 
       
    82 CWmfApmDecodeConstruct* CWmfApmDecodeConstruct::NewL()
       
    83 	{
       
    84 	CWmfApmDecodeConstruct* self = new (ELeave) CWmfApmDecodeConstruct;
       
    85 	CleanupStack::PushL(self);
       
    86 	self->ConstructL();
       
    87 	CleanupStack::Pop(self);
       
    88 	return self;
       
    89 	}
       
    90 
       
    91 CImageDecoderPlugin* CWmfApmDecodeConstruct::NewPluginL() const
       
    92 	{
       
    93 	return CWmfDecoder::NewApmL();
       
    94 	}
       
    95 
       
    96 class CWmfClpDecodeConstruct : public CWmfDecodeConstruct
       
    97 	{
       
    98 public:
       
    99 	static CWmfClpDecodeConstruct* NewL();
       
   100 
       
   101 	// from CWmfDecodeConstruct
       
   102 	CImageDecoderPlugin* NewPluginL() const;
       
   103 	};
       
   104 
       
   105 CWmfClpDecodeConstruct* CWmfClpDecodeConstruct::NewL()
       
   106 	{
       
   107 	CWmfClpDecodeConstruct* self = new (ELeave) CWmfClpDecodeConstruct;
       
   108 	CleanupStack::PushL(self);
       
   109 	self->ConstructL();
       
   110 	CleanupStack::Pop(self);
       
   111 	return self;
       
   112 	}
       
   113 
       
   114 CImageDecoderPlugin* CWmfClpDecodeConstruct::NewPluginL() const
       
   115 	{
       
   116 	return CWmfDecoder::NewClpL();
       
   117 	}
       
   118 
       
   119 // Exported proxy for instantiation method resolution
       
   120 
       
   121 // Define the Implementation UIDs for WMF decoder
       
   122 const TImplementationProxy ImplementationTable[] =
       
   123 	{
       
   124 		IMPLEMENTATION_PROXY_ENTRY(KWMFDecoderImplementationUidValue, CWmfDecodeConstruct::NewL),
       
   125 		IMPLEMENTATION_PROXY_ENTRY(KWMFDecoderStdImplementationUidValue, CWmfStdDecodeConstruct::NewL),
       
   126 		IMPLEMENTATION_PROXY_ENTRY(KWMFDecoderApmImplementationUidValue, CWmfApmDecodeConstruct::NewL),
       
   127 		IMPLEMENTATION_PROXY_ENTRY(KWMFDecoderClpImplementationUidValue, CWmfClpDecodeConstruct::NewL)
       
   128 	};
       
   129 
       
   130 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
   131 	{
       
   132 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
   133 	return ImplementationTable;
       
   134 	}