22 #ifndef _IIPRESPONSE_H 23 #define _IIPRESPONSE_H 26 #define VERSION "0.9.9.9" 31 #define snprintf _snprintf 51 std::string responseBody;
69 void setLastModified(
const std::string& m ) { modified =
"Last-Modified: " + m; };
108 void setError(
const std::string& code,
const std::string& arg );
117 if( error.length() || responseBody.length() || protocol.length() )
return true;
124 if( error.length() )
return true;
139 std::string
getAdvert(
const std::string& version );
void setProtocol(const std::string &p)
Set the IIP protocol version.
Definition: IIPResponse.h:64
bool errorIsSet()
Indicate whether we have an error message.
Definition: IIPResponse.h:123
void setLastModified(const std::string &m)
Set the Last Modified header.
Definition: IIPResponse.h:69
Class to handle non-image IIP responses including errors.
Definition: IIPResponse.h:40
void setImageSent()
Set the sent flag indicating that some sort of response has been sent.
Definition: IIPResponse.h:130
bool isSet()
Indicate whether this object has had any arguments passed to it.
Definition: IIPResponse.h:116
bool imageSent()
Indicate whether a response has been sent.
Definition: IIPResponse.h:134
std::string formatResponse()
Get a formatted string to send back.
void addResponse(const std::string &r)
Add a response string.
void setError(const std::string &code, const std::string &arg)
Set an error.
std::string getAdvert(const std::string &version)
Display our advertising banner ;-)
IIPResponse()
Constructor.