int gspool_ptrupd(const intfd, const unsignedflags, const slotno_tslot, struct apispp *ptrd)
The gspool_ptrupd() function is used to update the details of a printer.
fd is a file descriptor previously returned by gspool_open
flags is zero, or "GSPOOL_FLAG_IGNORESEQ" to ignore changes since the list was last read.
slot is the slot number corresponding to the printer as previously
returned by gspool_ptrlist or gspool_ptrfindslot.
ptrd is a descriptor containing the printer descriptor as defined
The fields in struct apispptr are defined in the documentation for
Note that we recommend that the whole structure be first read in with
gspool_ptrread or gspool_ptrfind and then required fields updaated; this
approach will cover any future extensions with additional fields.
Only changes to the name device, description, form type, local flag,
the minimun and maximum job sizes, the network filter flag and the
class code are accepted, and none at all if the printer is running.
The function gspool_ptrupd() returns 0 if successful, otherwise one
of the following codes:
Invalid File descriptor
failure writing to the network
failure reading from the network
The user does not have permission
A class code of zero is illegal
Invalid form type
Sequence error, slot may be out of date
Printer not found
Invalid slot number
Printer is running
An example to change the form type on printer "hplj1".
Copyright (c) 2009 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the
terms of the GNU General Public License
There is NO WARRANTY, to the extent permitted by law.