00001 /* 00002 ** mouse:~ppr/src/include/interface.h 00003 ** Copyright 1995--2003, Trinity College Computing Center. 00004 ** Written by David Chappell. 00005 ** 00006 ** Redistribution and use in source and binary forms, with or without 00007 ** modification, are permitted provided that the following conditions are met: 00008 ** 00009 ** * Redistributions of source code must retain the above copyright notice, 00010 ** this list of conditions and the following disclaimer. 00011 ** 00012 ** * Redistributions in binary form must reproduce the above copyright 00013 ** notice, this list of conditions and the following disclaimer in the 00014 ** documentation and/or other materials provided with the distribution. 00015 ** 00016 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00017 ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00018 ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00019 ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 00020 ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00021 ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00022 ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00023 ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00024 ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00025 ** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00026 ** POSSIBILITY OF SUCH DAMAGE. 00027 ** 00028 ** Last modified 21 October 2003. 00029 */ 00030 00031 /* 00032 ** These values are used in communication between the 00033 ** interface and pprdrv and between pprdrv and pprd. 00034 ** 00035 ** This file defines the exit codes for an printer interface 00036 ** program as well as the codes it can expect as its fifth 00037 ** parameter. 00038 ** 00039 ** There is a shell script version of this file in the 00040 ** interfaces directory. 00041 ** 00042 ** There is no reason for the user to change anything 00043 ** in this file. 00044 */ 00045 00046 /* Exit values for interfaces and pprdrv: */ 00047 #define EXIT_PRINTED 0 /* file was printed normally */ 00048 #define EXIT_PRNERR 1 /* printer error occured */ 00049 #define EXIT_PRNERR_NORETRY 2 /* printer error with no hope of retry */ 00050 #define EXIT_JOBERR 3 /* job is defective */ 00051 #define EXIT_SIGNAL 4 /* terminated after catching signal */ 00052 #define EXIT_ENGAGED 5 /* printer is otherwise engaged (connection refused) */ 00053 #define EXIT_STARVED 6 /* starved for system resources */ 00054 #define EXIT_PRNERR_NORETRY_ACCESS_DENIED 7 /* bad password? bad port permissions? */ 00055 #define EXIT_PRNERR_NOT_RESPONDING 8 /* just doesn't answer at all (turned off?) */ 00056 #define EXIT_PRNERR_NORETRY_BAD_SETTINGS 9 /* interface settings are invalid */ 00057 #define EXIT_PRNERR_NO_SUCH_ADDRESS 10 /* address lookup failed, may be transient */ 00058 #define EXIT_PRNERR_NORETRY_NO_SUCH_ADDRESS 11 /* address lookup failed, not transient */ 00059 00060 /* Tell pprdrv what is the highest code an interface should return. */ 00061 #define EXIT_INTMAX EXIT_PRNERR_NORETRY_NO_SUCH_ADDRESS 00062 00063 /* Exit values for pprdrv only: */ 00064 #define EXIT_INCAPABLE 50 /* printer wants (lacks) features or resources */ 00065 00066 /* the possible jobbreak methods */ 00067 #define JOBBREAK_DEFAULT -1 /* <-- not a real setting, used only in ppad */ 00068 #define JOBBREAK_NONE 0 /* unusable */ 00069 #define JOBBREAK_SIGNAL 1 /* SIGUSR1 handshake (tricky) */ 00070 #define JOBBREAK_CONTROL_D 2 /* simple control-D protocol */ 00071 #define JOBBREAK_PJL 3 /* HP's Printer Job Language */ 00072 #define JOBBREAK_SIGNAL_PJL 4 /* SIGUSR1 handshake and PJL */ 00073 #define JOBBREAK_SAVE_RESTORE 5 /* silly too */ 00074 #define JOBBREAK_NEWINTERFACE 6 /* lame */ 00075 00076 /* end of file */ 00077