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 21 virtual void Load(); 22 virtual void Save(); 23 24 const string& GetDriverName() const; 25 const string& GetPrinterName() const; 26 const string& GetComments() const; 27 const string& GetTransport() const; 28 int GetProtocolClass() const; 29 30 void SetPrinterName(const char* printerName); 31 void SetComments(const char* comments); 32 void SetProtocolClass(int protocolClass); 33 34 bool GetPath(string& path) const; 35 36 protected: 37 PrinterData(const PrinterData &printer_data); 38 39 PrinterData& operator=(const PrinterData &printer_data); 40 41 BNode* fNode; 42 43 private: 44 string fDriverName; 45 string fPrinterName; 46 string fComments; 47 string fTransport; 48 int fProtocolClass; 49 }; 50 51 52 inline const string& 53 PrinterData::GetDriverName() const 54 { 55 return fDriverName; 56 } 57 58 59 inline const string& 60 PrinterData::GetPrinterName() const 61 { 62 return fPrinterName; 63 } 64 65 66 inline const string& 67 PrinterData::GetComments() const 68 { 69 return fComments; 70 } 71 72 73 inline const string& 74 PrinterData::GetTransport() const 75 { 76 return fTransport; 77 } 78 79 80 inline int 81 PrinterData::GetProtocolClass() const 82 { 83 return fProtocolClass; 84 } 85 86 87 inline void 88 PrinterData::SetPrinterName(const char* printerName) 89 { 90 fPrinterName = printerName; 91 } 92 93 94 inline void 95 PrinterData::SetComments(const char* comments) 96 { 97 fComments = comments; 98 } 99 100 101 inline void 102 PrinterData::SetProtocolClass(int protocolClass) 103 { 104 fProtocolClass = protocolClass; 105 } 106 107 #endif // __PRINTERDATA_H 108