Changeset f6e2532 for server/lib/gutenbach
- Timestamp:
- Dec 23, 2011, 1:09:01 PM (12 years ago)
- Branches:
- no-cups
- Children:
- aded2d1
- Parents:
- 94a4825
- git-author:
- Jessica B. Hamrick <jhamrick@…> (12/23/11 13:09:01)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (12/23/11 13:09:01)
- Location:
- server/lib/gutenbach
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/gutenbach/ipp/__init__.py
r5e44432 rf6e2532 1 1 from attribute import Attribute 2 2 from attributegroup import AttributeGroup 3 from constants import Tags, StatusCodes4 3 from request import Request 5 4 from value import Value 5 6 6 import constants 7 from constants import * 8 7 9 import exceptions as errors 8 10 … … 11 13 12 14 __all__ = ['Attribute', 'AttributeGroup', 'Request', 'Value', 13 'Tags', 'StatusCodes', 'ops', 'errors', 'constants'] 15 'ops', 'errors', 'constants'] 16 __all__.extend(constants.__all__) -
server/lib/gutenbach/ipp/constants.py
r94a4825 rf6e2532 1 __all__ = [ 2 'Misc', 3 'JobStates', 4 'PrinterStates', 5 'Operations', 6 'SuccessCodes', 7 'ClientErrorCodes', 8 'ServerErrorCodes', 9 'ErrorCodes', 10 'StatusCodes', 11 'CUPSPrinterType', 12 'AttributeTags', 13 'OutOfBandTags', 14 'IntegerTags', 15 'OctetStringTags', 16 'CharacterStringTags', 17 'operations_attribute_value_tags', 18 'job_attribute_value_tags', 19 'printer_attribute_value_tags', 20 ] 21 1 22 class Misc(): 2 23 """Miscellaneous config options for the IPP server. … … 311 332 MEMBER_ATTR_NAME = 0x4a 312 333 313 class Tags(AttributeTags, OutOfBandTags, IntegerTags, OctetStringTags, CharacterStringTags):314 pass315 316 334 operations_attribute_value_tags = { 317 335 'attributes-charset': CharacterStringTags.CHARSET, … … 349 367 "pdl-override-supported": CharacterStringTags.KEYWORD, 350 368 "printer-up-time": IntegerTags.INTEGER, 351 "compression-supported": CharacterStringTags.KEYWORD 369 "compression-supported": CharacterStringTags.KEYWORD, 370 "multiple-operation-time-out": IntegerTags.INTEGER, 371 "multiple-document-jobs-supported": IntegerTags.BOOLEAN 352 372 } 353 373 -
server/lib/gutenbach/server/printer.py
rcad7502 rf6e2532 32 32 "pdl-override-supported", 33 33 "printer-up-time", 34 "compression-supported" 34 "compression-supported", 35 "multiple-operation-time-out", 36 "multiple-document-jobs-supported", 35 37 ] 38 39 operations = [ 40 "print-job", 41 "complete-job", 42 "start-job", 43 "get-job", 44 "get-jobs", 45 ] 46 36 47 37 48 #def __init__(self, name, card, mixer): … … 102 113 def ipp_versions_supported(self): 103 114 return ("1.0", "1.1") 115 104 116 # XXX: We should query ourself for the supported operations 105 106 117 @property 107 118 def operations_supported(self): 108 return 0xa# get-jobs119 return ipp.Operations.GET_JOBS # get-jobs 109 120 110 121 @property … … 151 162 def compression_supported(self): 152 163 return "none" 164 165 @property 166 def multiple_operation_time_out(self): 167 return 240 168 169 @property 170 def multiple_document_jobs_supported(self): 171 return False 153 172 154 173 def get_printer_attributes(self, request): … … 159 178 160 179 ## Printer operations 161 @property162 def next_jobid(self):163 self._next_jobid += 1164 return self._next_jobid165 180 166 181 def print_job(self, job): 167 jobid = self.next_jobid 182 jobid = self._next_jobid 183 self._next_jobid += 1 168 184 self.active_jobs.append(jobid) 169 185 self.jobs[jobid] = job
Note: See TracChangeset
for help on using the changeset viewer.