iipsrv
0.9.9
|
Class to handle non-image IIP responses including errors. More...
#include <IIPResponse.h>
Public Member Functions | |
IIPResponse () | |
Constructor. | |
void | setProtocol (const std::string &p) |
Set the IIP protocol version. More... | |
void | setLastModified (const std::string &m) |
Set the Last Modified header. More... | |
void | addResponse (const std::string &r) |
Add a response string. More... | |
void | addResponse (const char *c) |
Add a response string. More... | |
void | addResponse (const char *c, int a) |
Add a response string. More... | |
void | addResponse (std::string c, const char *a) |
Add a response string. More... | |
void | addResponse (const char *c, int a, int b) |
Add a response string. More... | |
void | setError (const std::string &code, const std::string &arg) |
Set an error. More... | |
std::string | formatResponse () |
Get a formatted string to send back. | |
bool | isSet () |
Indicate whether this object has had any arguments passed to it. | |
bool | errorIsSet () |
Indicate whether we have an error message. | |
void | setImageSent () |
Set the sent flag indicating that some sort of response has been sent. | |
bool | imageSent () |
Indicate whether a response has been sent. | |
std::string | getAdvert (const std::string &version) |
Display our advertising banner ;-) More... | |
Class to handle non-image IIP responses including errors.
void IIPResponse::addResponse | ( | const std::string & | r | ) |
void IIPResponse::addResponse | ( | const char * | c | ) |
Add a response string.
c | response string |
void IIPResponse::addResponse | ( | const char * | c, |
int | a | ||
) |
Add a response string.
c | response string |
a | integer value |
void IIPResponse::addResponse | ( | std::string | c, |
const char * | a | ||
) |
Add a response string.
c | response string |
a | string reply |
void IIPResponse::addResponse | ( | const char * | c, |
int | a, | ||
int | b | ||
) |
Add a response string.
c | response string |
a | integer value |
b | another integer value |
std::string IIPResponse::getAdvert | ( | const std::string & | version | ) |
void IIPResponse::setError | ( | const std::string & | code, |
const std::string & | arg | ||
) |
Set an error.
code | error code |
arg | the argument supplied by the client |
Referenced by setLastModified().
|
inline |
Set the Last Modified header.
m | Last modifed date as a HTTP RFC 1123 formatted timestamp |
References addResponse(), formatResponse(), and setError().
|
inline |
Set the IIP protocol version.
p | IIP protocol version |