vfs: check userland buffers before reading them.
[haiku.git] / headers / private / print / PrinterRoster.h
blob50a7061e01d1a78a7fa75cfed70a811cea2434e2
1 /*
2 * Copyright 2008 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Julun, <host.haiku@gmx.de
7 */
8 #ifndef _PRINTER_ROSTER_H_
9 #define _PRINTER_ROSTER_H_
12 #include <Directory.h>
13 #include <Messenger.h>
14 #include <Node.h>
15 #include <String.h>
18 namespace BPrivate {
19 namespace Print {
22 class BPrinter;
25 class BPrinterRoster {
26 public:
27 BPrinterRoster();
28 ~BPrinterRoster();
30 int32 CountPrinters();
32 status_t GetNextPrinter(BPrinter* printer);
33 status_t GetDefaultPrinter(BPrinter* printer);
34 status_t FindPrinter(const BString& name, BPrinter* printer);
36 status_t Rewind();
38 status_t StartWatching(const BMessenger& listener);
39 void StopWatching();
41 private:
42 BPrinterRoster(const BPrinterRoster& printerRoster);
43 BPrinterRoster& operator=(const BPrinterRoster& printerRoster);
45 private:
46 BMessenger* fListener;
48 node_ref fUserPrintersNodRef;
49 BDirectory fUserPrintersDirectory;
53 } // namespace Print
54 } // namespace BPrivate
57 #endif // _PRINTER_ROSTER_H_