background image
Functional specification
27
CDE/Motif PST
CDEnext
The
XPSaveData
values for
save_data
are defined in <
X11/extensions/Print.h
>:
#define XPSpool
1
/* Job data sent to spooler */
#define XPGetData
2
/* Job data via XpGetDocumentData */
XpEndJob
signals the end of a print job. All resulting job data is assembled and combined with data
previously sent by
XpPutDocumentData
. If
save_data
is
XPSpool
, then the ddx driver within the
X Print Server submits the results, typically to a print spooler (for example, lp).
XpCancelJob
cancels an in-progress job. If
save_data
is
XPGetData
, then data available to
XpGetDocumentData
is no longer guaranteed to be valid or recoverable for the current job. If
save_data
is
XPSpool
, then the X Print Server will discard previously generated document data and
reset in preparation for future jobs. Depending on the driver and spooler configuration, a partial document
or page may be generated (e.g. the driver is directly attached to a device, and cannot recall data).
All changes to the
XPJobAttr
attribute pool (see
XpSetAttributes
) must be made prior to calling
XpStartJob
, after which a
XPBadSequence
will be generated if changes are attempted, until
XpEndJob
is called.
The last
XPJobAttr
attribute to be modified prior to the
PrintStartJob
protocol request is when
XpStartJob
internally calls
XpSetAttributes
on the job attribute
job-owner
. On POSIX
systems, the j
ob-owner
attribute is set using
getpwuid(3c)
on the result of
getuid(3c)
. The
job-
owner
attribute can then be read by others (but not written) to determine job ownership, and may be used
by the X Print Server to submit jobs to the spooler when
save_data
is
XPSpool
.
For clients selecting
XPPrintMask
(see
XpSelectInput
), the event
XPPrintNotify
will be
generated with its detail field set to
XPStartJobNotify
or
XPEndJobNotify
when the X Print
Server has completed
XpStartJob
and
XpEndJob
respectively.
XPEndJobNotify
indicates when the document data has been sent to the spooler
(
save_data
=
XPSpool
) or been completely sent to the client via
XpGetDocumentData
(
save_data
=
XPGetData
) - it does not mean that the client has received all the document data.
For more information, see documentation on the Print Dialog Manager (PDM) and X Print Server Drivers.
Conceptually, a "Job" is a collection of "Documents", where each Document is in turn a collection of
"Pages". Depending on the print facilities underlying the X Print Server (for example, the Distributed
Print Management Facility (PDMF)
), these delineations may be mapped by a ddx driver into real
functionality (e.g. see the server attribute
multiple-documents-supported
).
ERRORS/WARNINGS
These functions can generate one of the following errors:
XPBadContext
A valid print context id has not been set prior to making this call.
XPBadSequence
The function was not called in the proper order with respect to the other X
Print Service Extension calls (example,
XpEndJob
prior to
XpStartJob
).
BadValue
The value specified for
save_data
is not valid.