|
1 |
|
2 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // ImageConstruct.cpp - classes used during construction of decoders/encoders |
|
16 // |
|
17 // |
|
18 |
|
19 #include "icl/ImageConstruct.h" |
|
20 |
|
21 #include "ImageConversion.h" |
|
22 #include "ImageConversionPriv.h" |
|
23 #include "ImageClientMain.h" |
|
24 |
|
25 #include <ecom/ecom.h> |
|
26 |
|
27 // CImageDecodeConstruct |
|
28 |
|
29 /** |
|
30 Default constructor |
|
31 */ |
|
32 EXPORT_C CImageDecodeConstruct::CImageDecodeConstruct() |
|
33 { |
|
34 } |
|
35 |
|
36 /** |
|
37 Destructor |
|
38 */ |
|
39 EXPORT_C CImageDecodeConstruct::~CImageDecodeConstruct() |
|
40 { |
|
41 // Tell ECom that we've deleted this instance of the implementation |
|
42 REComSession::DestroyedImplementation(iDtorIDKey); |
|
43 } |
|
44 |
|
45 /** |
|
46 Second stage constructor. This should be called during |
|
47 construction of the derived class. |
|
48 */ |
|
49 EXPORT_C void CImageDecodeConstruct::ConstructL() |
|
50 { |
|
51 } |
|
52 |
|
53 /** |
|
54 Returns the decoder implementation UID. |
|
55 |
|
56 @return The implementation UID. |
|
57 */ |
|
58 EXPORT_C TUid CImageDecodeConstruct::ImplementationUid() const |
|
59 { |
|
60 TUid implementationUid = TUid::Null(); |
|
61 TInt err = KErrNone; |
|
62 TRAP(err, implementationUid = REComSession::GetImplementationUidL(iDtorIDKey)); |
|
63 return implementationUid; |
|
64 } |
|
65 |
|
66 /** |
|
67 Default version creates a basic CImageDecoder |
|
68 |
|
69 @return A pointer to a fully constructed CImageDecoder |
|
70 */ |
|
71 EXPORT_C CImageDecoder* CImageDecodeConstruct::NewDecoderL() const |
|
72 { |
|
73 return CImageDecoder::NewL(); |
|
74 } |
|
75 |
|
76 /** |
|
77 Requests a threaded decode. |
|
78 |
|
79 The default version of the virtual function returns EFalse, that is, it does not request a threaded decode. |
|
80 |
|
81 @return ETrue a threaded decode is requested, otherwise, EFalse. |
|
82 */ |
|
83 EXPORT_C TBool CImageDecodeConstruct::RequestThread() const |
|
84 { |
|
85 return EFalse; |
|
86 } |
|
87 |
|
88 /** |
|
89 * Intended for future proofing - will panic if called |
|
90 * @internalTechnology |
|
91 * @panic "EReservedCall" |
|
92 */ |
|
93 EXPORT_C void CImageDecodeConstruct::ReservedVirtual1() |
|
94 { |
|
95 Panic(EReservedCall); |
|
96 } |
|
97 |
|
98 /** |
|
99 * Intended for future proofing - will panic if called |
|
100 * @internalTechnology |
|
101 * @panic "EReservedCall" |
|
102 */ |
|
103 EXPORT_C void CImageDecodeConstruct::ReservedVirtual2() |
|
104 { |
|
105 Panic(EReservedCall); |
|
106 } |
|
107 |
|
108 /** |
|
109 * Intended for future proofing - will panic if called |
|
110 * @internalTechnology |
|
111 * @panic "EReservedCall" |
|
112 */ |
|
113 EXPORT_C void CImageDecodeConstruct::ReservedVirtual3() |
|
114 { |
|
115 Panic(EReservedCall); |
|
116 } |
|
117 |
|
118 /** |
|
119 * Intended for future proofing - will panic if called |
|
120 * @internalTechnology |
|
121 * @panic "EReservedCall" |
|
122 */ |
|
123 EXPORT_C void CImageDecodeConstruct::ReservedVirtual4() |
|
124 { |
|
125 Panic(EReservedCall); |
|
126 } |
|
127 |
|
128 // CImageEncodeConstruct |
|
129 |
|
130 /** |
|
131 Default constructor |
|
132 */ |
|
133 EXPORT_C CImageEncodeConstruct::CImageEncodeConstruct() |
|
134 { |
|
135 } |
|
136 |
|
137 /** |
|
138 Destructor |
|
139 */ |
|
140 EXPORT_C CImageEncodeConstruct::~CImageEncodeConstruct() |
|
141 { |
|
142 // Tell ECom that we've deleted this instance of the implementation |
|
143 REComSession::DestroyedImplementation(iDtorIDKey); |
|
144 } |
|
145 |
|
146 /** |
|
147 Second stage constructor. This should be called during |
|
148 construction of the derived class. |
|
149 */ |
|
150 EXPORT_C void CImageEncodeConstruct::ConstructL() |
|
151 { |
|
152 } |
|
153 |
|
154 /** |
|
155 Retrieve the encoder implementation UID. |
|
156 |
|
157 @return The implementation UID. |
|
158 */ |
|
159 EXPORT_C TUid CImageEncodeConstruct::ImplementationUid() const |
|
160 { |
|
161 TUid implementationUid = TUid::Null(); |
|
162 TInt err = KErrNone; |
|
163 TRAP(err, implementationUid = REComSession::GetImplementationUidL(iDtorIDKey)); |
|
164 return implementationUid; |
|
165 } |
|
166 |
|
167 /** |
|
168 Default version creates a basic CImageEncoder. |
|
169 |
|
170 @return Pointer to a fully constructed CImageEncoder object. |
|
171 */ |
|
172 EXPORT_C CImageEncoder* CImageEncodeConstruct::NewEncoderL() const |
|
173 { |
|
174 return CImageEncoder::NewL(); |
|
175 } |
|
176 |
|
177 /** |
|
178 Requests a threaded encode. |
|
179 |
|
180 Note: |
|
181 The default version of this virtual function returns EFalse and does |
|
182 not request a threaded encode. |
|
183 */ |
|
184 EXPORT_C TBool CImageEncodeConstruct::RequestThread() const |
|
185 { |
|
186 return EFalse; |
|
187 } |
|
188 |
|
189 /** |
|
190 @internalTechnology |
|
191 |
|
192 Intended for future proofing - will panic if called |
|
193 |
|
194 @panic EReservedCall |
|
195 */ |
|
196 EXPORT_C void CImageEncodeConstruct::ReservedVirtual1() |
|
197 { |
|
198 Panic(EReservedCall); |
|
199 } |
|
200 |
|
201 /** |
|
202 @internalTechnology |
|
203 |
|
204 Intended for future proofing - will panic if called |
|
205 |
|
206 @panic EReservedCall |
|
207 */ |
|
208 EXPORT_C void CImageEncodeConstruct::ReservedVirtual2() |
|
209 { |
|
210 Panic(EReservedCall); |
|
211 } |
|
212 |
|
213 /** |
|
214 @internalTechnology |
|
215 |
|
216 Intended for future proofing - will panic if called |
|
217 |
|
218 @panic EReservedCall |
|
219 */ |
|
220 EXPORT_C void CImageEncodeConstruct::ReservedVirtual3() |
|
221 { |
|
222 Panic(EReservedCall); |
|
223 } |
|
224 |
|
225 /** |
|
226 @internalTechnology |
|
227 |
|
228 Intended for future proofing - will panic if called |
|
229 |
|
230 @panic EReservedCall |
|
231 */ |
|
232 EXPORT_C void CImageEncodeConstruct::ReservedVirtual4() |
|
233 { |
|
234 Panic(EReservedCall); |
|
235 } |
|
236 |