00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 #include <ecom.h>
00024 #include <implementationproxy.h>
00025 
00026 
00027 #include <icl/imageconstruct.h>
00028 
00029 #include "uids.h"
00030 #include "PNGCodec.h"
00031 
00032 
00033 
00034 
00035 
00036 class CPngDecodeConstruct : public CImageDecodeConstruct
00037         {
00038 public:
00039         
00040         static CPngDecodeConstruct* NewL();
00041 
00042         
00043         
00044         CImageDecoderPlugin* NewPluginL() const;
00045         };
00046 
00047 CPngDecodeConstruct* CPngDecodeConstruct::NewL()
00048         {
00049         CPngDecodeConstruct* self = new (ELeave) CPngDecodeConstruct;
00050         return self;
00051         }
00052 
00053 CImageDecoderPlugin* CPngDecodeConstruct::NewPluginL() const
00054         {
00055         return CPngDecoder::NewL();
00056         }
00057 
00058 
00059 
00060 
00061 
00062 class CPngEncodeConstruct : public CImageEncodeConstruct
00063         {
00064 public:
00065         
00066         static CPngEncodeConstruct* NewL();
00067 
00068         
00069         
00070         CImageEncoderPlugin* NewPluginL() const;
00071         };
00072 
00073 CPngEncodeConstruct* CPngEncodeConstruct::NewL()
00074         {
00075         CPngEncodeConstruct* self = new (ELeave) CPngEncodeConstruct;
00076         return self;
00077         }
00078 
00079 CImageEncoderPlugin* CPngEncodeConstruct::NewPluginL() const
00080         {
00081         return CPngEncoder::NewL();
00082         }
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 const TImplementationProxy ImplementationTable[] =
00092         {
00093                 IMPLEMENTATION_PROXY_ENTRY(KExPNGDecoderImplementationUidValue, CPngDecodeConstruct::NewL),
00094                 IMPLEMENTATION_PROXY_ENTRY(KExPNGEncoderImplementationUidValue, CPngEncodeConstruct::NewL)
00095         };
00096 
00097 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
00098         {
00099         aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
00100         return ImplementationTable;
00101         }
00102 
00103 
00104 
00105 
00106 GLDEF_C void Panic(TInt aError)
00107         {
00108         _LIT(KPNGPanicCategory, "PNGExConvertPlugin");
00109         User::Panic(KPNGPanicCategory, aError);
00110         }
00111