Ignore:
Timestamp:
Dec 23, 2011, 1:09:01 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
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)
Message:

Constants; small changes in printer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/gutenbach/server/printer.py

    rcad7502 rf6e2532  
    3232        "pdl-override-supported",
    3333        "printer-up-time",
    34         "compression-supported"
     34        "compression-supported",
     35        "multiple-operation-time-out",
     36        "multiple-document-jobs-supported",
    3537    ]
     38
     39    operations = [
     40        "print-job",
     41        "complete-job",
     42        "start-job",
     43        "get-job",
     44        "get-jobs",
     45    ]
     46       
    3647
    3748    #def __init__(self, name, card, mixer):
     
    102113    def ipp_versions_supported(self):
    103114        return ("1.0", "1.1")
     115
    104116    # XXX: We should query ourself for the supported operations
    105 
    106117    @property
    107118    def operations_supported(self):
    108         return 0xa # get-jobs
     119        return ipp.Operations.GET_JOBS # get-jobs
    109120
    110121    @property
     
    151162    def compression_supported(self):
    152163        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
    153172
    154173    def get_printer_attributes(self, request):
     
    159178
    160179    ## Printer operations
    161     @property
    162     def next_jobid(self):
    163         self._next_jobid += 1
    164         return self._next_jobid
    165180
    166181    def print_job(self, job):
    167         jobid = self.next_jobid
     182        jobid = self._next_jobid
     183        self._next_jobid += 1
    168184        self.active_jobs.append(jobid)
    169185        self.jobs[jobid] = job
Note: See TracChangeset for help on using the changeset viewer.