~ubuntu-branches/ubuntu/raring/hplip/raring

« back to all changes in this revision

Viewing changes to prnt/hpijs/job.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-12-14 20:08:44 UTC
  • mfrom: (2.1.118 lucid)
  • Revision ID: james.westby@ubuntu.com-20091214200844-z8qhqwgppbu3t7ze
Tags: 3.9.10-4
KBSD patch from KiBi (Closes: #560796)

Show diffs side-by-side

added added

removed removed

Lines of Context:
544
544
    return NO_ERROR;
545
545
} //newpage
546
546
 
 
547
/*!
 
548
This method forces the associated printer to flush the remaining buffered
 
549
data and tells it that the job is ended.
 
550
 
 
551
Calling this method is not mandatory, since the object destructor already
 
552
performs this action. It may be required, however, if the destructor is not
 
553
called for some reason (for instance, when the call depends on the execution
 
554
of a "finalize" method of a Java wrapper.
 
555
*/
 
556
 
 
557
DRIVER_ERROR Job::Flush()
 
558
{
 
559
    if(thePrinter)
 
560
    {
 
561
        BYTE temp = 0;
 
562
        thePrinter->EndJob = TRUE;  // the Job is done -
 
563
        return thePrinter->Send(&temp,0);  // call Send to dump any buffered data
 
564
    }//end if
 
565
    return NO_PRINTER_SELECTED;
 
566
}
547
567
 
548
568
/*!
549
569
Resets counters, flushes buffers, and sends a form feed to the printer.