2002-11-27 02:03:14 +03:00
|
|
|
/*
|
|
|
|
* PrinterData.h
|
|
|
|
* Copyright 1999-2000 Y.Takagi All Rights Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PRINTERDATA_H
|
|
|
|
#define __PRINTERDATA_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <SerialPort.h>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class BNode;
|
|
|
|
|
|
|
|
class PrinterData {
|
|
|
|
public:
|
2010-12-08 23:07:22 +03:00
|
|
|
PrinterData(BNode* node = NULL);
|
|
|
|
virtual ~PrinterData();
|
2002-11-27 02:03:14 +03:00
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
virtual void Load();
|
|
|
|
virtual void Save();
|
2002-11-27 02:03:14 +03:00
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
const string& GetDriverName() const;
|
|
|
|
const string& GetPrinterName() const;
|
|
|
|
const string& GetComments() const;
|
|
|
|
const string& GetTransport() const;
|
|
|
|
int GetProtocolClass() const;
|
2002-11-27 02:03:14 +03:00
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
void SetPrinterName(const char* printerName);
|
|
|
|
void SetComments(const char* comments);
|
|
|
|
void SetProtocolClass(int protocolClass);
|
|
|
|
|
|
|
|
bool GetPath(string& path) const;
|
2002-11-27 02:03:14 +03:00
|
|
|
|
|
|
|
protected:
|
2010-12-08 23:07:22 +03:00
|
|
|
PrinterData(const PrinterData &printer_data);
|
|
|
|
|
|
|
|
PrinterData& operator=(const PrinterData &printer_data);
|
|
|
|
|
|
|
|
BNode* fNode;
|
2002-11-27 02:03:14 +03:00
|
|
|
|
|
|
|
private:
|
2010-12-08 23:07:22 +03:00
|
|
|
string fDriverName;
|
|
|
|
string fPrinterName;
|
|
|
|
string fComments;
|
|
|
|
string fTransport;
|
|
|
|
int fProtocolClass;
|
2002-11-27 02:03:14 +03:00
|
|
|
};
|
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
|
|
|
|
inline const string&
|
|
|
|
PrinterData::GetDriverName() const
|
2002-11-27 02:03:14 +03:00
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
return fDriverName;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
|
|
|
|
inline const string&
|
|
|
|
PrinterData::GetPrinterName() const
|
2002-11-27 02:03:14 +03:00
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
return fPrinterName;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
|
|
|
|
inline const string&
|
|
|
|
PrinterData::GetComments() const
|
2002-11-27 02:03:14 +03:00
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
return fComments;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
|
|
|
|
inline const string&
|
|
|
|
PrinterData::GetTransport() const
|
2002-11-27 02:03:14 +03:00
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
return fTransport;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
|
|
|
|
inline int
|
|
|
|
PrinterData::GetProtocolClass() const
|
2005-02-06 21:22:40 +03:00
|
|
|
{
|
|
|
|
return fProtocolClass;
|
|
|
|
}
|
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
|
|
|
|
inline void
|
|
|
|
PrinterData::SetPrinterName(const char* printerName)
|
2002-11-27 02:03:14 +03:00
|
|
|
{
|
2010-12-08 23:07:22 +03:00
|
|
|
fPrinterName = printerName;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
|
|
|
|
inline void
|
|
|
|
PrinterData::SetComments(const char* comments)
|
2002-11-27 02:03:14 +03:00
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
fComments = comments;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
|
|
|
|
inline void
|
|
|
|
PrinterData::SetProtocolClass(int protocolClass)
|
2005-02-06 21:22:40 +03:00
|
|
|
{
|
|
|
|
fProtocolClass = protocolClass;
|
|
|
|
}
|
|
|
|
|
2002-11-27 02:03:14 +03:00
|
|
|
#endif // __PRINTERDATA_H
|