1 // Sun, 18 Jun 2000 2 // Y.Takagi 3 4 #ifndef __IppTransport_H 5 #define __IppTransport_H 6 7 #include <DataIO.h> 8 #include <Message.h> 9 #include <fstream> 10 #include <string> 11 12 #if (!__MWERKS__) 13 using namespace std; 14 #else 15 #define std 16 #endif 17 18 class IppTransport : public BDataIO { 19 public: 20 IppTransport(BMessage *msg); 21 virtual ~IppTransport(); 22 virtual ssize_t Read(void *buffer, size_t size); 23 virtual ssize_t Write(const void *buffer, size_t size); 24 25 bool operator !() const; 26 bool fail() const; 27 28 private: 29 char __url[256]; 30 char __user[256]; 31 char __file[256]; 32 int32 __jobid; 33 bool __error; 34 fstream __fs; 35 }; 36 fail()37inline bool IppTransport::fail() const 38 { 39 return __error; 40 } 41 42 inline bool IppTransport::operator !() const 43 { 44 return fail(); 45 } 46 47 #endif // __IppTransport_H 48