[5e44432] | 1 | from . import verify_operations |
---|
| 2 | from . import make_empty_response |
---|
| 3 | |
---|
| 4 | import logging |
---|
| 5 | logger = logging.getLogger(__name__) |
---|
| 6 | |
---|
| 7 | def verify_cups_get_classes_request(request): |
---|
| 8 | """CUPS-Get-Classes Request |
---|
| 9 | |
---|
| 10 | The following groups of attributes are supplied as part of the |
---|
| 11 | CUPS-Get-Classes request: |
---|
| 12 | |
---|
| 13 | Group 1: Operation Attributes |
---|
| 14 | Natural Language and Character Set: |
---|
| 15 | The 'attributes-charset' and |
---|
| 16 | 'attributes-natural-language' attributes as described |
---|
| 17 | in section 3.1.4.1 of the IPP Model and Semantics |
---|
| 18 | document. |
---|
| 19 | 'first-printer-name' (name(127)):CUPS 1.2/Mac OS X 10.5 |
---|
| 20 | The client OPTIONALLY supplies this attribute to |
---|
| 21 | select the first printer that is returned. |
---|
| 22 | 'limit' (integer (1:MAX)): |
---|
| 23 | The client OPTIONALLY supplies this attribute limiting |
---|
| 24 | the number of printer classes that are returned. |
---|
| 25 | 'printer-location' (text(127)): CUPS 1.1.7 |
---|
| 26 | The client OPTIONALLY supplies this attribute to |
---|
| 27 | select which printer classes are returned. |
---|
| 28 | 'printer-type' (type2 enum): CUPS 1.1.7 |
---|
| 29 | The client OPTIONALLY supplies a printer type |
---|
| 30 | enumeration to select which printer classes are |
---|
| 31 | returned. |
---|
| 32 | 'printer-type-mask' (type2 enum): CUPS 1.1.7 |
---|
| 33 | The client OPTIONALLY supplies a printer type mask |
---|
| 34 | enumeration to select which bits are used in the |
---|
| 35 | 'printer-type' attribute. |
---|
| 36 | 'requested-attributes' (1setOf keyword) : |
---|
| 37 | The client OPTIONALLY supplies a set of attribute |
---|
| 38 | names and/or attribute group names in whose values the |
---|
| 39 | requester is interested. If the client omits this |
---|
| 40 | attribute, the server responds as if this attribute |
---|
| 41 | had been supplied with a value of 'all'. |
---|
| 42 | 'requested-user-name' (name(127)) : CUPS 1.2/Mac OS X 10.5 |
---|
| 43 | The client OPTIONALLY supplies a user name that is |
---|
| 44 | used to filter the returned printers. |
---|
| 45 | |
---|
| 46 | (Source: http://www.cups.org/documentation.php/spec-ipp.html#CUPS_GET_CLASSES ) |
---|
| 47 | |
---|
| 48 | """ |
---|
| 49 | |
---|
| 50 | # XXX: actually do something here |
---|
| 51 | return {} |
---|
| 52 | |
---|
| 53 | def make_cups_get_classes_response(request): |
---|
| 54 | """CUPS-Get-Classes Response |
---|
| 55 | |
---|
| 56 | The following groups of attributes are send as part of the |
---|
| 57 | CUPS-Get-Classes Response: |
---|
| 58 | |
---|
| 59 | Group 1: Operation Attributes |
---|
| 60 | Status Message: |
---|
| 61 | The standard response status message. |
---|
| 62 | Natural Language and Character Set: |
---|
| 63 | The 'attributes-charset' and |
---|
| 64 | 'attributes-natural-language' attributes as described |
---|
| 65 | in section 3.1.4.2 of the IPP Model and Semantics |
---|
| 66 | document. |
---|
| 67 | |
---|
| 68 | Group 2: Printer Class Object Attributes |
---|
| 69 | The set of requested attributes and their current values |
---|
| 70 | for each printer class. |
---|
| 71 | |
---|
| 72 | (Source: http://www.cups.org/documentation.php/spec-ipp.html#CUPS_GET_CLASSES ) |
---|
| 73 | |
---|
| 74 | """ |
---|
| 75 | |
---|
| 76 | response = make_empty_response(request) |
---|
| 77 | return response |
---|