|
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 "PPM2Codec.h" |
|
19 #include "PPM2Uids.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 TBool RequestThread() const; |
|
31 }; |
|
32 |
|
33 CPpmDecodeConstruct* CPpmDecodeConstruct::NewL() |
|
34 { |
|
35 CPpmDecodeConstruct* self = new (ELeave) CPpmDecodeConstruct; |
|
36 CleanupStack::PushL(self); |
|
37 self->ConstructL(); |
|
38 CleanupStack::Pop(self); |
|
39 return self; |
|
40 } |
|
41 |
|
42 CImageDecoderPlugin* CPpmDecodeConstruct::NewPluginL() const |
|
43 { |
|
44 return CPpmDecoder::NewL(); |
|
45 } |
|
46 |
|
47 TBool CPpmDecodeConstruct::RequestThread() const |
|
48 { |
|
49 // indicate we should always run as a thread |
|
50 return ETrue; |
|
51 } |
|
52 |
|
53 class CPpmEncodeConstruct : public CImageEncodeConstruct |
|
54 { |
|
55 public: |
|
56 static CPpmEncodeConstruct* NewL(); |
|
57 |
|
58 // from CImageEncodeConstruct |
|
59 CImageEncoderPlugin* NewPluginL() const; |
|
60 TBool RequestThread() const; |
|
61 }; |
|
62 |
|
63 CPpmEncodeConstruct* CPpmEncodeConstruct::NewL() |
|
64 { |
|
65 CPpmEncodeConstruct* self = new (ELeave) CPpmEncodeConstruct; |
|
66 CleanupStack::PushL(self); |
|
67 self->ConstructL(); |
|
68 CleanupStack::Pop(self); |
|
69 return self; |
|
70 } |
|
71 |
|
72 CImageEncoderPlugin* CPpmEncodeConstruct::NewPluginL() const |
|
73 { |
|
74 return CPpmEncoder::NewL(); |
|
75 } |
|
76 |
|
77 TBool CPpmEncodeConstruct::RequestThread() const |
|
78 { |
|
79 // indicate we should always run as a thread |
|
80 return ETrue; |
|
81 } |
|
82 |
|
83 // Exported proxy for instantiation method resolution |
|
84 |
|
85 // Define the Implementation UIDs for PPM decoder |
|
86 const TImplementationProxy ImplementationTable[] = |
|
87 { |
|
88 IMPLEMENTATION_PROXY_ENTRY(KPpm2DecoderImplementationUidValue, CPpmDecodeConstruct::NewL), |
|
89 IMPLEMENTATION_PROXY_ENTRY(KPpm2EncoderImplementationUidValue, CPpmEncodeConstruct::NewL) |
|
90 }; |
|
91 |
|
92 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
93 { |
|
94 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
95 return ImplementationTable; |
|
96 } |