• Aucun résultat trouvé

3. IPP Operations

3.2 Printer Operations

3.2.5 Get-Printer-Attributes Operation

This REQUIRED operation allows a client to request the values of the attributes of a Printer object. In the request, the client supplies the set of Printer attribute names and/or attribute group names in which the requester is interested. In the response, the Printer object returns a corresponding attribute set with the appropriate attribute values filled in.

For Printer objects, the possible names of attribute groups are:

- ’job-template’: all of the Job Template attributes that apply to a Printer object (the last two columns of the table in Section 4.2).

- ’printer-description’: the attributes specified in Section 4.4.

- ’all’: the special group ’all’ that includes all supported attributes.

Since a client MAY request specific attributes or named groups, there is a potential that there is some overlap. For example, if a client requests, ’printer-name’ and ’all’, the client is actually requesting the "printer-name" attribute twice: once by naming it explicitly, and once by inclusion in the ’all’ group. In such cases, the Printer object NEED NOT return each attribute only once in the response even if it is requested multiple times. The client SHOULD NOT request the same attribute in multiple ways.

It is NOT REQUIRED that a Printer object support all attributes belonging to a group (since some attributes are OPTIONAL). However, it is REQUIRED that each Printer object support all group names.

3.2.5.1 Get-Printer-Attributes Request

The following sets of attributes are part of the Attributes Request:

Group 1: Operation Attributes

Natural Language and Character Set:

attributes-charset" and "attributes-natural-language" butes as described in section 3.1.4.1.

Target:

The "printer-uri" (uri) operation attribute which is the target for this operation as described in section 3.1.5.

Requesting User Name:

The "requesting-user-name" (name(MAX)) attribute SHOULD be supplied by the client as described in section 8.3.

"requested-attributes" (1setOf keyword) :

The client OPTIONALLY supplies a set of attribute names and/or attribute group names in whose values the requester is

interested. The Printer object MUST support this attribute. If the client omits this attribute, the Printer MUST respond as if this attribute had been supplied with a value of ’all’.

"document-format" (mimeMediaType) :

The client OPTIONALLY supplies this attribute. The Printer object MUST support this attribute. This attribute is useful for a Printer object to determine the set of supported attribute values that relate to the requested document format. The

Printer object MUST return the attributes and values that it uses to validate a job on a create or Validate-Job operation in which this document format is supplied. The Printer object SHOULD return only (1) those attributes that are supported for the specified format and (2) the attribute values that are supported for the specified document format. By specifying the document format, the client can get the Printer object to

eliminate the attributes and values that are not supported for a specific document format. For example, a Printer object might have multiple interpreters to support both ’

application/postscript’ (for PostScript) and ’text/plain’ (for text) documents. However, for only one of those interpreters might the Printer object be able to support "number-up" with values of ’1’, ’2’, and ’4’. For the other interpreter it might be able to only support "number-up" with a value of ’1’. Thus a

client can use the Get-Printer-Attributes operation to obtain the attributes and values that will be used to accept/reject a create job operation.

If the Printer object does not distinguish between different sets of supported values for each different document format when validating jobs in the create and Validate-Job operations, it MUST NOT distinguish between different document formats in the Get-Printer-Attributes operation. If the Printer object does distinguish between different sets of supported values for each different document format specified by the client, this

specialization applies only to the following Printer object attributes:

- Printer attributes that are Job Template attributes default" "xxx-supported", and "xxx-ready" in the Table in Section 4.2),

- "pdl-override-supported", - "compression-supported", - "job-k-octets-supported", - "job-impressions-supported, - "job-media-sheets-supported"

- "printer-driver-installer", - "color-supported", and

- "reference-uri-schemes-supported"

The values of all other Printer object attributes (including "document-format-supported") remain invariant with respect to the client supplied document format (except for new Printer description attribute as registered according to section 6.2).

If the client omits this "document-format" operation attribute, the Printer object MUST respond as if the attribute had been supplied with the value of the Printer object’s format-default" attribute. It is recommended that the client always supply a value for "document-format", since the Printer object’s "document-format-default" may be stream’, in which case the returned attributes and values are for the union of the document formats that the Printer can automatically sense. For more details, see the description of the ’mimeMediaType’ attribute syntax in section 4.1.9.

If the client supplies a value for the "document-format"

Operation attribute that is not supported by the Printer, i.e., is not among the values of the Printer object’s format-supported" attribute, the Printer object MUST reject the operation and return the supported’ status code.

3.2.5.2 Get-Printer-Attributes Response

The Printer object returns the following sets of attributes as part of the Get-Printer-Attributes Response:

Group 1: Operation Attributes Status Message:

In addition to the REQUIRED status code returned in every response, the response OPTIONALLY includes a "status-message"

(text) operation attribute as described in section 3.1.6.

Natural Language and Character Set:

The "attributes-charset" and "attributes-natural-language"

attributes as described in section 3.1.4.2.

Group 2: Unsupported Attributes

This is a set of Operation attributes supplied by the client (in the request) that are not supported by the Printer object or that conflict with one another (see sections 3.2.1.2 and 16).

The response NEED NOT contain the "requested-attributes"

operation attribute with any supplied values (attribute keywords) that were requested by the client but are not supported by the IPP object. If the Printer object is not returning any Unsupported Attributes in the response, the

Printer object SHOULD omit Group 2 rather than sending an empty group. However, a client MUST be able to accept an empty group.

Group 3: Printer Object Attributes

This is the set of requested attributes and their current

values. The Printer object ignores (does not respond with) any requested attribute which is not supported. The Printer object MAY respond with a subset of the supported attributes and

values, depending on the security policy in force. However, the Printer object MUST respond with the ’unknown’ value for any supported attribute (including all REQUIRED attributes) for which the Printer object does not know the value. Also the Printer object MUST respond with the ’no-value’ for any supported attribute (including all REQUIRED attributes) for which the system administrator has not configured a value. See the description of the "out-of-band" values in the beginning of Section 4.1.