]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/ipp-private.h
2 * "$Id: ipp-private.h 7259 2008-01-28 22:26:04Z mike $"
4 * Private IPP definitions for CUPS.
6 * Copyright 2007-2011 by Apple Inc.
7 * Copyright 1997-2006 by Easy Software Products.
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
15 * This file is subject to the Apple OS-Developed Software exception.
18 #ifndef _CUPS_IPP_PRIVATE_H_
19 # define _CUPS_IPP_PRIVATE_H_
22 * Include necessary headers...
25 # include <cups/ipp.h>
34 # endif /* __cplusplus */
41 # define IPP_BUF_SIZE (IPP_MAX_LENGTH + 2)
49 typedef union _ipp_request_u
/**** Request Header ****/
51 struct /* Any Header */
53 ipp_uchar_t version
[2]; /* Protocol version number */
54 int op_status
; /* Operation ID or status code*/
55 int request_id
; /* Request ID */
58 struct /* Operation Header */
60 ipp_uchar_t version
[2]; /* Protocol version number */
61 ipp_op_t operation_id
; /* Operation ID */
62 int request_id
; /* Request ID */
65 struct /* Status Header */
67 ipp_uchar_t version
[2]; /* Protocol version number */
68 ipp_status_t status_code
; /* Status code */
69 int request_id
; /* Request ID */
72 /**** New in CUPS 1.1.19 ****/
73 struct /* Event Header @since CUPS 1.1.19/Mac OS X 10.3@ */
75 ipp_uchar_t version
[2]; /* Protocol version number */
76 ipp_status_t status_code
; /* Status code */
77 int request_id
; /* Request ID */
81 /**** New in CUPS 1.1.19 ****/
83 typedef union _ipp_value_u
/**** Attribute Value ****/
85 int integer
; /* Integer/enumerated value */
87 char boolean
; /* Boolean value */
89 ipp_uchar_t date
[11]; /* Date/time value */
93 int xres
, /* Horizontal resolution */
94 yres
; /* Vertical resolution */
95 ipp_res_t units
; /* Resolution units */
96 } resolution
; /* Resolution value */
100 int lower
, /* Lower value */
101 upper
; /* Upper value */
102 } range
; /* Range of integers value */
106 char *language
; /* Language code */
107 char *text
; /* String */
108 } string
; /* String with language value */
112 int length
; /* Length of attribute */
113 void *data
; /* Data in attribute */
114 } unknown
; /* Unknown attribute type */
116 /**** New in CUPS 1.1.19 ****/
117 ipp_t
*collection
; /* Collection value @since CUPS 1.1.19/Mac OS X 10.3@ */
120 struct _ipp_attribute_s
/**** Attribute ****/
122 ipp_attribute_t
*next
; /* Next attribute in list */
123 ipp_tag_t group_tag
, /* Job/Printer/Operation group tag */
124 value_tag
; /* What type of value is it? */
125 char *name
; /* Name of attribute */
126 int num_values
; /* Number of values */
127 _ipp_value_t values
[1]; /* Values */
130 struct _ipp_s
/**** IPP Request/Response/Notification ****/
132 ipp_state_t state
; /* State of request */
133 _ipp_request_t request
; /* Request header */
134 ipp_attribute_t
*attrs
; /* Attributes */
135 ipp_attribute_t
*last
; /* Last attribute in list */
136 ipp_attribute_t
*current
; /* Current attribute (for read/write) */
137 ipp_tag_t curtag
; /* Current attribute group tag */
139 /**** New in CUPS 1.2 ****/
140 ipp_attribute_t
*prev
; /* Previous attribute (for read) @since CUPS 1.2/Mac OS X 10.5@ */
142 /**** New in CUPS 1.4.4 ****/
143 int use
; /* Use count @since CUPS 1.4.4/Mac OS X 10.6.?@ */
146 typedef struct _ipp_buffer_s
/**** Read/write buffer ****/
148 unsigned char d
[IPP_BUF_SIZE
];/* Data buffer */
149 struct _ipp_buffer_s
*next
; /* Next buffer in list */
150 int used
; /* Is this buffer used? */
153 typedef struct /**** Attribute mapping data ****/
155 int multivalue
; /* Option has multiple values? */
156 const char *name
; /* Option/attribute name */
157 ipp_tag_t value_tag
; /* Value tag for this attribute */
158 ipp_tag_t group_tag
; /* Group tag for this attribute */
163 * Prototypes for private functions...
166 extern _ipp_option_t
*_ippFindOption(const char *name
);
175 # endif /* __cplusplus */
176 #endif /* !_CUPS_IPP_H_ */
179 * End of "$Id: ipp-private.h 7259 2008-01-28 22:26:04Z mike $".