#
-# "$Id: Makefile,v 1.40 2002/01/02 17:58:33 mike Exp $"
+# "$Id: Makefile,v 1.41 2002/01/24 18:51:04 mike Exp $"
#
# Top-level Makefile for the Common UNIX Printing System (CUPS).
#
#
all:
+ chmod +x cups-config
for dir in $(DIRS); do\
echo Making all in $$dir... ;\
(cd $$dir ; $(MAKE) $(MFLAGS)) || exit 1;\
epm $(EPMFLAGS) -f tardist cups
#
-# End of "$Id: Makefile,v 1.40 2002/01/02 17:58:33 mike Exp $".
+# End of "$Id: Makefile,v 1.41 2002/01/24 18:51:04 mike Exp $".
#
#
-# "$Id: cupsd.conf,v 1.38 2002/01/23 17:25:33 mike Exp $"
+# "$Id: cupsd.conf.in,v 1.1 2002/01/24 18:51:04 mike Exp $"
#
# Sample configuration file for the Common UNIX Printing System (CUPS)
# scheduler.
#
# AccessLog: the access log file; if this does not start with a leading /
# then it is assumed to be relative to ServerRoot. By default set to
-# "/var/log/cups/access_log"
+# "@CUPS_LOGDIR@/access_log"
#
# You can also use the special name "syslog" to send the output to the
# syslog file or daemon.
#
-#AccessLog /var/log/cups/access_log
+#AccessLog @CUPS_LOGDIR@/access_log
#
# Classification: the classification level of the server. If set, this
#
# DocumentRoot: the root directory for HTTP documents that are served.
-# By default the compiled in directory.
+# By default @CUPS_DOCROOT@.
#
-#DocumentRoot /usr/share/doc/cups
+#DocumentRoot @CUPS_DOCROOT@
#
# ErrorLog: the error log file; if this does not start with a leading /
# then it is assumed to be relative to ServerRoot. By default set to
-# "/var/log/cups/error_log"
+# "@CUPS_LOGDIR@/error_log"
#
# You can also use the special name "syslog" to send the output to the
# syslog file or daemon.
#
-#ErrorLog /var/log/cups/error_log
+#ErrorLog @CUPS_LOGDIR@/error_log
#
# FontPath: the path to locate all font files (currently only for pstoraster)
-# By default /usr/share/cups/fonts.
+# By default @CUPS_FONTPATH@.
#
-#FontPath /usr/share/cups/fonts
+#FontPath @CUPS_FONTPATH@
#
# LogLevel: controls the number of messages logged to the ErrorLog
#
# PageLog: the page log file; if this does not start with a leading /
# then it is assumed to be relative to ServerRoot. By default set to
-# "/var/log/cups/page_log"
+# "@CUPS_LOGDIR@/page_log"
#
# You can also use the special name "syslog" to send the output to the
# syslog file or daemon.
#
-#PageLog /var/log/cups/page_log
+#PageLog @CUPS_LOGDIR@/page_log
#
# PreserveJobHistory: whether or not to preserve the job history after a
#
# RequestRoot: the directory where request files are stored.
-# By default /var/spool/cups.
+# By default @CUPS_REQUESTS@.
#
-#RequestRoot /var/spool/cups
+#RequestRoot @CUPS_REQUESTS@
#
# RemoteRoot: the name of the user assigned to unauthenticated accesses
#
# ServerBin: the root directory for the scheduler executables.
-# By default /usr/lib/cups or /usr/lib32/cups (IRIX 6.5).
+# By default @CUPS_SERVERBIN@.
#
-#ServerBin /usr/lib/cups
+#ServerBin @CUPS_SERVERBIN@
#
# ServerRoot: the root directory for the scheduler.
-# By default /etc/cups.
+# By default @CUPS_SERVERROOT@.
#
-#ServerRoot /etc/cups
+#ServerRoot @CUPS_SERVERROOT@
########
#
# ServerCertificate: the file to read containing the server's certificate.
-# Defaults to "/etc/cups/ssl/server.crt".
+# Defaults to "@CUPS_SERVERROOT@/ssl/server.crt".
#
-#ServerCertificate /etc/cups/ssl/server.crt
+#ServerCertificate @CUPS_SERVERROOT@/ssl/server.crt
#
# ServerKey: the file to read containing the server's key.
-# Defaults to "/etc/cups/ssl/server.key".
+# Defaults to "@CUPS_SERVERROOT@/ssl/server.key".
#
-#ServerKey /etc/cups/ssl/server.key
+#ServerKey @CUPS_SERVERROOT@/ssl/server.key
########
#RIPCache 8m
#
-# TempDir: the directory to put temporary files in. This directory must be
-# writable by the user defined above! Defaults to "/var/spool/cups/tmp" or
+# TempDir: the directory to put temporary files in. This directory must be
+# writable by the user defined above! Defaults to "@CUPS_REQUESTS@/tmp" or
# the value of the TMPDIR environment variable.
#
-#TempDir /var/spool/cups/tmp
+#TempDir @CUPS_REQUESTS@/tmp
#
# FilterLimit: sets the maximum cost of all job filters that can be run
</Location>
#
-# End of "$Id: cupsd.conf,v 1.38 2002/01/23 17:25:33 mike Exp $".
+# End of "$Id: cupsd.conf.in,v 1.1 2002/01/24 18:51:04 mike Exp $".
#
dnl
-dnl "$Id: cups-directories.m4,v 1.6 2002/01/02 18:50:43 mike Exp $"
+dnl "$Id: cups-directories.m4,v 1.7 2002/01/24 18:51:05 mike Exp $"
dnl
dnl Directory stuff for the Common UNIX Printing System (CUPS).
dnl
AC_SUBST(INITDDIR)
dnl Setup default locations...
-CUPS_SERVERROOT='${sysconfdir}/cups'
-CUPS_REQUESTS='${localstatedir}/spool/cups'
+CUPS_SERVERROOT="$sysconfdir/cups"
+CUPS_REQUESTS="$localstatedir/spool/cups"
AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
if test x$logdir = x; then
- CUPS_LOGDIR='${localstatedir}/log/cups'
+ CUPS_LOGDIR="$localstatedir/log/cups"
AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
else
CUPS_LOGDIR="$logdir"
*BSD* | Darwin*)
# *BSD and Darwin (MacOS X)
INSTALL_SYSV=""
- CUPS_SERVERBIN='${exec_prefix}/libexec/cups'
+ CUPS_SERVERBIN="$exec_prefix/libexec/cups"
AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$exec_prefix/libexec/cups")
;;
*)
# All others
INSTALL_SYSV="install-sysv"
- CUPS_SERVERBIN='${exec_prefix}/lib/cups'
+ CUPS_SERVERBIN="$exec_prefix/lib/cups"
AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$exec_prefix/lib/cups")
;;
esac
dnl Set the CUPS_LOCALE directory...
case "$uname" in
Linux* | *BSD* | Darwin*)
- CUPS_LOCALEDIR='${datadir}/locale'
+ CUPS_LOCALEDIR="$datadir/locale"
AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$datadir/locale")
;;
OSF1* | AIX*)
- CUPS_LOCALEDIR='${exec_prefix}/lib/nls/msg'
+ CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$exec_prefix/lib/nls/msg")
;;
*)
# This is the standard System V location...
- CUPS_LOCALEDIR='${exec_prefix}/lib/locale'
+ CUPS_LOCALEDIR="$exec_prefix/lib/locale"
AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$exec_prefix/lib/locale")
;;
esac
AC_SUBST(CUPS_LOCALEDIR)
dnl Set the CUPS_DATADIR directory...
-CUPS_DATADIR='${datadir}/cups'
+CUPS_DATADIR="$datadir/cups"
AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
AC_SUBST(CUPS_DATADIR)
dnl Set the CUPS_DOCROOT directory...
if test x$docdir = x; then
- CUPS_DOCROOT='${datadir}/doc/cups'
+ CUPS_DOCROOT="$datadir/doc/cups"
docdir="$datadir/doc/cups"
else
CUPS_DOCROOT="$docdir"
AC_SUBST(CUPS_DOCROOT)
dnl Set the CUPS_FONTPATH directory...
+CUPS_FONTPATH="$fontpath"
+AC_SUBST(CUPS_FONTPATH)
AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$fontpath")
dnl
-dnl End of "$Id: cups-directories.m4,v 1.6 2002/01/02 18:50:43 mike Exp $".
+dnl End of "$Id: cups-directories.m4,v 1.7 2002/01/24 18:51:05 mike Exp $".
dnl
dnl
-dnl "$Id: cups-sharedlibs.m4,v 1.9 2002/01/14 20:37:44 mike Exp $"
+dnl "$Id: cups-sharedlibs.m4,v 1.10 2002/01/24 18:51:05 mike Exp $"
dnl
dnl Shared library support for the Common UNIX Printing System (CUPS).
dnl
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi2.4,-soname,\$@ -shared \$(OPTIM)"
;;
- OSF1* | Linux*)
+ OSF1* | Linux* | NetBSD* | OpenBSD*)
LIBCUPS="libcups.so.2"
LIBCUPSIMAGE="libcupsimage.so.2"
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -Wl,-soname,\$@ -shared \$(OPTIM)"
;;
- Darwin* | *BSD*)
+ Darwin* | FreeBSD*)
LIBCUPS="libcups.2.dylib"
LIBCUPSIMAGE="libcupsimage.2.dylib"
DSO="ld"
AC_SUBST(IMGLIBS)
dnl
-dnl End of "$Id: cups-sharedlibs.m4,v 1.9 2002/01/14 20:37:44 mike Exp $".
+dnl End of "$Id: cups-sharedlibs.m4,v 1.10 2002/01/24 18:51:05 mike Exp $".
dnl
dnl
-dnl "$Id: configure.in,v 1.104 2002/01/02 17:58:33 mike Exp $"
+dnl "$Id: configure.in,v 1.105 2002/01/24 18:51:04 mike Exp $"
dnl
dnl Configuration script for the Common UNIX Printing System (CUPS).
dnl
sinclude(config-scripts/cups-openssl.m4)
sinclude(config-scripts/cups-pam.m4)
-AC_OUTPUT(Makedefs cups.list cups.sh cups-config)
+AC_OUTPUT(Makedefs cups.list cups.sh cups-config conf/cupsd.conf)
chmod +x cups-config
dnl
-dnl End of "$Id: configure.in,v 1.104 2002/01/02 17:58:33 mike Exp $".
+dnl End of "$Id: configure.in,v 1.105 2002/01/24 18:51:04 mike Exp $".
dnl
<LI><A HREF="#DPKG-BINARY">Installing an Debian Distribution</A></LI>
</UL>
</UL>
-<B><A HREF="#PRINTER_MANAGEMENT">3 - Printer Management</A></B>
+<B><A HREF="#MANAGING_PRINTERS">3 - Managing Printers</A></B>
<UL>
<LI><A HREF="#4_1">The Basics</A></LI>
<LI><A HREF="#4_2">Adding Your First Printer</A></LI>
<UL>
<LI><A HREF="#13_1">My Applications Don't See the Available Printers</A></LI>
<LI><A HREF="#13_2">CUPS Doesn't Recognize My Username or Password!</A></LI>
-<LI><A HREF="#13_3">I Can't Do Administration Tasks from Another
+<LI><A HREF="#ALLOW_REMOTE">I Can't Do Administration Tasks from Another
Machine!</A></LI>
<LI><A HREF="#13_4">I Can't Do Administration Tasks from My Web Browser!</A>
</LI>
</UL>
<P>After a short delay the CUPS software will be installed and the
scheduler will be started automatically.</P>
-<H1 ALIGN="RIGHT"><A NAME="PRINTER_MANAGEMENT">3 - Printer Management</A>
-</H1>
+<H1 ALIGN="RIGHT"><A NAME="MANAGING_PRINTERS">3 - Managing Printers</A></H1>
<P>This chapter describes how to add your first printer and how to
manage your printers.</P>
<H2><A NAME="4_1">The Basics</A></H2>
configuration information.</P>
<P>Polling is enabled by specifying one or more<A HREF="#BrowsePoll"> <CODE>
BrowsePoll</CODE></A> directives in the<VAR> /etc/cups/cupsd.conf</VAR>
- file. For information on making these changes, see<A HREF="PRINTING_MANAGEMENT">
+ file. For information on making these changes, see<A HREF="#PRINTING_MANAGEMENT">
Chapter 6, "Printing System Management"</A>.</P>
<H1 ALIGN="RIGHT"><A NAME="PRINTING_MANAGEMENT">6 - Printing System
Management</A></H1>
</PRE>
</UL>
for the<VAR> /admin</VAR> location. Then restart the CUPS server as
- described in<A HREF="PRINTING_MANAGEMENT"> Chapter 8, "Printing System
+ described in<A HREF="#PRINTING_MANAGEMENT"> Chapter 6, "Printing System
Management"</A>.
<CENTER>
<TABLE BGCOLOR="#cccccc" BORDER="1" CELLPADDING="5" WIDTH="80%">
</TD></TR>
</TABLE>
</CENTER>
-<H2><A NAME="13_3">I Can't Do Administration Tasks from Another Machine!</A>
-</H2>
+<H2><A NAME="ALLOW_REMOTE">I Can't Do Administration Tasks from Another
+ Machine!</A></H2>
<P>The default CUPS configuration limits administration to the local
machine. To open up access, edit the<VAR> /etc/cups/cupsd.conf</VAR>
and comment out the lines reading:</P>
</PRE>
</UL>
for the<VAR> /admin</VAR> location. Then restart the CUPS server as
- described in<A HREF="PRINTING_MANAGEMENT"> Chapter 8, "Printing System
+ described in<A HREF="#PRINTING_MANAGEMENT"> Chapter 6, "Printing System
Management"</A>.
<CENTER>
<TABLE BGCOLOR="#cccccc" BORDER="1" CELLPADDING="5" WIDTH="80%">
scheduler will be started automatically.
-<H1 ALIGN="RIGHT"><A NAME="PRINTER_MANAGEMENT">3 - Printer Management</A></H1>
+<H1 ALIGN="RIGHT"><A NAME="MANAGING_PRINTERS">3 - Managing Printers</A></H1>
<P>This chapter describes how to add your first printer and how to
manage your printers.
<P>Polling is enabled by specifying one or more
<A HREF="#BrowsePoll"><CODE>BrowsePoll</CODE></A> directives in the
<VAR>/etc/cups/cupsd.conf</VAR> file. For information on making these
-changes, see <A HREF="PRINTING_MANAGEMENT">Chapter 6, "Printing System
+changes, see <A HREF="#PRINTING_MANAGEMENT">Chapter 6, "Printing System
Management"</A>.
</UL></PRE>
for the <VAR>/admin</VAR> location. Then restart the CUPS server as
-described in <A HREF="PRINTING_MANAGEMENT">Chapter 8, "Printing System
+described in <A HREF="#PRINTING_MANAGEMENT">Chapter 6, "Printing System
Management"</A>.
<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" BGCOLOR="#cccccc">
</TR>
</TABLE></CENTER>
-<H2>I Can't Do Administration Tasks from Another Machine!</H2>
+<H2><A NAME="ALLOW_REMOTE">I Can't Do Administration Tasks from Another Machine!</A></H2>
<P>The default CUPS configuration limits administration to the local
machine. To open up access, edit the <VAR>/etc/cups/cupsd.conf</VAR>
</PRE></UL>
for the <VAR>/admin</VAR> location. Then restart the CUPS server as
-described in <A HREF="PRINTING_MANAGEMENT">Chapter 8, "Printing System
+described in <A HREF="#PRINTING_MANAGEMENT">Chapter 6, "Printing System
Management"</A>.
<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" BGCOLOR="#cccccc">
</UL>
<B><A HREF="#STRUCTURES">C - Structures</A></B>
<UL>
-<LI><A HREF="#9_1">Raster Structures</A></LI>
+<LI><A HREF="#9_1">CUPS Structures</A></LI>
<UL>
-<LI><A HREF="#9_1_1">Raster Page Header</A></LI>
+<LI><A HREF="#cups_job_t">CUPS Destinations</A></LI>
+<LI><A HREF="#cups_job_t">CUPS Jobs</A></LI>
+<LI><A HREF="#cups_lang_t">CUPS Messages</A></LI>
+<LI><A HREF="#cups_option_t">CUPS Options</A></LI>
+</UL>
+<LI><A HREF="#9_2">Networking Structures</A></LI>
+<UL>
+<LI><A HREF="#http_t">HTTP State</A></LI>
+<LI><A HREF="#ipp_t">IPP State</A></LI>
+<LI><A HREF="#cups_option_t">CUPS Options</A></LI>
+</UL>
+<LI><A HREF="#9_3">Raster Structures</A></LI>
+<UL>
+<LI><A HREF="#cups_raster_header_t">Raster Page Header</A></LI>
</UL>
</UL>
-<B><A HREF="#10">D - Functions</A></B>
+<B><A HREF="#FUNCTIONS">D - Functions</A></B>
<UL>
<LI><A HREF="#cupsAddOption">cupsAddOption()</A></LI>
<UL>
Interfaces ("GUIs"), the CUPS API provides functions to set the default
username and to register a callback function that returns a password
string.</P>
-<P>The<A HREF="cupsSetPasswordCB"> <CODE>cupsSetPasswordCB()</CODE></A>
+<P>The<A HREF="#cupsSetPasswordCB"> <CODE>cupsSetPasswordCB()</CODE></A>
function is used to set a password callback in your program. Only one
function can be used at any time.</P>
-<P>The<A HREF="cupsSetUser"> <CODE>cupsSetUser()</CODE></A> function
+<P>The<A HREF="#cupsSetUser"> <CODE>cupsSetUser()</CODE></A> function
sets the current username for authentication. This function can be
called by your password callback function to change the current
username as needed.</P>
<H1 ALIGN="RIGHT"><A NAME="STRUCTURES">C - Structures</A></H1>
<P>This appendix describes all of the structures that are defined by the
CUPS API.</P>
-<H2><A NAME="9_1">Raster Structures</A></H2>
-<H3><A NAME="9_1_1">Raster Page Header</A></H3>
-<P>The raster page header (<A NAME="cups_raster_header_t"><CODE>
-cups_raster_header_t</CODE></A>) consists of the PostScript page device
- dictionary for the page:
+<H2><A NAME="9_1">CUPS Structures</A></H2>
+<H3><A NAME="cups_job_t">CUPS Destinations</A></H3>
+<P>The CUPS destination structure (<CODE>cups_dest_t</CODE>) contains
+ information on a specific destination or instance:
+<CENTER>
+<TABLE BORDER="1" WIDTH="90%">
+<TR><TH>Member</TH><TH>Type</TH><TH>Description</TH></TR>
+<TR><TD>name</TD><TD>char *</TD><TD>The name of the printer or class.</TD>
+</TR>
+<TR><TD>instance</TD><TD>char *</TD><TD>The instance of the printer or
+ class; NULL for the primary instance.</TD></TR>
+<TR><TD>is_default</TD><TD>int</TD><TD>1 if the destination is set as
+ the default, 0 otherwise.</TD></TR>
+<TR><TD>num_options</TD><TD>int</TD><TD>The number of options associated
+ with this destination.</TD></TR>
+<TR><TD>options</TD><TD><A HREF="#cups_option_t">cups_option_t *</A></TD><TD>
+The options associated with this destination.</TD></TR>
+</TABLE>
+</CENTER>
+</P>
+<H3><A NAME="cups_job_t">CUPS Jobs</A></H3>
+<P>The CUPS job structure (<CODE>cups_job_t</CODE>) contains information
+ on a specific job:
+<CENTER>
+<TABLE BORDER="1" WIDTH="90%">
+<TR><TH>Member</TH><TH>Type</TH><TH>Description</TH></TR>
+<TR><TD>id</TD><TD>int</TD><TD>The job ID for this job.</TD></TR>
+<TR><TD>dest</TD><TD>char *</TD><TD>The destination for this job
+ (printer or class name).</TD></TR>
+<TR><TD>title</TD><TD>char *</TD><TD>The job-name for this job (title).</TD>
+</TR>
+<TR><TD>user</TD><TD>char *</TD><TD>The job-originating-user-name for
+ this job (username).</TD></TR>
+<TR><TD>format</TD><TD>char *</TD><TD>The document-format for this job
+ (MIME type string).</TD></TR>
+<TR><TD>state</TD><TD>ipp_jstate</TD><TD>The current state of the job.</TD>
+</TR>
+<TR><TD>size</TD><TD>int</TD><TD>The size of this job in kilobytes.</TD></TR>
+<TR><TD>priority</TD><TD>int</TD><TD>The priority of this job from 1 to
+ 100 (50 is normal).</TD></TR>
+<TR><TD>completed_time</TD><TD>time_t</TD><TD>The time the job was
+ completed, or 0 if not yet completed.</TD></TR>
+<TR><TD>creation_time</TD><TD>time_t</TD><TD>The time the job was
+ queued.</TD></TR>
+<TR><TD>processing_time</TD><TD>time_t</TD><TD>The time the job started
+ printing.</TD></TR>
+</TABLE>
+</CENTER>
+</P>
+<H3><A NAME="cups_lang_t">CUPS Messages</A></H3>
+<P>The CUPS messages structure (<CODE>cups_lang_t</CODE>) contains the
+ character set, locale name, and messages array:
+<CENTER>
+<TABLE BORDER="1" WIDTH="90%">
+<TR><TH>Member</TH><TH>Type</TH><TH>Description</TH></TR>
+<TR><TD>next</TD><TD>cups_lang_t *</TD><TD>Pointer to the next messages
+ structure in memory.</TD></TR>
+<TR><TD>used</TD><TD>int</TD><TD>The number of active users of this
+ messages structure.</TD></TR>
+<TR><TD>encoding</TD><TD>cups_encoding_t</TD><TD>The character encoding
+ of the message strings.</TD></TR>
+<TR><TD>language</TD><TD>char [16]</TD><TD>The language/locale name.</TD>
+</TR>
+<TR><TD>messages</TD><TD>char *[]</TD><TD>The array of message strings.</TD>
+</TR>
+</TABLE>
+</CENTER>
+</P>
+<H3><A NAME="cups_option_t">CUPS Options</A></H3>
+<P>The CUPS option structure (<CODE>cups_option_t</CODE>) contains the
+ option name and string value:
+<CENTER>
+<TABLE BORDER="1" WIDTH="90%">
+<TR><TH>Member</TH><TH>Type</TH><TH>Description</TH></TR>
+<TR><TD>name</TD><TD>char *</TD><TD>The name of the option.</TD></TR>
+<TR><TD>value</TD><TD>char *</TD><TD>The string value of the option.</TD>
+</TR>
+</TABLE>
+</CENTER>
+</P>
+<H2><A NAME="9_2">Networking Structures</A></H2>
+<H3><A NAME="http_t">HTTP State</A></H3>
+<P>The HTTP state structure (<CODE>http_t</CODE>) contains the current
+ state of a HTTP request or response:
+<CENTER>
+<TABLE BORDER="1" WIDTH="90%">
+<TR><TH>Member</TH><TH>Type</TH><TH>Description</TH></TR>
+<TR><TD>fd</TD><TD>int</TD><TD>The socket for the HTTP connection.</TD></TR>
+<TR><TD>blocking</TD><TD>int</TD><TD>1 if the HTTP functions should
+ block, 0 if not.</TD></TR>
+<TR><TD>error</TD><TD>int</TD><TD>The last OS error that occurred on the
+ socket.</TD></TR>
+<TR><TD>activity</TD><TD>time_t</TD><TD>The last time the HTTP
+ connection was used.</TD></TR>
+<TR><TD>state</TD><TD>http_state_t</TD><TD>The current HTTP
+ request/response state.</TD></TR>
+<TR><TD>status</TD><TD>int</TD><TD>The last HTTP status seen.</TD></TR>
+<TR><TD>version</TD><TD>http_version_t</TD><TD>The HTTP protocol version
+ in use.</TD></TR>
+<TR><TD>keep_alive</TD><TD>http_keep_alive_t</TD><TD>Whether or not to
+ use Keep-Alive</TD></TR>
+<TR><TD>hostaddr</TD><TD>struct sockaddr_in</TD><TD>The IPv4 address of
+ the HTTP server.</TD></TR>
+<TR><TD>hostname</TD><TD>char []</TD><TD>The hostname of the HTTP
+ server.</TD></TR>
+<TR><TD>fields</TD><TD>char [][]</TD><TD>The string values of all HTTP
+ request/response fields.</TD></TR>
+<TR><TD>data</TD><TD>char *</TD><TD>Current byte in data buffer.</TD></TR>
+<TR><TD>data_encoding</TD><TD>http_encoding_t</TD><TD>The transfer
+ encoding for the request/response.</TD></TR>
+<TR><TD>data_remaining</TD><TD>int</TD><TD>The number of bytes remaining
+ in the current request, response, or chunk.</TD></TR>
+<TR><TD>used</TD><TD>int</TD><TD>The number of bytes that are used in
+ the buffer.</TD></TR>
+<TR><TD>buffer</TD><TD>char []</TD><TD>The read/write buffer.</TD></TR>
+<TR><TD>auth_type</TD><TD>int</TD><TD>The type of authentication in use.</TD>
+</TR>
+<TR><TD>md5_state</TD><TD>md5_state_t</TD><TD>The current MD5 digest
+ state.</TD></TR>
+<TR><TD>nonce</TD><TD>char []</TD><TD>The nonce value for Digest
+ authentication.</TD></TR>
+<TR><TD>nonce_count</TD><TD>int</TD><TD>The nonce count value.</TD></TR>
+<TR><TD>tls</TD><TD>void *</TD><TD>A pointer to private encryption data.</TD>
+</TR>
+<TR><TD>encryption</TD><TD>http_encryption_t</TD><TD>The current
+ encryption mode.</TD></TR>
+</TABLE>
+</CENTER>
+</P>
+<H3><A NAME="ipp_t">IPP State</A></H3>
+<P>The IPP state structure (<CODE>ipp_t</CODE>) contains the current
+ state of a IPP request or response:
+<CENTER>
+<TABLE BORDER="1" WIDTH="90%">
+<TR><TH>Member</TH><TH>Type</TH><TH>Description</TH></TR>
+<TR><TD></TD><TD></TD><TD></TD></TR>
+</TABLE>
+</CENTER>
+</P>
+<H3><A NAME="cups_option_t">CUPS Options</A></H3>
+<P>The CUPS option structure (<CODE>cups_option_t</CODE>) contains the
+ option name and string value:
+<CENTER>
+<TABLE BORDER="1" WIDTH="90%">
+<TR><TH>Member</TH><TH>Type</TH><TH>Description</TH></TR>
+<TR><TD></TD><TD></TD><TD></TD></TR>
+</TABLE>
+</CENTER>
+</P>
+<H2><A NAME="9_3">Raster Structures</A></H2>
+<H3><A NAME="cups_raster_header_t">Raster Page Header</A></H3>
+<P>The raster page header (<CODE>cups_raster_header_t</CODE>) consists
+ of the PostScript page device dictionary for the page:
<CENTER>
<TABLE BORDER="1" WIDTH="90%">
<TR><TH>Member</TH><TH>Type</TH><TH>Description</TH></TR>
</TABLE>
</CENTER>
</P>
-<H1 ALIGN="RIGHT"><A HREF="FUNCTIONS" NAME="10">D - Functions</A></H1>
+<H1 ALIGN="RIGHT"><A NAME="FUNCTIONS">D - Functions</A></H1>
<P>This appendix provides a reference for all of the CUPS API functions.
<!-- NEW PAGE -->
</P>
functions to set the default username and to register a callback
function that returns a password string.
-<P>The <A HREF="cupsSetPasswordCB"><CODE>cupsSetPasswordCB()</CODE></A>
+<P>The <A HREF="#cupsSetPasswordCB"><CODE>cupsSetPasswordCB()</CODE></A>
function is used to set a password callback in your program. Only one
function can be used at any time.
-<P>The <A HREF="cupsSetUser"><CODE>cupsSetUser()</CODE></A> function sets
+<P>The <A HREF="#cupsSetUser"><CODE>cupsSetUser()</CODE></A> function sets
the current username for authentication. This function can be called by
your password callback function to change the current username as needed.
<H1 ALIGN="RIGHT"><A NAME="STRUCTURES">C - Structures</A></H1>
-<P>This appendix describes all of the structures that are defined by the CUPS
-API.
+<P>This appendix describes all of the structures that are
+defined by the CUPS API.
+
+<H2>CUPS Structures</H2>
+
+<H3><A NAME="cups_job_t">CUPS Destinations</A></H3>
+
+<P>The CUPS destination structure (<CODE>cups_dest_t</CODE>)
+contains information on a specific destination or instance:
+
+<CENTER><TABLE WIDTH="90%" BORDER="1">
+<TR>
+ <TH>Member</TH>
+ <TH>Type</TH>
+ <TH>Description</TH>
+</TR>
+<TR>
+ <TD>name</TD>
+ <TD>char *</TD>
+ <TD>The name of the printer or class.</TD>
+</TR>
+<TR>
+ <TD>instance</TD>
+ <TD>char *</TD>
+ <TD>The instance of the printer or class; NULL for the primary
+ instance.</TD>
+</TR>
+<TR>
+ <TD>is_default</TD>
+ <TD>int</TD>
+ <TD>1 if the destination is set as the default, 0 otherwise.</TD>
+</TR>
+<TR>
+ <TD>num_options</TD>
+ <TD>int</TD>
+ <TD>The number of options associated with this destination.</TD>
+</TR>
+<TR>
+ <TD>options</TD>
+ <TD><A HREF="#cups_option_t">cups_option_t *</A></TD>
+ <TD>The options associated with this destination.</TD>
+</TR>
+</TABLE></CENTER>
+
+<H3><A NAME="cups_job_t">CUPS Jobs</A></H3>
+
+<P>The CUPS job structure (<CODE>cups_job_t</CODE>) contains
+information on a specific job:
+
+<CENTER><TABLE WIDTH="90%" BORDER="1">
+<TR>
+ <TH>Member</TH>
+ <TH>Type</TH>
+ <TH>Description</TH>
+</TR>
+<TR>
+ <TD>id</TD>
+ <TD>int</TD>
+ <TD>The job ID for this job.</TD>
+</TR>
+<TR>
+ <TD>dest</TD>
+ <TD>char *</TD>
+ <TD>The destination for this job (printer or class name).</TD>
+</TR>
+<TR>
+ <TD>title</TD>
+ <TD>char *</TD>
+ <TD>The job-name for this job (title).</TD>
+</TR>
+<TR>
+ <TD>user</TD>
+ <TD>char *</TD>
+ <TD>The job-originating-user-name for this job (username).</TD>
+</TR>
+<TR>
+ <TD>format</TD>
+ <TD>char *</TD>
+ <TD>The document-format for this job (MIME type string).</TD>
+</TR>
+<TR>
+ <TD>state</TD>
+ <TD>ipp_jstate</TD>
+ <TD>The current state of the job.</TD>
+</TR>
+<TR>
+ <TD>size</TD>
+ <TD>int</TD>
+ <TD>The size of this job in kilobytes.</TD>
+</TR>
+<TR>
+ <TD>priority</TD>
+ <TD>int</TD>
+ <TD>The priority of this job from 1 to 100 (50 is normal).</TD>
+</TR>
+<TR>
+ <TD>completed_time</TD>
+ <TD>time_t</TD>
+ <TD>The time the job was completed, or 0 if not yet completed.</TD>
+</TR>
+<TR>
+ <TD>creation_time</TD>
+ <TD>time_t</TD>
+ <TD>The time the job was queued.</TD>
+</TR>
+<TR>
+ <TD>processing_time</TD>
+ <TD>time_t</TD>
+ <TD>The time the job started printing.</TD>
+</TR>
+</TABLE></CENTER>
+
+<H3><A NAME="cups_lang_t">CUPS Messages</A></H3>
+
+<P>The CUPS messages structure (<CODE>cups_lang_t</CODE>)
+contains the character set, locale name, and messages array:
+
+<CENTER><TABLE WIDTH="90%" BORDER="1">
+<TR>
+ <TH>Member</TH>
+ <TH>Type</TH>
+ <TH>Description</TH>
+</TR>
+<TR>
+ <TD>next</TD>
+ <TD>cups_lang_t *</TD>
+ <TD>Pointer to the next messages structure in memory.</TD>
+</TR>
+<TR>
+ <TD>used</TD>
+ <TD>int</TD>
+ <TD>The number of active users of this messages structure.</TD>
+</TR>
+<TR>
+ <TD>encoding</TD>
+ <TD>cups_encoding_t</TD>
+ <TD>The character encoding of the message strings.</TD>
+</TR>
+<TR>
+ <TD>language</TD>
+ <TD>char [16]</TD>
+ <TD>The language/locale name.</TD>
+</TR>
+<TR>
+ <TD>messages</TD>
+ <TD>char *[]</TD>
+ <TD>The array of message strings.</TD>
+</TR>
+</TABLE></CENTER>
+
+<H3><A NAME="cups_option_t">CUPS Options</A></H3>
+
+<P>The CUPS option structure (<CODE>cups_option_t</CODE>)
+contains the option name and string value:
+
+<CENTER><TABLE WIDTH="90%" BORDER="1">
+<TR>
+ <TH>Member</TH>
+ <TH>Type</TH>
+ <TH>Description</TH>
+</TR>
+<TR>
+ <TD>name</TD>
+ <TD>char *</TD>
+ <TD>The name of the option.</TD>
+</TR>
+<TR>
+ <TD>value</TD>
+ <TD>char *</TD>
+ <TD>The string value of the option.</TD>
+</TR>
+</TABLE></CENTER>
+
+<H2>Networking Structures</H2>
+
+<H3><A NAME="http_t">HTTP State</A></H3>
+
+<P>The HTTP state structure (<CODE>http_t</CODE>) contains the
+current state of a HTTP request or response:
+
+<CENTER><TABLE WIDTH="90%" BORDER="1">
+<TR>
+ <TH>Member</TH>
+ <TH>Type</TH>
+ <TH>Description</TH>
+</TR>
+<TR>
+ <TD>fd</TD>
+ <TD>int</TD>
+ <TD>The socket for the HTTP connection.</TD>
+</TR>
+<TR>
+ <TD>blocking</TD>
+ <TD>int</TD>
+ <TD>1 if the HTTP functions should block, 0 if not.</TD>
+</TR>
+<TR>
+ <TD>error</TD>
+ <TD>int</TD>
+ <TD>The last OS error that occurred on the socket.</TD>
+</TR>
+<TR>
+ <TD>activity</TD>
+ <TD>time_t</TD>
+ <TD>The last time the HTTP connection was used.</TD>
+</TR>
+<TR>
+ <TD>state</TD>
+ <TD>http_state_t</TD>
+ <TD>The current HTTP request/response state.</TD>
+</TR>
+<TR>
+ <TD>status</TD>
+ <TD>int</TD>
+ <TD>The last HTTP status seen.</TD>
+</TR>
+<TR>
+ <TD>version</TD>
+ <TD>http_version_t</TD>
+ <TD>The HTTP protocol version in use.</TD>
+</TR>
+<TR>
+ <TD>keep_alive</TD>
+ <TD>http_keep_alive_t</TD>
+ <TD>Whether or not to use Keep-Alive</TD>
+</TR>
+<TR>
+ <TD>hostaddr</TD>
+ <TD>struct sockaddr_in</TD>
+ <TD>The IPv4 address of the HTTP server.</TD>
+</TR>
+<TR>
+ <TD>hostname</TD>
+ <TD>char []</TD>
+ <TD>The hostname of the HTTP server.</TD>
+</TR>
+<TR>
+ <TD>fields</TD>
+ <TD>char [][]</TD>
+ <TD>The string values of all HTTP request/response
+ fields.</TD>
+</TR>
+<TR>
+ <TD>data</TD>
+ <TD>char *</TD>
+ <TD>Current byte in data buffer.</TD>
+</TR>
+<TR>
+ <TD>data_encoding</TD>
+ <TD>http_encoding_t</TD>
+ <TD>The transfer encoding for the request/response.</TD>
+</TR>
+<TR>
+ <TD>data_remaining</TD>
+ <TD>int</TD>
+ <TD>The number of bytes remaining in the current request,
+ response, or chunk.</TD>
+</TR>
+<TR>
+ <TD>used</TD>
+ <TD>int</TD>
+ <TD>The number of bytes that are used in the buffer.</TD>
+</TR>
+<TR>
+ <TD>buffer</TD>
+ <TD>char []</TD>
+ <TD>The read/write buffer.</TD>
+</TR>
+<TR>
+ <TD>auth_type</TD>
+ <TD>int</TD>
+ <TD>The type of authentication in use.</TD>
+</TR>
+<TR>
+ <TD>md5_state</TD>
+ <TD>md5_state_t</TD>
+ <TD>The current MD5 digest state.</TD>
+</TR>
+<TR>
+ <TD>nonce</TD>
+ <TD>char []</TD>
+ <TD>The nonce value for Digest authentication.</TD>
+</TR>
+<TR>
+ <TD>nonce_count</TD>
+ <TD>int</TD>
+ <TD>The nonce count value.</TD>
+</TR>
+<TR>
+ <TD>tls</TD>
+ <TD>void *</TD>
+ <TD>A pointer to private encryption data.</TD>
+</TR>
+<TR>
+ <TD>encryption</TD>
+ <TD>http_encryption_t</TD>
+ <TD>The current encryption mode.</TD>
+</TR>
+</TABLE></CENTER>
+
+<H3><A NAME="ipp_t">IPP State</A></H3>
+
+<P>The IPP state structure (<CODE>ipp_t</CODE>) contains the
+current state of a IPP request or response:
+
+<CENTER><TABLE WIDTH="90%" BORDER="1">
+<TR>
+ <TH>Member</TH>
+ <TH>Type</TH>
+ <TH>Description</TH>
+</TR>
+<TR>
+ <TD></TD>
+ <TD></TD>
+ <TD></TD>
+</TR>
+</TABLE></CENTER>
+
+<H3><A NAME="cups_option_t">CUPS Options</A></H3>
+
+<P>The CUPS option structure (<CODE>cups_option_t</CODE>)
+contains the option name and string value:
+
+<CENTER><TABLE WIDTH="90%" BORDER="1">
+<TR>
+ <TH>Member</TH>
+ <TH>Type</TH>
+ <TH>Description</TH>
+</TR>
+<TR>
+ <TD></TD>
+ <TD></TD>
+ <TD></TD>
+</TR>
+</TABLE></CENTER>
+
<H2>Raster Structures</H2>
-<H3>Raster Page Header</H3>
+<H3><A NAME="cups_raster_header_t">Raster Page Header</A></H3>
-<P>The raster page header (<A
-NAME="cups_raster_header_t"><CODE>cups_raster_header_t</CODE></A>) consists
-of the PostScript page device dictionary for the page:
+<P>The raster page header (<CODE>cups_raster_header_t</CODE>)
+consists of the PostScript page device dictionary for the page:
<CENTER><TABLE WIDTH="90%" BORDER="1">
<TR>
</TR>
</TABLE></CENTER>
-<H1 ALIGN="RIGHT"><A HREF="FUNCTIONS">D - Functions</A></H1>
+<H1 ALIGN="RIGHT"><A NAME="FUNCTIONS">D - Functions</A></H1>
<P>This appendix provides a reference for all of the CUPS API functions.