btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / print / PrintTransport.h
blobe81c36d684eccc43fdd6aceaf780bd55fcc642d8
1 /*
3 PrintTransport
5 Copyright (c) 2004 OpenBeOS.
7 Authors:
8 Michael Pfeiffer
9 Philippe Houdoin
11 Permission is hereby granted, free of charge, to any person obtaining a copy of
12 this software and associated documentation files (the "Software"), to deal in
13 the Software without restriction, including without limitation the rights to
14 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
15 of the Software, and to permit persons to whom the Software is furnished to do
16 so, subject to the following conditions:
18 The above copyright notice and this permission notice shall be included in all
19 copies or substantial portions of the Software.
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 THE SOFTWARE.
31 #ifndef _PRINT_TRANSPORT_H
32 #define _PRINT_TRANSPORT_H
34 #include <image.h>
35 #include <DataIO.h>
36 #include <Node.h>
37 #include <Message.h>
39 // The class PrintTransport is intended to be used by
40 // a printer driver.
41 class PrintTransport
43 public:
44 PrintTransport();
45 ~PrintTransport();
47 // opens the transport add-on associated with the printerFolder
48 status_t Open(BNode* printerFolder);
49 // returns the output stream created by the transport add-on
50 BDataIO* GetDataIO();
51 // returns false if the user has canceled the save to file dialog
52 // of the "Print To File" transport add-on.
53 bool IsPrintToFileCanceled() const;
55 private:
56 BDataIO* fDataIO;
57 image_id fAddOnID;
58 void (*fExitProc)(void);
61 #endif // PRINT_TRANSPORT_H