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