1 /* 2 * Copyright 2003-2008, Haiku. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Michael Pfeiffer 7 */ 8 9 #include "PreviewDriver.h" 10 #include "Preview.h" 11 12 13 #define PREVIEW_DRIVER_DEBUG 0 14 15 PreviewDriver(BNode * spoolDir)16PreviewDriver::PreviewDriver(BNode* spoolDir) 17 : PrinterDriver(spoolDir) 18 { 19 }; 20 21 ~PreviewDriver()22PreviewDriver::~PreviewDriver() 23 { 24 } 25 26 27 status_t PrintJob(BFile * jobFile,BMessage * jobMsg)28PreviewDriver::PrintJob(BFile *jobFile, BMessage *jobMsg) 29 { 30 #if PREVIEW_DRIVER_DEBUG 31 return PrinterDriver::PrintJob(jobFile, jobMsg); 32 #else 33 PreviewWindow* w = new PreviewWindow(jobFile); 34 return w->Go(); 35 #endif 36 } 37 38 39 PrinterDriver* instanciate_driver(BNode * spoolDir)40instanciate_driver(BNode *spoolDir) 41 { 42 return new PreviewDriver(spoolDir); 43 } 44