forked from haiku/haiku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Printer.h
executable file
·83 lines (64 loc) · 1.97 KB
/
Printer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
* Copyright 2008 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Julun, <[email protected]
*/
#ifndef _PRINTER_H_
#define _PRINTER_H_
#include <Directory.h>
#include <Entry.h>
#include <image.h>
#include <Message.h>
#include <Node.h>
#include <Path.h>
#include <String.h>
namespace BPrivate {
namespace Print {
class BPrinter {
public:
BPrinter();
BPrinter(const BEntry& entry);
BPrinter(const BPrinter& printer);
BPrinter(const node_ref& nodeRef);
BPrinter(const entry_ref& entryRef);
BPrinter(const BDirectory& directory);
~BPrinter();
status_t SetTo(const BEntry& entry);
status_t SetTo(const node_ref& nodeRef);
status_t SetTo(const entry_ref& entryRef);
status_t SetTo(const BDirectory& directory);
void Unset();
bool IsValid() const;
status_t InitCheck() const;
bool IsFree() const;
bool IsDefault() const;
bool IsShareable() const;
BString Name() const;
BString State() const;
BString Driver() const;
BString Comments() const;
BString Transport() const;
BString TransportAddress() const;
status_t DefaultSettings(BMessage& settings);
status_t StartWatching(const BMessenger& listener);
void StopWatching();
BPrinter& operator=(const BPrinter& printer);
bool operator==(const BPrinter& printer) const;
bool operator!=(const BPrinter& printer) const;
private:
status_t _Configure() const;
status_t _ConfigureJob(BMessage& settings);
status_t _ConfigurePage(BMessage& settings);
BPath _DriverPath() const;
image_id _LoadDriver() const;
void _AddPrinterName(BMessage& settings);
BString _ReadAttribute(const char* attribute) const;
private:
BMessenger* fListener;
entry_ref fPrinterEntryRef;
};
} // namespace Print
} // namespace BPrivate
#endif // _PRINTER_H_