65 if (!strcmp(
a.getString(0),
"Ok"))
117 cerr <<
"WPRT ERR:" <<
a << endl;
121 if ((
a.getByte(0) != 0) || (
a.getWord(1) != 2))
133 cerr <<
"WPRT ERR:" << buf << endl;
144 cerr <<
"WPRT ERR:" <<
a << endl;
Wrapper class featuring range-checking and string representation of enumerated values.
A class for dealing with sockets.
bool closeSocket(void)
Closes the connection.
virtual bool reconnect()
Reopens the connection after closing it.
int getBufferStore(bufferStore &a, bool wait=true)
Receive data into a bufferStore .
bool sendBufferStore(const bufferStore &a)
Sends data from a bufferStore .
A generic container for an array of bytes.
bool sendCommand(enum commands cc, bufferStore &data)
Sends a command to the remote side.
Enum< rfsv::errs > cancelJob()
Cancels a running job.
Enum< rfsv::errs > getResponse(bufferStore &data)
Enum< rfsv::errs > status
The current status of the connection.
void reset()
Initializes a connection to the remote machine.
TCPSocket * skt
The socket, used for communication with ncpd.
void reconnect()
Attempts to re-establish a remote connection by first closing the socket, then connecting again to th...
commands
The possible commands.
Enum< rfsv::errs > initPrinter()
Init Printer.
bool stop()
Stops the WPRT server.
~wprt()
Virtual destructor.
Enum< rfsv::errs > getStatus()
Retrieves the current status of the connection.
const char * getConnectName()
Enum< rfsv::errs > getData(bufferStore &buf)
Get Print Data.