1 /* 2 * Copyright 2001-2010, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Michael Pfeiffer 7 */ 8 9 10 #include "SpoolFolder.h" 11 12 #include "Jobs.h" 13 #include "PrintersWindow.h" 14 //#include "pr_server.h" 15 16 17 SpoolFolder::SpoolFolder(PrintersWindow* window, PrinterItem* item, 18 const BDirectory& spoolDir) 19 : 20 Folder(NULL, window, spoolDir), 21 fWindow(window), 22 fItem(item) 23 { 24 } 25 26 27 void 28 SpoolFolder::Notify(Job* job, int kind) 29 { 30 switch (kind) { 31 case kJobAdded: 32 fWindow->AddJob(this, job); 33 break; 34 case kJobRemoved: 35 fWindow->RemoveJob(this, job); 36 break; 37 case kJobAttrChanged: 38 fWindow->UpdateJob(this, job); 39 break; 40 default: 41 break; 42 } 43 } 44