]> git.ipfire.org Git - thirdparty/cups.git/blob - scripting/java/src/com/easysw/cups/IPPRequest.java
a0de169dc57e09e26ce25b8c17c4fb978abf5f14
[thirdparty/cups.git] / scripting / java / src / com / easysw / cups / IPPRequest.java
1 package com.easysw.cups;
2
3 /**
4 * @version 1.00 06-NOV-2002
5 * @author Easy Software Products
6 *
7 * Internet Printing Protocol definitions for the Common UNIX Printing
8 * System (CUPS).
9 *
10 * Copyright 1997-2002 by Easy Software Products.
11 *
12 * These coded instructions, statements, and computer programs are the
13 * property of Easy Software Products and are protected by Federal
14 * copyright law. Distribution and use rights are outlined in the file
15 * "LICENSE.txt" which should have been included with this file. If this
16 * file is missing or damaged please contact Easy Software Products
17 * at:
18 *
19 * Attn: CUPS Licensing Information
20 * Easy Software Products
21 * 44141 Airport View Drive, Suite 204
22 * Hollywood, Maryland 20636-3111 USA
23 *
24 * Voice: (301) 373-9603
25 * EMail: cups-info@cups.org
26 * WWW: http://www.cups.org
27 */
28
29 /**
30 * An <code>IPPRequest</code> object is used to hold the
31 * status and id's of a request.
32 *
33 * @author TDB
34 * @version 1.0
35 * @since JDK1.3
36 */
37 public class IPPRequest
38 {
39 char[] version; // Proto version number
40 int request_id; // Unique ID
41
42 int op_status;
43 short operation_id;
44 short status_code;
45
46 /**
47 * Constructor
48 */
49 public IPPRequest()
50 {
51 version = new char[2];
52 }
53
54 /**
55 * Constructor using request id and operation id.
56 *
57 * @param <code>p_request_id</code> ID of request.
58 * @param <code>p_operation_id</code> Operation ID for request.
59 *
60 * @see <code>IPPDefs</code>
61 */
62 public IPPRequest( int p_request_id, short p_operation_id )
63 {
64 version = new char[2];
65 version[0] = (char)1;
66 version[1] = (char)1;
67 request_id = p_request_id;
68 operation_id = p_operation_id;
69 }
70
71 /**
72 * Set the current status of a request.
73 *
74 * @param <code>p_status_code</code> Status code.
75 * @see <code>IPPDefs</code>
76 */
77 public void setStatus( short p_status_code )
78 {
79 status_code = p_status_code;
80 }
81
82 /**
83 * Set the operation status of a request.
84 *
85 * @param <code>p_status_code</code> Operation status code.
86 * @see <code>IPPDefs</code>
87 */
88 public void setOpStatus( short p_status_code )
89 {
90 op_status = p_status_code;
91 }
92
93 } // End of IPPRequest class
94
95
96
97