source: server/lib/gutenbach/ipp/operations/cups_get_default.py @ 5e44432

no-cups
Last change on this file since 5e44432 was 5e44432, checked in by Jessica B. Hamrick <jhamrick@…>, 12 years ago

Move operations into separate files since the functions are so bulky

  • Property mode set to 100644
File size: 1.9 KB
Line 
1from . import verify_operations
2from . import make_empty_response
3from . import make_printer_attributes
4
5import logging
6logger = logging.getLogger(__name__)
7
8def verify_cups_get_default_request(request):
9    """CUPS-Get-Default Request
10   
11    The following groups of attributes are supplied as part of the
12    CUPS-Get-Default request:
13
14    Group 1: Operation Attributes
15        Natural Language and Character Set:
16            The 'attributes-charset' and
17            'attributes-natural-language' attributes as described
18            in section 3.1.4.1 of the IPP Model and Semantics
19            document.
20        'requested-attributes' (1setOf keyword):
21            The client OPTIONALLY supplies a set of attribute
22            names and/or attribute group names in whose values the
23            requester is interested. If the client omits this
24            attribute, the server responds as if this attribute
25            had been supplied with a value of 'all'.
26
27    (Source: http://www.cups.org/documentation.php/spec-ipp.html#CUPS_GET_DEFAULT )
28
29    """
30
31    return {}
32
33def make_cups_get_default_response(attrs, request):
34    """CUPS-Get-Default Response
35
36    The following groups of attributes are send as part of the
37    CUPS-Get-Default Response:
38
39    Group 1: Operation Attributes
40        Status Message:
41            The standard response status message.
42        Natural Language and Character Set:
43            The 'attributes-charset' and
44            'attributes-natural-language' attributes as described
45            in section 3.1.4.2 of the IPP Model and Semantics
46            document.
47
48    Group 2: Printer Object Attributes
49        The set of requested attributes and their current values.
50
51    (Source: http://www.cups.org/documentation.php/spec-ipp.html#CUPS_GET_DEFAULT )
52
53    """
54
55    response = make_empty_response(request)
56    make_printer_attributes(attrs, request, response)
57    return response
Note: See TracBrowser for help on using the repository browser.