24
|
1 |
/*
|
|
2 |
* Copyright (c) 2006, 2007 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: These classes implement dps operations replies.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#include <e32debug.h>
|
|
20 |
#include "dpsoperation.h"
|
|
21 |
#include "dpsconst.h"
|
|
22 |
#include "dpstransaction.h"
|
|
23 |
#include "pictbridge.h"
|
|
24 |
#include "dpsxmlparser.h"
|
|
25 |
#include "dpsxmlgenerator.h"
|
|
26 |
#include "dpsstatemachine.h"
|
|
27 |
|
|
28 |
#ifdef _DEBUG
|
|
29 |
# define IF_DEBUG(t) {RDebug::t;}
|
|
30 |
#else
|
|
31 |
# define IF_DEBUG(t)
|
|
32 |
#endif
|
|
33 |
|
|
34 |
const TInt KConfigPrintService = 5;
|
|
35 |
const TInt KCopyFileWidth = 3;
|
|
36 |
// ---------------------------------------------------------------------------
|
|
37 |
//
|
|
38 |
// ---------------------------------------------------------------------------
|
|
39 |
//
|
|
40 |
EXPORT_C void TMDpsOperation::CreateReqScriptL(
|
|
41 |
const TDpsArgArray& aArguments,
|
|
42 |
const TDpsEleArray& /*aElements*/,
|
|
43 |
TDpsAttribute /*aAttribute*/,
|
|
44 |
RWriteStream& aScript,
|
|
45 |
CDpsTransaction* aTrader)
|
|
46 |
{
|
|
47 |
IF_DEBUG(Print(_L(">>>TMDpsOperation::CreateReqScript")));
|
|
48 |
CDpsXmlGenerator* g = aTrader->Generator();
|
|
49 |
g->StartDocumentL(aScript);
|
|
50 |
g->StartInputL(aScript);
|
|
51 |
TInt count = aArguments.Count();
|
|
52 |
if (!count)
|
|
53 |
{
|
|
54 |
g->StartOperationL((TDpsOperation)iOperation, aScript, ETrue);
|
|
55 |
}
|
|
56 |
else
|
|
57 |
{
|
|
58 |
g->StartOperationL((TDpsOperation)iOperation, aScript);
|
|
59 |
for (TInt i = 0; i < count; i++)
|
|
60 |
{
|
|
61 |
g->CreateArgL(aScript, aArguments[i]);
|
|
62 |
}
|
|
63 |
g->EndOperationL((TDpsOperation)iOperation, aScript);
|
|
64 |
}
|
|
65 |
|
|
66 |
g->EndInputL(aScript);
|
|
67 |
g->EndDocumentL(aScript);
|
|
68 |
IF_DEBUG(Print(_L("<<<TMDpsOperation::CreateReqScript")));
|
|
69 |
}
|
|
70 |
|
|
71 |
// ---------------------------------------------------------------------------
|
|
72 |
// Some request parameters should be checked
|
|
73 |
// ---------------------------------------------------------------------------
|
|
74 |
//
|
|
75 |
EXPORT_C TInt TDpsStartJob::FillReqArgs(TDpsArgArray& aArgs,
|
|
76 |
TDpsEleArray& aElements,
|
|
77 |
TDpsAttribute& /*aAttrib*/,
|
|
78 |
CDpsTransaction* aTrader)
|
|
79 |
{
|
|
80 |
IF_DEBUG(Print(_L(">>>TDpsStartJob::FillReqArgs")));
|
|
81 |
TInt imageCount = iReqParam.iPrintInfo.Count();
|
|
82 |
if (!imageCount)
|
|
83 |
{
|
|
84 |
return KErrUnknown;
|
|
85 |
}
|
|
86 |
TUint32* objectHandles = new TUint32[imageCount];
|
|
87 |
if (!objectHandles)
|
|
88 |
{
|
|
89 |
return KErrNoMemory;
|
|
90 |
}
|
|
91 |
for (TInt i = 0; i < imageCount; i++)
|
|
92 |
{
|
|
93 |
TInt err = aTrader->Engine()->Ptp().
|
|
94 |
GetObjectHandleByName(
|
|
95 |
iReqParam.iPrintInfo[i].iFile, objectHandles[i], ETrue);
|
|
96 |
if (err != KErrNone)
|
|
97 |
{
|
|
98 |
IF_DEBUG(Print(_L("---error %d"), err));
|
|
99 |
|
|
100 |
delete[] objectHandles;
|
|
101 |
return err;
|
|
102 |
}
|
|
103 |
}
|
|
104 |
TDpsArg* argsP = new TDpsArg[iReqParam.GetParamNum()];
|
|
105 |
if (!argsP)
|
|
106 |
{
|
|
107 |
delete[] objectHandles;
|
|
108 |
return KErrNoMemory;
|
|
109 |
}
|
|
110 |
TDpsEle* elemsP = new TDpsEle[1 + imageCount];
|
|
111 |
if (!elemsP)
|
|
112 |
{
|
|
113 |
delete[] argsP;
|
|
114 |
delete[] objectHandles;
|
|
115 |
return KErrNoMemory;
|
|
116 |
}
|
|
117 |
// jobConfig
|
|
118 |
TInt count = iReqParam.iJobConfig.Count();
|
|
119 |
|
|
120 |
TInt ret = KErrNone;
|
|
121 |
|
|
122 |
elemsP[0].iElement = EDpsJobConfig;
|
|
123 |
elemsP[0].iNum = count;
|
|
124 |
if ( (ret = aElements.Append(elemsP[0])) != KErrNone )
|
|
125 |
{
|
|
126 |
IF_DEBUG(Print(_L("*** append error")));
|
|
127 |
return ret;
|
|
128 |
}
|
|
129 |
for (TInt i = 0; i < count; i++)
|
|
130 |
{
|
|
131 |
argsP[i].iElement = iReqParam.iJobConfig[i].iElement;
|
|
132 |
// the parameter only has high bytes (0x1234)
|
|
133 |
argsP[i].iContent.AppendNumUC(iReqParam.iJobConfig[i].iContent, EHex);
|
|
134 |
// we have to append the low bytes (0000)
|
|
135 |
argsP[i].iContent.Append(KDpsLowZero);
|
|
136 |
if ( (ret = aArgs.Append(argsP[i])) != KErrNone )
|
|
137 |
{
|
|
138 |
IF_DEBUG(Print(_L("*** append error")));
|
|
139 |
return ret;
|
|
140 |
}
|
|
141 |
IF_DEBUG(Print(_L("the element is %d"), argsP[i].iElement));
|
|
142 |
IF_DEBUG(Print(_L("the content is %S"), &(argsP[i].iContent)));
|
|
143 |
}
|
|
144 |
// printInfo
|
|
145 |
for (TInt j = 0; j < imageCount; j++)
|
|
146 |
{
|
|
147 |
// there is at least one argument for fileID
|
|
148 |
TInt k = 1;
|
|
149 |
elemsP[j + 1].iElement = EDpsPrintInfo;
|
|
150 |
argsP[count].iElement = EDpsArgFileID;
|
|
151 |
argsP[count].iContent.AppendNumFixedWidth(objectHandles[j], EHex,
|
|
152 |
KFullWordWidth);
|
|
153 |
if ( (ret = aArgs.Append(argsP[count])) != KErrNone )
|
|
154 |
{
|
|
155 |
IF_DEBUG(Print(_L("*** append error")));
|
|
156 |
return ret;
|
|
157 |
}
|
|
158 |
|
|
159 |
|
|
160 |
IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement));
|
|
161 |
IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent)));
|
|
162 |
count++;
|
|
163 |
|
|
164 |
// not empty
|
|
165 |
if (iReqParam.iPrintInfo[j].iFileName)
|
|
166 |
{
|
|
167 |
argsP[count].iElement = EDpsArgFileName;
|
|
168 |
argsP[count].iContent.Copy(iReqParam.iPrintInfo[j].iFile);
|
|
169 |
if ( (ret = aArgs.Append(argsP[count])) != KErrNone)
|
|
170 |
{
|
|
171 |
IF_DEBUG(Print(_L("*** append error")));
|
|
172 |
return ret;
|
|
173 |
}
|
|
174 |
|
|
175 |
IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement));
|
|
176 |
IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent)));
|
|
177 |
|
|
178 |
k++; count++;
|
|
179 |
}
|
|
180 |
// not empty
|
|
181 |
if (iReqParam.iPrintInfo[j].iDate.Size())
|
|
182 |
{
|
|
183 |
argsP[count].iElement = EDpsArgDate;
|
|
184 |
argsP[count].iContent.Copy(iReqParam.iPrintInfo[j].iDate);
|
|
185 |
if ( (ret = aArgs.Append(argsP[count])) != KErrNone)
|
|
186 |
{
|
|
187 |
IF_DEBUG(Print(_L("*** append error")));
|
|
188 |
return ret;
|
|
189 |
}
|
|
190 |
IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement));
|
|
191 |
IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent)));
|
|
192 |
k++; count++;
|
|
193 |
}
|
|
194 |
if (iReqParam.iPrintInfo[j].iCopies != 0)
|
|
195 |
{
|
|
196 |
argsP[count].iElement = EDpsArgCopies;
|
|
197 |
argsP[count].iContent.AppendNumFixedWidthUC(
|
|
198 |
iReqParam.iPrintInfo[j].iCopies, EDecimal, KCopyFileWidth);
|
|
199 |
if ( (ret = aArgs.Append(argsP[count])) != KErrNone)
|
|
200 |
{
|
|
201 |
IF_DEBUG(Print(_L("*** append error")));
|
|
202 |
return ret;
|
|
203 |
}
|
|
204 |
IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement));
|
|
205 |
IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent)));
|
|
206 |
k++; count++;
|
|
207 |
}
|
|
208 |
if (iReqParam.iPrintInfo[j].iPrtPID != 0)
|
|
209 |
{
|
|
210 |
argsP[count].iElement = EDpsArgPrtPID;
|
|
211 |
argsP[count].iContent.AppendNumUC(iReqParam.iPrintInfo[j].iPrtPID);
|
|
212 |
if ( (ret = aArgs.Append(argsP[count])) != KErrNone)
|
|
213 |
{
|
|
214 |
IF_DEBUG(Print(_L("*** append error")));
|
|
215 |
return ret;
|
|
216 |
}
|
|
217 |
IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement));
|
|
218 |
IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent)));
|
|
219 |
k++; count++;
|
|
220 |
}
|
|
221 |
if (iReqParam.iPrintInfo[j].iCopyID != 0)
|
|
222 |
{
|
|
223 |
argsP[count].iElement = EDpsArgCopyID;
|
|
224 |
argsP[count].iContent.AppendNumUC(iReqParam.iPrintInfo[j].iCopyID);
|
|
225 |
if ( (ret = aArgs.Append(argsP[count])) != KErrNone)
|
|
226 |
{
|
|
227 |
IF_DEBUG(Print(_L("*** append error")));
|
|
228 |
return ret;
|
|
229 |
}
|
|
230 |
IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement));
|
|
231 |
IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent)));
|
|
232 |
k++; count++;
|
|
233 |
}
|
|
234 |
|
|
235 |
elemsP[j + 1].iNum = k;
|
|
236 |
if ( (ret = aElements.Append(elemsP[j + 1])) != KErrNone)
|
|
237 |
{
|
|
238 |
IF_DEBUG(Print(_L("*** append error")));
|
|
239 |
return ret;
|
|
240 |
}
|
|
241 |
}
|
|
242 |
|
|
243 |
delete[] objectHandles;
|
|
244 |
delete[] argsP;
|
|
245 |
delete[] elemsP;
|
|
246 |
IF_DEBUG(Print(_L("<<<TDpsStartJob::FillReqArgs")));
|
|
247 |
return KErrNone;
|
|
248 |
}
|
|
249 |
|
|
250 |
// ---------------------------------------------------------------------------
|
|
251 |
//
|
|
252 |
// ---------------------------------------------------------------------------
|
|
253 |
//
|
|
254 |
EXPORT_C void TDpsStartJob::CreateReqScriptL(const TDpsArgArray& aArguments,
|
|
255 |
const TDpsEleArray& aElements,
|
|
256 |
TDpsAttribute /*aAttribute*/,
|
|
257 |
RWriteStream& aScript,
|
|
258 |
CDpsTransaction* aTrader)
|
|
259 |
{
|
|
260 |
IF_DEBUG(Print(_L(">>>TDpsStartJob::CreateReqScript")));
|
|
261 |
CDpsXmlGenerator* g = aTrader->Generator();
|
|
262 |
g->StartDocumentL(aScript);
|
|
263 |
g->StartInputL(aScript);
|
|
264 |
g->StartOperationL((TDpsOperation)iOperation, aScript);
|
|
265 |
TInt count = aElements.Count();
|
|
266 |
TInt limit = 0;
|
|
267 |
for (TInt i = 0; i < count; i++)
|
|
268 |
{
|
|
269 |
g->StartElementL(aElements[i].iElement, aScript);
|
|
270 |
TInt init = limit;
|
|
271 |
limit = (i == 0 ? aElements[0].iNum : limit + aElements[i].iNum);
|
|
272 |
for (TInt j = init; j < limit; j++)
|
|
273 |
{
|
|
274 |
g->CreateArgL(aScript,aArguments[j]);
|
|
275 |
}
|
|
276 |
g->EndElementL(aElements[i].iElement, aScript);
|
|
277 |
}
|
|
278 |
g->EndOperationL((TDpsOperation)iOperation, aScript);
|
|
279 |
g->EndInputL(aScript);
|
|
280 |
g->EndDocumentL(aScript);
|
|
281 |
IF_DEBUG(Print(_L("<<<TDpsStartJob::CreateReqScript")));
|
|
282 |
}
|
|
283 |
|
|
284 |
// ---------------------------------------------------------------------------
|
|
285 |
//
|
|
286 |
// ---------------------------------------------------------------------------
|
|
287 |
//
|
|
288 |
EXPORT_C TInt TDpsAbortJob::FillReqArgs(TDpsArgArray& aArgs,
|
|
289 |
TDpsEleArray& /*aElems*/,
|
|
290 |
TDpsAttribute& /*aAttrib*/,
|
|
291 |
CDpsTransaction* /*aParam*/)
|
|
292 |
{
|
|
293 |
IF_DEBUG(Print(_L(">>>TDpsAbortJob::FillReqArgs")));
|
|
294 |
TDpsArg arg;
|
|
295 |
arg.iElement = EDpsArgAbortStyle;
|
|
296 |
arg.iContent.AppendNumUC(iReqParam.iAbortStyle, EHex);
|
|
297 |
arg.iContent.Append(KDpsLowZero);
|
|
298 |
TInt ret = aArgs.Append(arg);
|
|
299 |
if (ret != KErrNone)
|
|
300 |
{
|
|
301 |
IF_DEBUG(Print(_L("*** append error")));
|
|
302 |
}
|
|
303 |
IF_DEBUG(Print(_L("<<<TDpsAbortJob::FillReqArgs")));
|
|
304 |
return ret;
|
|
305 |
}
|
|
306 |
|
|
307 |
// ---------------------------------------------------------------------------
|
|
308 |
// Some request parameters should be checked
|
|
309 |
// ---------------------------------------------------------------------------
|
|
310 |
//
|
|
311 |
EXPORT_C TInt TDpsGetCapability::FillReqArgs(TDpsArgArray& aArgs,
|
|
312 |
TDpsEleArray& aElements,
|
|
313 |
TDpsAttribute& aAttrib,
|
|
314 |
CDpsTransaction* /*aParam*/)
|
|
315 |
{
|
|
316 |
IF_DEBUG(Print(_L(">>>TDpsGetCapability::FillReqArgs")));
|
|
317 |
// only one element
|
|
318 |
TDpsEle elems;
|
|
319 |
elems.iElement = EDpsCapability;
|
|
320 |
elems.iNum = 1;
|
|
321 |
TInt ret = KErrNone;
|
|
322 |
if ( (ret = aElements.Append(elems)) != KErrNone)
|
|
323 |
{
|
|
324 |
IF_DEBUG(Print(_L("*** append error")));
|
|
325 |
return ret;
|
|
326 |
}
|
|
327 |
|
|
328 |
// only one parameter
|
|
329 |
TDpsArg argsP;
|
|
330 |
argsP.iElement = iReqParam.iCap;
|
|
331 |
if ( (ret = aArgs.Append(argsP)) != KErrNone)
|
|
332 |
{
|
|
333 |
IF_DEBUG(Print(_L("*** append error")));
|
|
334 |
return ret;
|
|
335 |
}
|
|
336 |
if (EDpsArgPaperTypes == iReqParam.iCap || EDpsArgLayouts == iReqParam.iCap)
|
|
337 |
{
|
|
338 |
if (iReqParam.iAttribute != 0)
|
|
339 |
{
|
|
340 |
aAttrib = iReqParam.iAttribute;
|
|
341 |
}
|
|
342 |
}
|
|
343 |
IF_DEBUG(Print(_L("<<<TDpsGetCapability::FillReqArgs")));
|
|
344 |
return KErrNone;
|
|
345 |
}
|
|
346 |
|
|
347 |
// ---------------------------------------------------------------------------
|
|
348 |
//
|
|
349 |
// ---------------------------------------------------------------------------
|
|
350 |
//
|
|
351 |
EXPORT_C void TDpsGetCapability::CreateReqScriptL(
|
|
352 |
const TDpsArgArray& aArguments,
|
|
353 |
const TDpsEleArray& aElements,
|
|
354 |
TDpsAttribute aAttribute,
|
|
355 |
RWriteStream& aScript,
|
|
356 |
CDpsTransaction* aTrader)
|
|
357 |
{
|
|
358 |
IF_DEBUG(Print(_L(">>>TDpsGetCapability::CreateReqScript")));
|
|
359 |
CDpsXmlGenerator* g = aTrader->Generator();
|
|
360 |
g->StartDocumentL(aScript);
|
|
361 |
g->StartInputL(aScript);
|
|
362 |
g->StartOperationL((TDpsOperation)iOperation, aScript);
|
|
363 |
g->StartElementL(aElements[0].iElement, aScript);
|
|
364 |
const TInt count = aArguments.Count();
|
|
365 |
for (TInt i = 0; i < count; i++)
|
|
366 |
{
|
|
367 |
g->CreateArgL(aScript, aArguments[i], aAttribute);
|
|
368 |
}
|
|
369 |
g->EndElementL(aElements[0].iElement, aScript);
|
|
370 |
g->EndOperationL((TDpsOperation)iOperation, aScript);
|
|
371 |
g->EndInputL(aScript);
|
|
372 |
g->EndDocumentL(aScript);
|
|
373 |
IF_DEBUG(Print(_L("<<<TDpsGetCapability::CreateReqScript")));
|
|
374 |
}
|
|
375 |
|
|
376 |
// ---------------------------------------------------------------------------
|
|
377 |
// Some request parameters should be checked
|
|
378 |
// ---------------------------------------------------------------------------
|
|
379 |
//
|
|
380 |
EXPORT_C TInt TDpsConfigPrintService::FillReqArgs(TDpsArgArray& aArgs,
|
|
381 |
TDpsEleArray& /*aElems*/,
|
|
382 |
TDpsAttribute& /*aAttrib*/,
|
|
383 |
CDpsTransaction* /*aParam*/)
|
|
384 |
{
|
|
385 |
IF_DEBUG(Print(_L(">>>TDpsConfigPrintService::FillReqArgs")));
|
|
386 |
TDpsArg* argsP = new TDpsArg[KConfigPrintService];
|
|
387 |
if (!argsP)
|
|
388 |
{
|
|
389 |
return KErrNoMemory;
|
|
390 |
}
|
|
391 |
TInt count;
|
|
392 |
TInt ret = KErrNone;
|
|
393 |
for (TInt i = 0; i < KConfigPrintService; i++)
|
|
394 |
{
|
|
395 |
switch (i)
|
|
396 |
{
|
|
397 |
// there might be several versions
|
|
398 |
case EDpsArgDpsVersions:
|
|
399 |
argsP[i].iElement = EDpsArgDpsVersions;
|
|
400 |
count = iReqParam.iDpsVersions.Count();
|
|
401 |
for (TInt j = 0; j < count; j++)
|
|
402 |
{
|
|
403 |
argsP[i].iContent.AppendNumUC
|
|
404 |
(iReqParam.iDpsVersions[j].iMajor);
|
|
405 |
argsP[i].iContent.Append(_L("."));
|
|
406 |
argsP[i].iContent.AppendNumUC
|
|
407 |
(iReqParam.iDpsVersions[j].iMinor);
|
|
408 |
}
|
|
409 |
ret = aArgs.Append(argsP[i]);
|
|
410 |
break;
|
|
411 |
|
|
412 |
case EDpsArgVendorName: // vender name
|
|
413 |
|
|
414 |
argsP[i].iElement = EDpsArgVendorName;
|
|
415 |
argsP[i].iContent.Append(iReqParam.iVendorName);
|
|
416 |
ret = aArgs.Append(argsP[i]);
|
|
417 |
|
|
418 |
break;
|
|
419 |
|
|
420 |
case EDpsArgVendorSpecificVersion: // vender version (optional)
|
|
421 |
if (iReqParam.iVendorVersion.iMajor &&
|
|
422 |
iReqParam.iVendorVersion.iMinor)
|
|
423 |
{
|
|
424 |
argsP[i].iElement = EDpsArgVendorSpecificVersion;
|
|
425 |
argsP[i].iContent.AppendNumUC(iReqParam.iVendorVersion.iMajor);
|
|
426 |
argsP[i].iContent.Append(_L("."));
|
|
427 |
argsP[i].iContent.AppendNumUC(iReqParam.iVendorVersion.iMinor);
|
|
428 |
ret = aArgs.Append(argsP[i]);
|
|
429 |
}
|
|
430 |
|
|
431 |
break;
|
|
432 |
|
|
433 |
case EDpsArgProductName: // produce name
|
|
434 |
argsP[i].iElement = EDpsArgProductName;
|
|
435 |
argsP[i].iContent.Append(iReqParam.iProductName);
|
|
436 |
ret = aArgs.Append(argsP[i]);
|
|
437 |
break;
|
|
438 |
|
|
439 |
case EDpsArgSerialNo: // serialNo (optional)
|
|
440 |
if (iReqParam.iSerialNo.Length())
|
|
441 |
{
|
|
442 |
argsP[i].iElement = EDpsArgSerialNo;
|
|
443 |
argsP[i].iContent.Append(iReqParam.iSerialNo);
|
|
444 |
ret = aArgs.Append(argsP[i]);
|
|
445 |
}
|
|
446 |
|
|
447 |
break;
|
|
448 |
|
|
449 |
default:
|
|
450 |
IF_DEBUG(Print(_L("***Wrong parameter")));
|
|
451 |
delete[] argsP;
|
|
452 |
return KErrArgument;
|
|
453 |
}
|
|
454 |
|
|
455 |
}
|
|
456 |
|
|
457 |
if (ret != KErrNone)
|
|
458 |
{
|
|
459 |
IF_DEBUG(Print( _L("***TDpsConfigPrintService::FillReqArgs append error = %d"), ret));
|
|
460 |
}
|
|
461 |
|
|
462 |
delete[] argsP;
|
|
463 |
IF_DEBUG(Print(_L("<<<TDpsConfigPrintService::FillReqArgs")));
|
|
464 |
return ret;
|
|
465 |
}
|
|
466 |
|
|
467 |
// ---------------------------------------------------------------------------
|
|
468 |
// Not all parameters are checked. If the invalid parameter can pass the
|
|
469 |
// the complaint test, it should not be checked. Instead, the client will see
|
|
470 |
// it as unknown error. Otherwise, there might be unnecessary code and the
|
|
471 |
// client cannot be informed.
|
|
472 |
// ---------------------------------------------------------------------------
|
|
473 |
//
|
|
474 |
EXPORT_C TInt TDpsGetCapability::FillRepArgs(const TDpsArgArray& aArgs,
|
|
475 |
CDpsTransaction* aTrader)
|
|
476 |
{
|
|
477 |
IF_DEBUG(Print(_L(">>>TDpsGetCapability::FillRepArgs")));
|
|
478 |
CDpsXmlParser* XmlPar = aTrader->Parser();
|
|
479 |
|
|
480 |
TInt ret = KErrNone;
|
|
481 |
|
|
482 |
if (aArgs.Count())
|
|
483 |
{
|
|
484 |
if (EDpsArgPaperTypes == aArgs[0].iElement ||
|
|
485 |
EDpsArgLayouts == aArgs[0].iElement)
|
|
486 |
{
|
|
487 |
if (XmlPar->HasAttribute())
|
|
488 |
{
|
|
489 |
TDpsAttribute attrib;
|
|
490 |
XmlPar->GetAttribute(attrib);
|
|
491 |
ret = iRepParam.iContent.Append(attrib);
|
|
492 |
}
|
|
493 |
else
|
|
494 |
{
|
|
495 |
ret = iRepParam.iContent.Append(0);
|
|
496 |
}
|
|
497 |
|
|
498 |
if (ret != KErrNone)
|
|
499 |
{
|
|
500 |
IF_DEBUG(Print(_L("*** append error")));
|
|
501 |
return ret;
|
|
502 |
}
|
|
503 |
}
|
|
504 |
TUint32 value;
|
|
505 |
TLex8 converter;
|
|
506 |
TLex8 parser(aArgs[0].iContent);
|
|
507 |
parser.SkipSpace();
|
|
508 |
while (!parser.Eos())
|
|
509 |
{
|
|
510 |
parser.Mark();
|
|
511 |
parser.SkipCharacters();
|
|
512 |
if (KFullWordWidth == parser.TokenLength())
|
|
513 |
{
|
|
514 |
TPtrC8 token = parser.MarkedToken();
|
|
515 |
converter.Assign(token);
|
|
516 |
parser.SkipSpace();
|
|
517 |
}
|
|
518 |
else
|
|
519 |
{
|
|
520 |
IF_DEBUG(Print(_L("***Wrong argument")));
|
|
521 |
return KErrArgument;
|
|
522 |
}
|
|
523 |
TInt error = converter.Val(value, EHex);
|
|
524 |
if (error != KErrNone)
|
|
525 |
{
|
|
526 |
IF_DEBUG(Print(_L("convert error %d"), error));
|
|
527 |
return error;
|
|
528 |
}
|
|
529 |
if (EDpsArgPaperTypes == aArgs[0].iElement)
|
|
530 |
{
|
|
531 |
TDpsPaperType paperType;
|
|
532 |
TInt major = value >> KShiftLength;
|
|
533 |
paperType.iMajor = (TDpsPaperTypeMajor)major;
|
|
534 |
paperType.iMinor = (TDpsPaperTypeMinor)(value & KDpsMinorMask);
|
|
535 |
ret = iRepParam.iPaperType.Append(paperType);
|
|
536 |
}
|
|
537 |
else
|
|
538 |
{
|
|
539 |
// remove the extra zeros
|
|
540 |
value = value >> KShiftLength;
|
|
541 |
ret = iRepParam.iContent.Append(value);
|
|
542 |
IF_DEBUG(Print(_L("the value is %x"), value));
|
|
543 |
}
|
|
544 |
|
|
545 |
if (ret != KErrNone)
|
|
546 |
{
|
|
547 |
IF_DEBUG(Print(_L("*** append error")));
|
|
548 |
return ret;
|
|
549 |
}
|
|
550 |
}
|
|
551 |
iRepParam.iCap = aArgs[0].iElement;
|
|
552 |
|
|
553 |
}
|
|
554 |
|
|
555 |
IF_DEBUG(Print(_L("<<<TDpsGetCapability::FillRepArgs")));
|
|
556 |
return KErrNone;
|
|
557 |
}
|
|
558 |
|
|
559 |
// ---------------------------------------------------------------------------
|
|
560 |
// Not all parameters are checked. If the invalid parameter can pass the
|
|
561 |
// the complaint test, it should not be checked. Instead, the client will see
|
|
562 |
// it as unknown error. Otherwise, there might be unnecessary code and the
|
|
563 |
// client cannot be informed.
|
|
564 |
// ---------------------------------------------------------------------------
|
|
565 |
//
|
|
566 |
EXPORT_C TInt TDpsConfigPrintService::FillRepArgs(const TDpsArgArray& aArgs,
|
|
567 |
CDpsTransaction* aTrader)
|
|
568 |
{
|
|
569 |
IF_DEBUG(Print(_L(">>>TDpsConfigPrintService::FillRepArgs")));
|
|
570 |
TInt error = KErrNone;
|
|
571 |
TLex8 converter, parser;
|
|
572 |
const TInt count = aArgs.Count();
|
|
573 |
|
|
574 |
for (TInt i = 0; i < count; i++)
|
|
575 |
{
|
|
576 |
switch (aArgs[i].iElement)
|
|
577 |
{
|
|
578 |
case EDpsArgPrintServiceAvailable:
|
|
579 |
converter.Assign(aArgs[i].iContent);
|
|
580 |
TInt64 result;
|
|
581 |
error = converter.Val(result, EHex);
|
|
582 |
if (error != KErrNone)
|
|
583 |
{
|
|
584 |
IF_DEBUG(Print(_L("*** convert error")));
|
|
585 |
return error;
|
|
586 |
}
|
|
587 |
// removes the low four bytes zeros.
|
|
588 |
IF_DEBUG(Print(_L("--Printer available is %x"), result));
|
|
589 |
result = result >> KShiftLength;
|
|
590 |
iRepParam.iPrintAvailable = result;
|
|
591 |
break;
|
|
592 |
|
|
593 |
case EDpsArgDpsVersions:
|
|
594 |
TDpsVersion version;
|
|
595 |
|
|
596 |
parser.Assign(aArgs[i].iContent);
|
|
597 |
while (!parser.Eos())
|
|
598 |
{
|
|
599 |
parser.Mark();
|
|
600 |
parser.SkipCharacters();
|
|
601 |
if (parser.TokenLength())
|
|
602 |
{
|
|
603 |
TPtrC8 token = parser.MarkedToken();
|
|
604 |
converter.Assign(token);
|
|
605 |
parser.SkipSpace();
|
|
606 |
}
|
|
607 |
else
|
|
608 |
{
|
|
609 |
IF_DEBUG(Print(_L("***wrong !!!")));
|
|
610 |
return KErrArgument;
|
|
611 |
}
|
|
612 |
error = aTrader->ConvertVersion(converter, version);
|
|
613 |
if (error != KErrNone)
|
|
614 |
{
|
|
615 |
return error;
|
|
616 |
}
|
|
617 |
error = iRepParam.iDpsVersions.Append(version);
|
|
618 |
if (error != KErrNone)
|
|
619 |
{
|
|
620 |
IF_DEBUG(Print(_L("*** append error")));
|
|
621 |
return error;
|
|
622 |
}
|
|
623 |
}
|
|
624 |
break;
|
|
625 |
|
|
626 |
case EDpsArgVendorName:
|
|
627 |
iRepParam.iVendorName.Copy(aArgs[i].iContent);
|
|
628 |
IF_DEBUG(Print(_L
|
|
629 |
("vendor name is %S"), &iRepParam.iVendorName));
|
|
630 |
break;
|
|
631 |
|
|
632 |
case EDpsArgVendorSpecificVersion:
|
|
633 |
parser.Assign(aArgs[i].iContent);
|
|
634 |
aTrader->ConvertVersion(parser, version);
|
|
635 |
iRepParam.iVendorVersion = version;
|
|
636 |
IF_DEBUG(Print(_L
|
|
637 |
("vendor version is %x"), iRepParam.iVendorVersion));
|
|
638 |
break;
|
|
639 |
|
|
640 |
case EDpsArgProductName:
|
|
641 |
iRepParam.iProductName.Copy(aArgs[i].iContent);
|
|
642 |
IF_DEBUG(Print(_L
|
|
643 |
("product name is %S"), &iRepParam.iProductName));
|
|
644 |
break;
|
|
645 |
|
|
646 |
case EDpsArgSerialNo:
|
|
647 |
iRepParam.iSerialNo.Copy(aArgs[i].iContent);
|
|
648 |
IF_DEBUG(Print(_L("SerialNo is %S"), &iRepParam.iSerialNo));
|
|
649 |
break;
|
|
650 |
|
|
651 |
default:
|
|
652 |
IF_DEBUG(Print(_L("--Unknown param!!")));
|
|
653 |
return KErrArgument;
|
|
654 |
}
|
|
655 |
}
|
|
656 |
|
|
657 |
IF_DEBUG(Print(_L("<<<TDpsConfigPrintService::FillRepArgs")));
|
|
658 |
return KErrNone;
|
|
659 |
}
|
|
660 |
|
|
661 |
// ---------------------------------------------------------------------------
|
|
662 |
// Not all parameters are checked. If the invalid parameter can pass the
|
|
663 |
// the complaint test, it should not be checked. Instead, the client will see
|
|
664 |
// it as unknown error. Otherwise, there might be unnecessary code and the
|
|
665 |
// client cannot be informed.
|
|
666 |
// ---------------------------------------------------------------------------
|
|
667 |
//
|
|
668 |
EXPORT_C TInt TDpsGetJobStatus::FillRepArgs(const TDpsArgArray& aArgs,
|
|
669 |
CDpsTransaction* aTrader)
|
|
670 |
{
|
|
671 |
IF_DEBUG(Print(_L(">>>TDpsGetJobStatus::FillRepArgs")));
|
|
672 |
TInt value, error, per;
|
|
673 |
TBuf<KMaxArgLen> fileName;
|
|
674 |
TLex8 converter;
|
|
675 |
TInt count = aArgs.Count();
|
|
676 |
TBool reply = aTrader->IsReply();
|
|
677 |
if (!reply)
|
|
678 |
{
|
|
679 |
aTrader->Engine()->Event()->iEvent = EDpsEvtNotifyJobStatus;
|
|
680 |
}
|
|
681 |
else
|
|
682 |
{
|
|
683 |
aTrader->Engine()->Event()->iEvent = EDpsEvtEmpty;
|
|
684 |
}
|
|
685 |
for (TInt i = 0; i < count; i++)
|
|
686 |
{
|
|
687 |
switch (aArgs[i].iElement)
|
|
688 |
{
|
|
689 |
case EDpsArgPrtPID:
|
|
690 |
converter.Assign(aArgs[i].iContent);
|
|
691 |
error = converter.Val(value);
|
|
692 |
if (error != KErrNone)
|
|
693 |
{
|
|
694 |
return error;
|
|
695 |
}
|
|
696 |
if (reply)
|
|
697 |
{
|
|
698 |
iRepParam.iPrtPID = value;
|
|
699 |
}
|
|
700 |
else
|
|
701 |
{
|
|
702 |
aTrader->Engine()->Event()->iJobEvent.iRepParam.iPrtPID =
|
|
703 |
value;
|
|
704 |
}
|
|
705 |
break;
|
|
706 |
|
|
707 |
case EDpsArgFilePath:
|
|
708 |
if (reply)
|
|
709 |
{
|
|
710 |
iRepParam.iFilePath.Copy(aArgs[i].iContent);
|
|
711 |
}
|
|
712 |
else
|
|
713 |
{
|
|
714 |
aTrader->Engine()->Event()->iJobEvent.iRepParam.iFilePath.
|
|
715 |
Copy(aArgs[i].iContent);
|
|
716 |
}
|
|
717 |
break;
|
|
718 |
|
|
719 |
case EDpsArgCopyID:
|
|
720 |
converter.Assign(aArgs[i].iContent);
|
|
721 |
error = converter.Val(value);
|
|
722 |
if (error != KErrNone)
|
|
723 |
{
|
|
724 |
return error;
|
|
725 |
}
|
|
726 |
if (reply)
|
|
727 |
{
|
|
728 |
iRepParam.iCopyID = value;
|
|
729 |
}
|
|
730 |
else
|
|
731 |
{
|
|
732 |
aTrader->Engine()->Event()->iJobEvent.iRepParam.iCopyID =
|
|
733 |
value;
|
|
734 |
}
|
|
735 |
break;
|
|
736 |
|
|
737 |
case EDpsArgProgress:
|
|
738 |
per = aTrader->ParsePercentage(aArgs[i].iContent);
|
|
739 |
if (per < KErrNone)
|
|
740 |
{
|
|
741 |
return per;
|
|
742 |
}
|
|
743 |
|
|
744 |
if (reply)
|
|
745 |
{
|
|
746 |
iRepParam.iProgress = per;
|
|
747 |
}
|
|
748 |
else
|
|
749 |
{
|
|
750 |
aTrader->Engine()->Event()->iJobEvent.iRepParam.iProgress =
|
|
751 |
per;
|
|
752 |
}
|
|
753 |
break;
|
|
754 |
|
|
755 |
case EDpsArgImagesPrinted:
|
|
756 |
converter.Assign(aArgs[i].iContent);
|
|
757 |
error = converter.Val(value);
|
|
758 |
if (error != KErrNone)
|
|
759 |
{
|
|
760 |
return error;
|
|
761 |
}
|
|
762 |
if (reply)
|
|
763 |
{
|
|
764 |
iRepParam.iImagesPrinted = value;
|
|
765 |
}
|
|
766 |
else
|
|
767 |
{
|
|
768 |
aTrader->Engine()->Event()->iJobEvent.iRepParam.
|
|
769 |
iImagesPrinted = value;
|
|
770 |
}
|
|
771 |
break;
|
|
772 |
|
|
773 |
default:
|
|
774 |
IF_DEBUG(Print(_L("***wrong param!!!")));
|
|
775 |
return KErrArgument;
|
|
776 |
}
|
|
777 |
}
|
|
778 |
IF_DEBUG(Print(_L("<<<TDpsGetJobStatus::FillRepArgs")));
|
|
779 |
return KErrNone;
|
|
780 |
}
|
|
781 |
|
|
782 |
// ---------------------------------------------------------------------------
|
|
783 |
// Not all parameters are checked. If the invalid parameter can pass the
|
|
784 |
// the complaint test, it should not be checked. Instead, the client will see
|
|
785 |
// it as unknown error. Otherwise, there might be unnecessary code and the
|
|
786 |
// client cannot be informed.
|
|
787 |
// ---------------------------------------------------------------------------
|
|
788 |
//
|
|
789 |
EXPORT_C TInt TDpsGetPrinterStatus::FillRepArgs(const TDpsArgArray& aArgs,
|
|
790 |
CDpsTransaction* aTrader)
|
|
791 |
{
|
|
792 |
IF_DEBUG(Print(_L(">>>TDpsGetPrinterStatus::FillRepArgs")));
|
|
793 |
// if UI has not pass the event pointer, we do need to fill in it
|
|
794 |
if (!aTrader->Engine()->Event())
|
|
795 |
{
|
|
796 |
return KErrNone;
|
|
797 |
}
|
|
798 |
TLex8 converter;
|
|
799 |
TDpsPrinterStatusRep param;
|
|
800 |
const TInt count = aArgs.Count();
|
|
801 |
TUint32 value, temp;
|
|
802 |
TBool reply = aTrader->IsReply();
|
|
803 |
if (!reply)
|
|
804 |
{
|
|
805 |
aTrader->Engine()->Event()->iEvent = EDpsEvtNotifyDeviceStatus;
|
|
806 |
}
|
|
807 |
else
|
|
808 |
{
|
|
809 |
aTrader->Engine()->Event()->iEvent = EDpsEvtEmpty;
|
|
810 |
}
|
|
811 |
for (TInt i = 0; i < count; i++)
|
|
812 |
{
|
|
813 |
converter.Assign(aArgs[i].iContent);
|
|
814 |
TInt error = converter.Val(value, EHex);
|
|
815 |
if (error != KErrNone)
|
|
816 |
{
|
|
817 |
return error;
|
|
818 |
}
|
|
819 |
IF_DEBUG(Print(_L("--the value is %x"), value));
|
|
820 |
|
|
821 |
switch (aArgs[i].iElement)
|
|
822 |
{
|
|
823 |
case EDpsArgDpsPrintServiceStatus:
|
|
824 |
value = value >> KShiftLength;
|
|
825 |
if (EDpsPrintServiceStatusPrinting == value ||
|
|
826 |
EDpsPrintServiceStatusIdle == value ||
|
|
827 |
EDpsPrintServiceStatusPaused == value)
|
|
828 |
{
|
|
829 |
if (reply)
|
|
830 |
{
|
|
831 |
iRepParam.iPrintStatus =
|
|
832 |
(TDpsPrintServiceStatus)(value);
|
|
833 |
}
|
|
834 |
else
|
|
835 |
{
|
|
836 |
aTrader->Engine()->Event()->iPrinterEvent.iRepParam.
|
|
837 |
iPrintStatus = (TDpsPrintServiceStatus)(value);
|
|
838 |
}
|
|
839 |
}
|
|
840 |
else
|
|
841 |
{
|
|
842 |
return KErrArgument;
|
|
843 |
}
|
|
844 |
|
|
845 |
break;
|
|
846 |
|
|
847 |
case EDpsArgJobEndReason:
|
|
848 |
value = value >> KShiftLength;
|
|
849 |
if (EDpsJobStatusNotEnded == value ||
|
|
850 |
EDpsJobStatusEndedOk == value ||
|
|
851 |
EDpsJobStatusEndedAbortImmediately == value ||
|
|
852 |
EDpsJobStatusEndedAbortCompleteCurrent == value ||
|
|
853 |
EDpsJobStatusEndedOther == value)
|
|
854 |
{
|
|
855 |
if (reply)
|
|
856 |
{
|
|
857 |
iRepParam.iJobStatus = (TDpsJobStatus)(value);
|
|
858 |
}
|
|
859 |
else
|
|
860 |
{
|
|
861 |
aTrader->Engine()->Event()->iPrinterEvent.iRepParam.
|
|
862 |
iJobStatus = (TDpsJobStatus)(value);
|
|
863 |
}
|
|
864 |
}
|
|
865 |
else
|
|
866 |
{
|
|
867 |
return KErrArgument;
|
|
868 |
}
|
|
869 |
|
|
870 |
break;
|
|
871 |
|
|
872 |
case EDpsArgErrorStatus:
|
|
873 |
value = value >> KShiftLength;
|
|
874 |
if (EDpsErrorStatusOk == value ||
|
|
875 |
EDpsErrorStatusWarning == value ||
|
|
876 |
EDpsErrorStatusFatal == value)
|
|
877 |
{
|
|
878 |
if (reply)
|
|
879 |
{
|
|
880 |
iRepParam.iErrorStatus = (TDpsErrorStatus)(value);
|
|
881 |
}
|
|
882 |
else
|
|
883 |
{
|
|
884 |
aTrader->Engine()->Event()->iPrinterEvent.iRepParam.
|
|
885 |
iErrorStatus = (TDpsErrorStatus)(value);
|
|
886 |
}
|
|
887 |
}
|
|
888 |
else
|
|
889 |
{
|
|
890 |
return KErrArgument;
|
|
891 |
}
|
|
892 |
|
|
893 |
break;
|
|
894 |
|
|
895 |
case EDpsArgErrorReason:
|
|
896 |
temp = value >> KShiftLength;
|
|
897 |
if (EDpsJobErrorNone == temp ||
|
|
898 |
EDpsJobErrorPaper == temp ||
|
|
899 |
EDpsJobErrorInk == temp ||
|
|
900 |
EDpsJobErrorHardware == temp ||
|
|
901 |
EDpsJobErrorFile == temp)
|
|
902 |
{
|
|
903 |
param.iJobEndReason.iMajor =
|
|
904 |
(TDpsJobEndReasonMajor)(temp);
|
|
905 |
IF_DEBUG(Print(_L("the end reason is %x"), temp));
|
|
906 |
value = value & KDpsMinorMask;
|
|
907 |
switch (param.iJobEndReason.iMajor)
|
|
908 |
{
|
|
909 |
case EDpsJobErrorPaper:
|
|
910 |
param.iJobEndReason.iPaperMinor =
|
|
911 |
(TDpsJobEndReasonPaper)(value);
|
|
912 |
break;
|
|
913 |
|
|
914 |
case EDpsJobErrorInk:
|
|
915 |
param.iJobEndReason.iInkMinor =
|
|
916 |
(TDpsJobEndReasonInk)(value);
|
|
917 |
break;
|
|
918 |
|
|
919 |
case EDpsJobErrorHardware:
|
|
920 |
param.iJobEndReason.iHardMinor =
|
|
921 |
(TDpsJobEndReasonHard)(value);
|
|
922 |
break;
|
|
923 |
|
|
924 |
case EDpsJobErrorFile:
|
|
925 |
param.iJobEndReason.iFileMinor =
|
|
926 |
(TDpsJobEndReasonFile)(value);
|
|
927 |
break;
|
|
928 |
|
|
929 |
default:
|
|
930 |
IF_DEBUG(Print(_L("no minor error")));
|
|
931 |
break;
|
|
932 |
}
|
|
933 |
if (reply)
|
|
934 |
{
|
|
935 |
iRepParam.iJobEndReason = param.iJobEndReason;
|
|
936 |
}
|
|
937 |
else
|
|
938 |
{
|
|
939 |
aTrader->Engine()->Event()->iPrinterEvent.iRepParam.
|
|
940 |
iJobEndReason = param.iJobEndReason;
|
|
941 |
}
|
|
942 |
}
|
|
943 |
else
|
|
944 |
{
|
|
945 |
return KErrArgument;
|
|
946 |
}
|
|
947 |
|
|
948 |
break;
|
|
949 |
|
|
950 |
case EDpsArgDisconnectEnable:
|
|
951 |
value = value >> KShiftLength;
|
|
952 |
if (EDpsDisconnectEnableFalse == value)
|
|
953 |
{
|
|
954 |
param.iDisconnectEnable = EFalse;
|
|
955 |
}
|
|
956 |
else if (EDpsDisconnectEnableTrue == value)
|
|
957 |
{
|
|
958 |
param.iDisconnectEnable = ETrue;
|
|
959 |
}
|
|
960 |
else
|
|
961 |
{
|
|
962 |
return KErrArgument;
|
|
963 |
}
|
|
964 |
if (reply)
|
|
965 |
{
|
|
966 |
iRepParam.iDisconnectEnable = param.iDisconnectEnable;
|
|
967 |
}
|
|
968 |
else
|
|
969 |
{
|
|
970 |
aTrader->Engine()->Event()->iPrinterEvent.iRepParam.
|
|
971 |
iDisconnectEnable = param.iDisconnectEnable;
|
|
972 |
}
|
|
973 |
break;
|
|
974 |
|
|
975 |
case EDpsArgCapabilityChanged:
|
|
976 |
value = value >> KShiftLength;
|
|
977 |
if (EDpsCapabilityChangedFalse == value)
|
|
978 |
{
|
|
979 |
param.iCapabilityChange = EFalse;
|
|
980 |
}
|
|
981 |
else if (EDpsCapabilityChangedTrue == value)
|
|
982 |
{
|
|
983 |
param.iCapabilityChange = ETrue;
|
|
984 |
}
|
|
985 |
else
|
|
986 |
{
|
|
987 |
return KErrArgument;
|
|
988 |
}
|
|
989 |
if (reply)
|
|
990 |
{
|
|
991 |
iRepParam.iCapabilityChange = param.iCapabilityChange;
|
|
992 |
}
|
|
993 |
else
|
|
994 |
{
|
|
995 |
aTrader->Engine()->Event()->iPrinterEvent.iRepParam.
|
|
996 |
iCapabilityChange = param.iCapabilityChange;
|
|
997 |
}
|
|
998 |
break;
|
|
999 |
|
|
1000 |
case EDpsArgNewJobOk:
|
|
1001 |
value = value >> KShiftLength;
|
|
1002 |
if (EDpsNewJobOkTrue == value)
|
|
1003 |
{
|
|
1004 |
param.iNewJobOk = ETrue;
|
|
1005 |
}
|
|
1006 |
else if (EDpsNewJobOkFalse == value)
|
|
1007 |
{
|
|
1008 |
param.iNewJobOk = EFalse;
|
|
1009 |
}
|
|
1010 |
else
|
|
1011 |
{
|
|
1012 |
return KErrArgument;
|
|
1013 |
}
|
|
1014 |
if (reply)
|
|
1015 |
{
|
|
1016 |
iRepParam.iNewJobOk = param.iNewJobOk;
|
|
1017 |
}
|
|
1018 |
else
|
|
1019 |
{
|
|
1020 |
aTrader->Engine()->Event()->iPrinterEvent.iRepParam.
|
|
1021 |
iNewJobOk = param.iNewJobOk;
|
|
1022 |
}
|
|
1023 |
break;
|
|
1024 |
|
|
1025 |
default:
|
|
1026 |
IF_DEBUG(Print(_L("***wrong param")));
|
|
1027 |
return KErrArgument;
|
|
1028 |
}
|
|
1029 |
}
|
|
1030 |
|
|
1031 |
IF_DEBUG(Print(_L("<<<TDpsGetPrinterStatus::FillRepArgs")));
|
|
1032 |
return KErrNone;
|
|
1033 |
}
|