|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #include <utf.h> |
|
22 |
|
23 #include "pluginbasedefs.h" |
|
24 #include "imageeditorpluginbasedefs.h" |
|
25 #include "iepb.h" |
|
26 #include "iepbint.h" |
|
27 #include "iepbres.h" |
|
28 |
|
29 |
|
30 //============================================================================= |
|
31 EXPORT_C CImageEditorPluginBase * CImageEditorPluginBase::NewL ( |
|
32 const TDesC & aResourcePath, |
|
33 const TDesC & aResourceFile |
|
34 ) |
|
35 { |
|
36 CImageEditorPluginBase * self = new (ELeave) CImageEditorPluginBase; |
|
37 CleanupStack::PushL (self); |
|
38 self->ConstructL (aResourcePath, aResourceFile); |
|
39 CleanupStack::Pop(); |
|
40 return self; |
|
41 } |
|
42 |
|
43 //============================================================================= |
|
44 EXPORT_C CImageEditorPluginBase::~CImageEditorPluginBase () |
|
45 { |
|
46 delete (CImageEditorPluginBaseInt *)iEditorPluginBaseInternalRepresentation; |
|
47 } |
|
48 |
|
49 //============================================================================= |
|
50 EXPORT_C TInt CImageEditorPluginBase::SetProperty ( |
|
51 TInt /*aPropertyId*/, |
|
52 TDesC & /*aPropertyValue*/ |
|
53 ) |
|
54 { |
|
55 return TPropRetErrNotSupported; |
|
56 } |
|
57 |
|
58 //============================================================================= |
|
59 EXPORT_C TInt CImageEditorPluginBase::GetProperty ( |
|
60 TInt aPropertyId, |
|
61 TDes & aPropertyValue |
|
62 ) |
|
63 { |
|
64 |
|
65 aPropertyValue.Zero(); |
|
66 CPluginResource * res = |
|
67 ((CImageEditorPluginBaseInt *)iEditorPluginBaseInternalRepresentation)->GetPluginResource(); |
|
68 |
|
69 switch (aPropertyId) |
|
70 { |
|
71 case KPluginCapabilityUID: |
|
72 { |
|
73 aPropertyValue.AppendNum ( res->PluginUID() ); |
|
74 return KErrNone; |
|
75 } |
|
76 case KCapPluginUiType: |
|
77 { |
|
78 aPropertyValue.AppendNum ( (TInt)res->PluginUiType() ); |
|
79 return KErrNone; |
|
80 } |
|
81 case KCapPluginFilterType: |
|
82 { |
|
83 aPropertyValue.AppendNum ( (TInt)res->PluginFilterType() ); |
|
84 return KErrNone; |
|
85 } |
|
86 case KCapPluginScope: |
|
87 { |
|
88 aPropertyValue.AppendNum ( (TInt)res->PluginScope() ); |
|
89 return KErrNone; |
|
90 } |
|
91 case KCapPluginDisplayOrder: |
|
92 { |
|
93 aPropertyValue.AppendNum ( (TInt)res->PluginDisplayOrder() ); |
|
94 return KErrNone; |
|
95 } |
|
96 case KCapPluginName: |
|
97 { |
|
98 aPropertyValue.Copy ( res->PluginName() ); |
|
99 return KErrNone; |
|
100 } |
|
101 case KCapIconName: |
|
102 { |
|
103 aPropertyValue.Copy ( res->IconFileName() ); |
|
104 return KErrNone; |
|
105 } |
|
106 case KCapFilterName: |
|
107 { |
|
108 aPropertyValue.Copy ( res->FilterFileName() ); |
|
109 return KErrNone; |
|
110 } |
|
111 case KCapPluginParamNames: |
|
112 { |
|
113 aPropertyValue.AppendNum ( (TInt)res->GetParameters() ); |
|
114 return KErrNone; |
|
115 } |
|
116 case KPluginCapabilityPluginType: |
|
117 { |
|
118 aPropertyValue.AppendNum ( (TInt)KPluginTypeImageEditor ); |
|
119 return KErrNone; |
|
120 } |
|
121 case KCapPluginSk1Cmd: |
|
122 { |
|
123 aPropertyValue.AppendNum ( (TInt)res->Sk1CommandIds() ); |
|
124 return KErrNone; |
|
125 } |
|
126 case KCapPluginSk1Text: |
|
127 { |
|
128 aPropertyValue.AppendNum ( (TInt)res->Sk1Texts() ); |
|
129 return KErrNone; |
|
130 } |
|
131 case KCapPluginSk2Cmd: |
|
132 { |
|
133 aPropertyValue.AppendNum ( (TInt)res->Sk2CommandIds() ); |
|
134 return KErrNone; |
|
135 } |
|
136 case KCapPluginSk2Text: |
|
137 { |
|
138 aPropertyValue.AppendNum ( (TInt)res->Sk2Texts() ); |
|
139 return KErrNone; |
|
140 } |
|
141 |
|
142 case KCapPluginMSKCmd: |
|
143 { |
|
144 aPropertyValue.AppendNum ( (TInt)res->MSKCommandIds() ); |
|
145 return KErrNone; |
|
146 } |
|
147 case KCapPluginMSKText: |
|
148 { |
|
149 aPropertyValue.AppendNum ( (TInt)res->MSKTexts() ); |
|
150 return KErrNone; |
|
151 } |
|
152 |
|
153 case KCapPluginMenuItems: |
|
154 { |
|
155 aPropertyValue.AppendNum ( (TInt)res->MenuItems() ); |
|
156 return KErrNone; |
|
157 } |
|
158 case KCapGlobalZoomDisabled: |
|
159 { |
|
160 aPropertyValue.AppendNum ( (TInt)EFalse ); |
|
161 return KErrNone; |
|
162 } |
|
163 case KPluginCapabilityAPIMajorVersion: |
|
164 { |
|
165 aPropertyValue.AppendNum ( KImageEditorPluginAPIMajor ); |
|
166 return KErrNone; |
|
167 } |
|
168 case KPluginCapabilityAPIMinorVersion: |
|
169 { |
|
170 aPropertyValue.AppendNum ( KImageEditorPluginAPIMinor ); |
|
171 return KErrNone; |
|
172 } |
|
173 case KPluginCapabilityAPIBuildVersion: |
|
174 { |
|
175 aPropertyValue.AppendNum ( KImageEditorPluginAPIBuild ); |
|
176 return KErrNone; |
|
177 } |
|
178 case KCapReadyToRender: |
|
179 { |
|
180 aPropertyValue.AppendNum ( (TInt)ETrue ); |
|
181 return KErrNone; |
|
182 } |
|
183 case KCapIsLandscapeEnabled: |
|
184 { |
|
185 aPropertyValue.AppendNum ( (TInt)ETrue ); |
|
186 return KErrNone; |
|
187 } |
|
188 case KCapIsSlowPlugin: |
|
189 { |
|
190 aPropertyValue.AppendNum ((TInt)EFalse); |
|
191 return KErrNone; |
|
192 } |
|
193 default: |
|
194 { |
|
195 return CPluginBase::GetProperty (aPropertyId, aPropertyValue); |
|
196 } |
|
197 } |
|
198 } |
|
199 |
|
200 //============================================================================= |
|
201 EXPORT_C void CImageEditorPluginBase::ShowPopupNote () |
|
202 { |
|
203 |
|
204 } |
|
205 |
|
206 //============================================================================= |
|
207 EXPORT_C TInt CImageEditorPluginBase::InitPluginL ( |
|
208 const TRect & /*aRect*/, |
|
209 CCoeControl * /*aParent*/, |
|
210 CCoeControl *& aPluginControl |
|
211 ) |
|
212 { |
|
213 aPluginControl = 0; |
|
214 return KErrNone; |
|
215 } |
|
216 |
|
217 //============================================================================= |
|
218 EXPORT_C void CImageEditorPluginBase::ProcessImageL (CEditorImage * /*aImage*/) |
|
219 { |
|
220 |
|
221 } |
|
222 |
|
223 //============================================================================= |
|
224 EXPORT_C void CImageEditorPluginBase::ReleasePlugin () |
|
225 { |
|
226 |
|
227 } |
|
228 |
|
229 //============================================================================= |
|
230 EXPORT_C void CImageEditorPluginBase::ReservedImageEditorBaseMethod1 () |
|
231 { |
|
232 |
|
233 } |
|
234 |
|
235 //============================================================================= |
|
236 EXPORT_C void CImageEditorPluginBase::ReservedImageEditorBaseMethod2 () |
|
237 { |
|
238 |
|
239 } |
|
240 |
|
241 //============================================================================= |
|
242 EXPORT_C CImageEditorPluginBase::CImageEditorPluginBase () : |
|
243 CPluginBase() |
|
244 { |
|
245 |
|
246 } |
|
247 |
|
248 //============================================================================= |
|
249 EXPORT_C void CImageEditorPluginBase::ConstructL ( |
|
250 const TDesC & aResourcePath, |
|
251 const TDesC & aResourceFile |
|
252 ) |
|
253 { |
|
254 iEditorPluginBaseInternalRepresentation = (CImageEditorPluginBaseInt*) |
|
255 CImageEditorPluginBaseInt::NewL (aResourcePath, aResourceFile); |
|
256 } |
|
257 |
|
258 // End of File |