xref: /haiku/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.h (revision 21258e2674226d6aa732321b6f8494841895af5f)
1 /*
2  * Copyright 2001-2010, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *      Philippe Houdoin
7  */
8 #ifndef HP_JETDIRECT_TRANSPORT_H
9 #define HP_JETDIRECT_TRANSPORT_H
10 
11 #include <DataIO.h>
12 #include <String.h>
13 
14 class BDirectory;
15 class BMessage;
16 class BNetEndpoint;
17 
18 class HPJetDirectPort : public BDataIO {
19 public:
20 							HPJetDirectPort(BDirectory* printer, BMessage* msg);
21 							~HPJetDirectPort();
22 
23 		status_t 			InitCheck() { return fReady; }
24 
25 		ssize_t 			Read(void* buffer, size_t size);
26 		ssize_t 			Write(const void* buffer, size_t size);
27 
28 private:
29 		BString fHost;
30 		uint16 fPort;		// default is 9100
31 		BNetEndpoint *fEndpoint;
32 		status_t fReady;
33 };
34 
35 #endif
36