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>
|
|
|
|
|
|
|
|
#if (!__MWERKS__ || defined(MSIPL_USING_NAMESPACE))
|
|
|
|
using namespace std;
|
|
|
|
#else
|
|
|
|
#define std
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class BNode;
|
|
|
|
|
|
|
|
class PrinterData {
|
|
|
|
public:
|
|
|
|
PrinterData(BNode *node = NULL);
|
2010-04-12 02:01:13 +04:00
|
|
|
virtual ~PrinterData();
|
|
|
|
virtual void load();
|
|
|
|
virtual void save();
|
2002-11-27 02:03:14 +03:00
|
|
|
|
|
|
|
const string &getDriverName() const;
|
|
|
|
const string &getPrinterName() const;
|
|
|
|
const string &getComments() const;
|
|
|
|
const string &getTransport() const;
|
2005-02-06 21:22:40 +03:00
|
|
|
int getProtocolClass() const;
|
2002-11-27 02:03:14 +03:00
|
|
|
|
|
|
|
void setPrinterName(const char *printer_name);
|
|
|
|
void setComments(const char *comments);
|
2005-02-06 21:22:40 +03:00
|
|
|
void setProtocolClass(int protocolClass);
|
2002-11-27 02:03:14 +03:00
|
|
|
|
2005-02-06 21:22:40 +03:00
|
|
|
bool getPath(string &path) const;
|
2002-11-27 02:03:14 +03:00
|
|
|
|
|
|
|
protected:
|
|
|
|
PrinterData(const PrinterData &printer_data);
|
|
|
|
PrinterData &operator = (const PrinterData &printer_data);
|
|
|
|
|
2010-04-12 02:01:13 +04:00
|
|
|
BNode *fNode;
|
2002-11-27 02:03:14 +03:00
|
|
|
private:
|
2004-01-30 20:10:36 +03:00
|
|
|
string fDriverName;
|
|
|
|
string fPrinterName;
|
|
|
|
string fComments;
|
|
|
|
string fTransport;
|
2005-02-06 21:22:40 +03:00
|
|
|
int fProtocolClass;
|
2002-11-27 02:03:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
inline const string &PrinterData::getDriverName() const
|
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
return fDriverName;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
inline const string &PrinterData::getPrinterName() const
|
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
return fPrinterName;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
inline const string &PrinterData::getComments() const
|
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
return fComments;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
inline const string &PrinterData::getTransport() const
|
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
return fTransport;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
2005-02-06 21:22:40 +03:00
|
|
|
inline int PrinterData::getProtocolClass() const
|
|
|
|
{
|
|
|
|
return fProtocolClass;
|
|
|
|
}
|
|
|
|
|
2002-11-27 02:03:14 +03:00
|
|
|
inline void PrinterData::setPrinterName(const char *printer_name)
|
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
fPrinterName = printer_name;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void PrinterData::setComments(const char *comments)
|
|
|
|
{
|
2004-01-30 20:10:36 +03:00
|
|
|
fComments = comments;
|
2002-11-27 02:03:14 +03:00
|
|
|
}
|
|
|
|
|
2005-02-06 21:22:40 +03:00
|
|
|
inline void PrinterData::setProtocolClass(int protocolClass)
|
|
|
|
{
|
|
|
|
fProtocolClass = protocolClass;
|
|
|
|
}
|
|
|
|
|
2002-11-27 02:03:14 +03:00
|
|
|
#endif // __PRINTERDATA_H
|