1 /* 2 * Copyright 2008 Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Julun, <host.haiku@gmx.de 7 */ 8 #ifndef _PRINTER_ROSTER_H_ 9 #define _PRINTER_ROSTER_H_ 10 11 12 #include <Directory.h> 13 #include <Messenger.h> 14 #include <Node.h> 15 #include <String.h> 16 17 18 namespace BPrivate { 19 namespace Print { 20 21 22 class BPrinter; 23 24 25 class BPrinterRoster { 26 public: 27 BPrinterRoster(); 28 ~BPrinterRoster(); 29 30 int32 CountPrinters(); 31 32 status_t GetNextPrinter(BPrinter* printer); 33 status_t GetDefaultPrinter(BPrinter* printer); 34 status_t FindPrinter(const BString& name, BPrinter* printer); 35 36 status_t Rewind(); 37 38 status_t StartWatching(const BMessenger& listener); 39 void StopWatching(); 40 41 private: 42 BPrinterRoster(const BPrinterRoster& printerRoster); 43 BPrinterRoster& operator=(const BPrinterRoster& printerRoster); 44 45 private: 46 BMessenger* fListener; 47 48 node_ref fUserPrintersNodRef; 49 BDirectory fUserPrintersDirectory; 50 }; 51 52 53 } // namespace Print 54 } // namespace BPrivate 55 56 57 #endif // _PRINTER_ROSTER_H_ 58