int gspool_ptradd(const intfd, struct apispptr *ptrd)
The function gspool_ptradd() is used to create a printer.
fd is a file descriptor previously returned by gspool_open
ptrd is a "struct apispptr" describing the details of the
printer. It is defined in the file gspool.h.
The fields in struct apispptr are defined in the documentation for
Only values for the name, device, formtype, description, local flag, the minimun
and maximum job sizes, the network filter flag and the class code are
accepted. All other parameters are ignored. We suggest that you clear
all fields to zero before starting. Future releases with additional
fields will be guaranteed to default to the existing behaviour if the
additional fields are set to zero.
Xt_ptradd returns zero if successful, otherwise an error code will
be returned according to the reason for failure.
Error codes which might be returned are:
Invalid file descriptor
failure writing to network
failure reading from network
User does not have permission to add printers
invalid form type
An example to add a printer called "hplj1" on device "/dev/tty12" with form type "a4"
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.