1 package com
.easysw
.cups
;
4 * @version 1.00 06-NOV-2002
7 * Internet Printing Protocol definitions for the Common UNIX Printing
10 * Copyright 2007 by Apple Inc.
11 * Copyright 1997-2002 by Easy Software Products.
13 * These coded instructions, statements, and computer programs are the
14 * property of Apple Inc. and are protected by Federal copyright
15 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
16 * which should have been included with this file. If this file is
17 * file is missing or damaged, see the license at "http://www.cups.org/".
21 * Class to convert a status code to text.
28 public class IPPStatus
34 * Constructor, access the <code>status_text</code> member
37 * @param <code>p_status</code> Status code to convert.
38 * @see <code>IPPDefs</code>
40 public IPPStatus( int p_status
)
48 case IPPDefs
.OK_SUBST
:
49 status_text
= "OK, substituted";
51 case IPPDefs
.OK_CONFLICT
:
52 status_text
= "OK, conflict";
54 case IPPDefs
.OK_IGNORED_SUBSCRIPTIONS
:
55 status_text
= "OK, ignored subscriptions";
57 case IPPDefs
.OK_IGNORED_NOTIFICATIONS
:
58 status_text
= "OK, ignored notifications";
60 case IPPDefs
.OK_TOO_MANY_EVENTS
:
61 status_text
= "OK, too many events";
63 case IPPDefs
.OK_BUT_CANCEL_SUBSCRIPTION
:
64 status_text
= "OK, but cancel subscription";
66 case IPPDefs
.REDIRECTION_OTHER_SITE
:
67 status_text
= "Redirected to other site";
69 case IPPDefs
.BAD_REQUEST
:
70 status_text
= "Bad request";
72 case IPPDefs
.FORBIDDEN
:
73 status_text
= "Forbidden";
75 case IPPDefs
.NOT_AUTHENTICATED
:
76 status_text
= "Not authenticated";
78 case IPPDefs
.NOT_AUTHORIZED
:
79 status_text
= "Not authorized";
81 case IPPDefs
.NOT_POSSIBLE
:
82 status_text
= "Not possible";
85 status_text
= "Timeout";
87 case IPPDefs
.NOT_FOUND
:
88 status_text
= "Not found";
93 case IPPDefs
.REQUEST_ENTITY
:
94 status_text
= "Request entity";
96 case IPPDefs
.REQUEST_VALUE
:
97 status_text
= "Request value";
99 case IPPDefs
.DOCUMENT_FORMAT
:
100 status_text
= "Document format";
102 case IPPDefs
.ATTRIBUTES
:
103 status_text
= "Attributes";
105 case IPPDefs
.URI_SCHEME
:
106 status_text
= "URI scheme";
108 case IPPDefs
.CHARSET
:
109 status_text
= "Charset";
111 case IPPDefs
.CONFLICT
:
112 status_text
= "Conflict";
114 case IPPDefs
.COMPRESSION_NOT_SUPPORTED
:
115 status_text
= "Compression not supported";
117 case IPPDefs
.COMPRESSION_ERROR
:
118 status_text
= "Compression error";
120 case IPPDefs
.DOCUMENT_FORMAT_ERROR
:
121 status_text
= "Document format error";
123 case IPPDefs
.DOCUMENT_ACCESS_ERROR
:
124 status_text
= "Document access error";
126 case IPPDefs
.ATTRIBUTES_NOT_SETTABLE
:
127 status_text
= "Attributes not settable";
129 case IPPDefs
.IGNORED_ALL_SUBSCRIPTIONS
:
130 status_text
= "Ignored all subscriptions";
132 case IPPDefs
.TOO_MANY_SUBSCRIPTIONS
:
133 status_text
= "Too many subscriptions";
135 case IPPDefs
.IGNORED_ALL_NOTIFICATIONS
:
136 status_text
= "Ingored all notifications";
138 case IPPDefs
.PRINT_SUPPORT_FILE_NOT_FOUND
:
139 status_text
= "Support file not found";
141 case IPPDefs
.INTERNAL_ERROR
:
142 status_text
= "Internal error";
144 case IPPDefs
.OPERATION_NOT_SUPPORTED
:
145 status_text
= "Operation not supported";
147 case IPPDefs
.SERVICE_UNAVAILABLE
:
148 status_text
= "Service unavailable";
150 case IPPDefs
.VERSION_NOT_SUPPORTED
:
151 status_text
= "Version not supported";
153 case IPPDefs
.DEVICE_ERROR
:
154 status_text
= "Device error";
156 case IPPDefs
.TEMPORARY_ERROR
:
157 status_text
= "Temporary error";
159 case IPPDefs
.NOT_ACCEPTING
:
160 status_text
= "Not accepting";
162 case IPPDefs
.PRINTER_BUSY
:
163 status_text
= "Printer busy";
165 case IPPDefs
.ERROR_JOB_CANCELLED
:
166 status_text
= "Error, job cancelled";
168 case IPPDefs
.MULTIPLE_JOBS_NOT_SUPPORTED
:
169 status_text
= "Multiple jobs not supported";
171 case IPPDefs
.PRINTER_IS_DEACTIVATED
:
172 status_text
= "Printer is de-activated";
175 status_text
= "Unknown error";
183 } // End of IPPStatus class