1 /* 2 * PrinterData.h 3 * Copyright 1999-2000 Y.Takagi All Rights Reserved. 4 */ 5 6 #ifndef __PRINTERDATA_H 7 #define __PRINTERDATA_H 8 9 #include <string> 10 #include <SerialPort.h> 11 12 using namespace std; 13 14 class BNode; 15 16 class PrinterData { 17 public: 18 PrinterData(BNode *node = NULL); 19 virtual ~PrinterData(); 20 virtual void load(); 21 virtual void save(); 22 23 const string &getDriverName() const; 24 const string &getPrinterName() const; 25 const string &getComments() const; 26 const string &getTransport() const; 27 int getProtocolClass() const; 28 29 void setPrinterName(const char *printer_name); 30 void setComments(const char *comments); 31 void setProtocolClass(int protocolClass); 32 33 bool getPath(string &path) const; 34 35 protected: 36 PrinterData(const PrinterData &printer_data); 37 PrinterData &operator = (const PrinterData &printer_data); 38 39 BNode *fNode; 40 private: 41 string fDriverName; 42 string fPrinterName; 43 string fComments; 44 string fTransport; 45 int fProtocolClass; 46 }; 47 48 inline const string &PrinterData::getDriverName() const 49 { 50 return fDriverName; 51 } 52 53 inline const string &PrinterData::getPrinterName() const 54 { 55 return fPrinterName; 56 } 57 58 inline const string &PrinterData::getComments() const 59 { 60 return fComments; 61 } 62 63 inline const string &PrinterData::getTransport() const 64 { 65 return fTransport; 66 } 67 68 inline int PrinterData::getProtocolClass() const 69 { 70 return fProtocolClass; 71 } 72 73 inline void PrinterData::setPrinterName(const char *printer_name) 74 { 75 fPrinterName = printer_name; 76 } 77 78 inline void PrinterData::setComments(const char *comments) 79 { 80 fComments = comments; 81 } 82 83 inline void PrinterData::setProtocolClass(int protocolClass) 84 { 85 fProtocolClass = protocolClass; 86 } 87 88 #endif // __PRINTERDATA_H 89