112fd6cc2SKarsten Heimrich /* 212fd6cc2SKarsten Heimrich * PrinterData.h 312fd6cc2SKarsten Heimrich * Copyright 1999-2000 Y.Takagi All Rights Reserved. 412fd6cc2SKarsten Heimrich */ 512fd6cc2SKarsten Heimrich 612fd6cc2SKarsten Heimrich #ifndef __PRINTERDATA_H 712fd6cc2SKarsten Heimrich #define __PRINTERDATA_H 812fd6cc2SKarsten Heimrich 912fd6cc2SKarsten Heimrich #include <string> 1012fd6cc2SKarsten Heimrich #include <SerialPort.h> 1112fd6cc2SKarsten Heimrich 1212fd6cc2SKarsten Heimrich using namespace std; 1312fd6cc2SKarsten Heimrich 1412fd6cc2SKarsten Heimrich class BNode; 1512fd6cc2SKarsten Heimrich 1612fd6cc2SKarsten Heimrich class PrinterData { 1712fd6cc2SKarsten Heimrich public: 1812fd6cc2SKarsten Heimrich PrinterData(BNode* node = NULL); 19f7b0c08cSIthamar R. Adema virtual ~PrinterData(); 2012fd6cc2SKarsten Heimrich 21*4a0c1e13SMichael Pfeiffer virtual void Load(); 22*4a0c1e13SMichael Pfeiffer virtual void Save(); 2312fd6cc2SKarsten Heimrich 24*4a0c1e13SMichael Pfeiffer const string& GetDriverName() const; 25*4a0c1e13SMichael Pfeiffer const string& GetPrinterName() const; 26*4a0c1e13SMichael Pfeiffer const string& GetComments() const; 27*4a0c1e13SMichael Pfeiffer const string& GetTransport() const; 28*4a0c1e13SMichael Pfeiffer int GetProtocolClass() const; 2912fd6cc2SKarsten Heimrich 30*4a0c1e13SMichael Pfeiffer void SetPrinterName(const char* printerName); 31*4a0c1e13SMichael Pfeiffer void SetComments(const char* comments); 32*4a0c1e13SMichael Pfeiffer void SetProtocolClass(int protocolClass); 33*4a0c1e13SMichael Pfeiffer 34*4a0c1e13SMichael Pfeiffer bool GetPath(string& path) const; 3512fd6cc2SKarsten Heimrich 3612fd6cc2SKarsten Heimrich protected: 3712fd6cc2SKarsten Heimrich PrinterData(const PrinterData &printer_data); 38*4a0c1e13SMichael Pfeiffer 3912fd6cc2SKarsten Heimrich PrinterData& operator=(const PrinterData &printer_data); 4012fd6cc2SKarsten Heimrich 41f7b0c08cSIthamar R. Adema BNode* fNode; 42*4a0c1e13SMichael Pfeiffer 4312fd6cc2SKarsten Heimrich private: 4412fd6cc2SKarsten Heimrich string fDriverName; 4512fd6cc2SKarsten Heimrich string fPrinterName; 4612fd6cc2SKarsten Heimrich string fComments; 4712fd6cc2SKarsten Heimrich string fTransport; 4812fd6cc2SKarsten Heimrich int fProtocolClass; 4912fd6cc2SKarsten Heimrich }; 5012fd6cc2SKarsten Heimrich 51*4a0c1e13SMichael Pfeiffer 52*4a0c1e13SMichael Pfeiffer inline const string& GetDriverName()53*4a0c1e13SMichael PfeifferPrinterData::GetDriverName() const 5412fd6cc2SKarsten Heimrich { 5512fd6cc2SKarsten Heimrich return fDriverName; 5612fd6cc2SKarsten Heimrich } 5712fd6cc2SKarsten Heimrich 58*4a0c1e13SMichael Pfeiffer 59*4a0c1e13SMichael Pfeiffer inline const string& GetPrinterName()60*4a0c1e13SMichael PfeifferPrinterData::GetPrinterName() const 6112fd6cc2SKarsten Heimrich { 6212fd6cc2SKarsten Heimrich return fPrinterName; 6312fd6cc2SKarsten Heimrich } 6412fd6cc2SKarsten Heimrich 65*4a0c1e13SMichael Pfeiffer 66*4a0c1e13SMichael Pfeiffer inline const string& GetComments()67*4a0c1e13SMichael PfeifferPrinterData::GetComments() const 6812fd6cc2SKarsten Heimrich { 6912fd6cc2SKarsten Heimrich return fComments; 7012fd6cc2SKarsten Heimrich } 7112fd6cc2SKarsten Heimrich 72*4a0c1e13SMichael Pfeiffer 73*4a0c1e13SMichael Pfeiffer inline const string& GetTransport()74*4a0c1e13SMichael PfeifferPrinterData::GetTransport() const 7512fd6cc2SKarsten Heimrich { 7612fd6cc2SKarsten Heimrich return fTransport; 7712fd6cc2SKarsten Heimrich } 7812fd6cc2SKarsten Heimrich 79*4a0c1e13SMichael Pfeiffer 80*4a0c1e13SMichael Pfeiffer inline int GetProtocolClass()81*4a0c1e13SMichael PfeifferPrinterData::GetProtocolClass() const 8212fd6cc2SKarsten Heimrich { 8312fd6cc2SKarsten Heimrich return fProtocolClass; 8412fd6cc2SKarsten Heimrich } 8512fd6cc2SKarsten Heimrich 86*4a0c1e13SMichael Pfeiffer 87*4a0c1e13SMichael Pfeiffer inline void SetPrinterName(const char * printerName)88*4a0c1e13SMichael PfeifferPrinterData::SetPrinterName(const char* printerName) 8912fd6cc2SKarsten Heimrich { 90*4a0c1e13SMichael Pfeiffer fPrinterName = printerName; 9112fd6cc2SKarsten Heimrich } 9212fd6cc2SKarsten Heimrich 93*4a0c1e13SMichael Pfeiffer 94*4a0c1e13SMichael Pfeiffer inline void SetComments(const char * comments)95*4a0c1e13SMichael PfeifferPrinterData::SetComments(const char* comments) 9612fd6cc2SKarsten Heimrich { 9712fd6cc2SKarsten Heimrich fComments = comments; 9812fd6cc2SKarsten Heimrich } 9912fd6cc2SKarsten Heimrich 100*4a0c1e13SMichael Pfeiffer 101*4a0c1e13SMichael Pfeiffer inline void SetProtocolClass(int protocolClass)102*4a0c1e13SMichael PfeifferPrinterData::SetProtocolClass(int protocolClass) 10312fd6cc2SKarsten Heimrich { 10412fd6cc2SKarsten Heimrich fProtocolClass = protocolClass; 10512fd6cc2SKarsten Heimrich } 10612fd6cc2SKarsten Heimrich 10712fd6cc2SKarsten Heimrich #endif // __PRINTERDATA_H 108