29
|
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 define the dps operation parameters.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef DPSPARAM_H
|
|
20 |
#define DPSPARAM_H
|
|
21 |
|
|
22 |
#include "dpsdefs.h"
|
|
23 |
|
|
24 |
enum TDpsSupportedOp
|
|
25 |
{
|
|
26 |
EDpsEmptyRequest = 0,
|
|
27 |
EDpsConfigPrintService,
|
|
28 |
EDpsGetCapability,
|
|
29 |
EDpsGetJobStatus,
|
|
30 |
EDpsGetPrinterStatus,
|
|
31 |
EDpsStartJob,
|
|
32 |
EDpsAbortJob,
|
|
33 |
EDpsContinueJob
|
|
34 |
};
|
|
35 |
|
|
36 |
struct TDpsArgsInt
|
|
37 |
{
|
|
38 |
TDpsArgument iElement;
|
|
39 |
TUint32 iContent;
|
|
40 |
};
|
|
41 |
|
|
42 |
/**
|
|
43 |
* The class defines the print job information which is needed by
|
|
44 |
* startJob operation
|
|
45 |
*/
|
|
46 |
NONSHARABLE_CLASS(TDpsPrintInfo)
|
|
47 |
{
|
|
48 |
public:
|
|
49 |
/**
|
|
50 |
*
|
|
51 |
*/
|
|
52 |
inline TDpsPrintInfo();
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Resets all parameters
|
|
56 |
*/
|
|
57 |
IMPORT_C void Reset();
|
|
58 |
|
|
59 |
// the file name
|
|
60 |
TBuf<KMaxArgLen> iFile;
|
|
61 |
|
|
62 |
TBool isDPOF;
|
|
63 |
// this is 0 when UI passed it to dps. Dps engine must find the ID
|
|
64 |
// for this file by asking ptp server
|
|
65 |
TUint32 iFileID;
|
|
66 |
// if don't need to print file name, this is EFalse
|
|
67 |
TBool iFileName;
|
|
68 |
// if don't need to print date, this is empty
|
|
69 |
TBuf<KDateLen> iDate;
|
|
70 |
// if only one cope, this is emtpy
|
|
71 |
TInt iCopies;
|
|
72 |
// if not DPOF, this is emtpy
|
|
73 |
TInt iPrtPID;
|
|
74 |
// if not DPOF, this is emtpy
|
|
75 |
TInt iCopyID;
|
|
76 |
};
|
|
77 |
|
|
78 |
/**
|
|
79 |
* Dps version defination
|
|
80 |
*/
|
|
81 |
NONSHARABLE_CLASS(TDpsVersion)
|
|
82 |
{
|
|
83 |
public:
|
|
84 |
TInt iMajor;
|
|
85 |
TInt iMinor;
|
|
86 |
};
|
|
87 |
|
|
88 |
/**
|
|
89 |
* AbortJob request
|
|
90 |
*/
|
|
91 |
NONSHARABLE_CLASS(TDpsAbortJobReq)
|
|
92 |
{
|
|
93 |
public:
|
|
94 |
TInt iAbortStyle;
|
|
95 |
};
|
|
96 |
|
|
97 |
/**
|
|
98 |
* ConfigurePrintService request
|
|
99 |
*/
|
|
100 |
class TDpsConfigPrintReq
|
|
101 |
{
|
|
102 |
public:
|
|
103 |
RArray<TDpsVersion> iDpsVersions;
|
|
104 |
TBuf8<KMaxArgLen> iVendorName;
|
|
105 |
TDpsVersion iVendorVersion;
|
|
106 |
TBuf8<KMaxArgLen> iProductName;
|
|
107 |
TBuf8<KMaxArgLen> iSerialNo;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Destructor. Declared as virtual so that it will be called by
|
|
111 |
* its derived class.
|
|
112 |
*/
|
|
113 |
inline virtual ~TDpsConfigPrintReq();
|
|
114 |
|
|
115 |
/**
|
|
116 |
* Resets all class variables.
|
|
117 |
*/
|
|
118 |
inline void Reset();
|
|
119 |
};
|
|
120 |
|
|
121 |
/**
|
|
122 |
* ConfigurePrintService reply
|
|
123 |
*/
|
|
124 |
NONSHARABLE_CLASS(TDpsConfigPrintRep) : public TDpsConfigPrintReq
|
|
125 |
{
|
|
126 |
public:
|
|
127 |
TInt iPrintAvailable;
|
|
128 |
};
|
|
129 |
|
|
130 |
/**
|
|
131 |
* GetCapability request.
|
|
132 |
*/
|
|
133 |
NONSHARABLE_CLASS(TDpsCapReq)
|
|
134 |
{
|
|
135 |
public:
|
|
136 |
TDpsArgument iCap;
|
|
137 |
// layouts and paperTypes requests attributes
|
|
138 |
TDpsAttribute iAttribute;
|
|
139 |
};
|
|
140 |
|
|
141 |
/**
|
|
142 |
* GetCapability reply
|
|
143 |
*/
|
|
144 |
NONSHARABLE_CLASS(TDpsCapRep) : public TDpsCapReq
|
|
145 |
{
|
|
146 |
public:
|
|
147 |
RArray<TUint> iContent;
|
|
148 |
RArray<TDpsPaperType> iPaperType;
|
|
149 |
/**
|
|
150 |
* Destructor
|
|
151 |
*/
|
|
152 |
inline ~TDpsCapRep();
|
|
153 |
|
|
154 |
/**
|
|
155 |
* Resets all class variables
|
|
156 |
*/
|
|
157 |
inline void Reset();
|
|
158 |
};
|
|
159 |
|
|
160 |
/**
|
|
161 |
* StartJob request has printInfo and jobConfig parameters.
|
|
162 |
*/
|
|
163 |
NONSHARABLE_CLASS(TDpsStartJobReq)
|
|
164 |
{
|
|
165 |
public:
|
|
166 |
/**
|
|
167 |
* Resets all member variables
|
|
168 |
*/
|
|
169 |
inline void Reset();
|
|
170 |
|
|
171 |
/**
|
|
172 |
* Gets the number of all parameters, including ones under elements
|
|
173 |
* @return the number of parameters
|
|
174 |
*/
|
|
175 |
IMPORT_C TInt GetParamNum();
|
|
176 |
|
|
177 |
/**
|
|
178 |
* Destructor
|
|
179 |
*/
|
|
180 |
inline ~TDpsStartJobReq();
|
|
181 |
RArray<TDpsArgsInt> iJobConfig;
|
|
182 |
//there might be multiple printInfo in case of several pictures are
|
|
183 |
//selected to be printed
|
|
184 |
RArray<TDpsPrintInfo> iPrintInfo;
|
|
185 |
};
|
|
186 |
|
|
187 |
/**
|
|
188 |
* This class is for job status reply
|
|
189 |
*/
|
|
190 |
NONSHARABLE_CLASS(TDpsJobStatusRep)
|
|
191 |
{
|
|
192 |
public:
|
|
193 |
|
|
194 |
/**
|
|
195 |
*
|
|
196 |
*/
|
|
197 |
inline TDpsJobStatusRep();
|
|
198 |
/**
|
|
199 |
* Resets all memeber variables
|
|
200 |
*/
|
|
201 |
IMPORT_C void Reset();
|
|
202 |
|
|
203 |
TInt iProgress;
|
|
204 |
TInt iImagesPrinted;
|
|
205 |
TFileName iFilePath;
|
|
206 |
TInt iPrtPID;
|
|
207 |
TInt iCopyID;
|
|
208 |
};
|
|
209 |
|
|
210 |
/**
|
|
211 |
* This class is for device status reply
|
|
212 |
*/
|
|
213 |
NONSHARABLE_CLASS(TDpsPrinterStatusRep)
|
|
214 |
{
|
|
215 |
public:
|
|
216 |
TDpsPrintServiceStatus iPrintStatus;
|
|
217 |
TDpsJobStatus iJobStatus;
|
|
218 |
TDpsErrorStatus iErrorStatus;
|
|
219 |
TDpsJobEndReason iJobEndReason;
|
|
220 |
TBool iDisconnectEnable;
|
|
221 |
TBool iCapabilityChange;
|
|
222 |
TBool iNewJobOk;
|
|
223 |
};
|
|
224 |
#include "dpsparam.inl"
|
|
225 |
#endif
|