]> git.ipfire.org Git - thirdparty/cups.git/blame_incremental - scripting/java/src/com/easysw/cups/IPPRequest.java
Load cups into easysw/current.
[thirdparty/cups.git] / scripting / java / src / com / easysw / cups / IPPRequest.java
... / ...
CommitLineData
1package com.easysw.cups;
2
3/**
4 * @version 1.00 06-NOV-2002
5 * @author Apple Inc.
6 *
7 * Internet Printing Protocol definitions for the Common UNIX Printing
8 * System (CUPS).
9 *
10 * Copyright 2007 by Apple Inc.
11 * Copyright 1997-2002 by Easy Software Products.
12 *
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/".
18 */
19
20/**
21 * An <code>IPPRequest</code> object is used to hold the
22 * status and id's of a request.
23 *
24 * @author TDB
25 * @version 1.0
26 * @since JDK1.3
27 */
28public class IPPRequest
29{
30 char[] version; // Proto version number
31 int request_id; // Unique ID
32
33 int op_status;
34 short operation_id;
35 short status_code;
36
37 /**
38 * Constructor
39 */
40 public IPPRequest()
41 {
42 version = new char[2];
43 }
44
45 /**
46 * Constructor using request id and operation id.
47 *
48 * @param <code>p_request_id</code> ID of request.
49 * @param <code>p_operation_id</code> Operation ID for request.
50 *
51 * @see <code>IPPDefs</code>
52 */
53 public IPPRequest( int p_request_id, short p_operation_id )
54 {
55 version = new char[2];
56 version[0] = (char)1;
57 version[1] = (char)1;
58 request_id = p_request_id;
59 operation_id = p_operation_id;
60 }
61
62 /**
63 * Set the current status of a request.
64 *
65 * @param <code>p_status_code</code> Status code.
66 * @see <code>IPPDefs</code>
67 */
68 public void setStatus( short p_status_code )
69 {
70 status_code = p_status_code;
71 }
72
73 /**
74 * Set the operation status of a request.
75 *
76 * @param <code>p_status_code</code> Operation status code.
77 * @see <code>IPPDefs</code>
78 */
79 public void setOpStatus( short p_status_code )
80 {
81 op_status = p_status_code;
82 }
83
84} // End of IPPRequest class
85
86
87
88