xmltooling 3.2.4

Public Member Functions | List of all members
xmltooling::GenericResponse Class Referenceabstract

Interface to generic protocol responses that transport XML messages. More...

`#include <xmltooling/io/GenericResponse.h>`

Inheritance diagram for xmltooling::GenericResponse:
[legend]

## Public Member Functions
virtual void | setContentType (const char *type=0)=0
| Sets or clears the MIME type of the response.
virtual long | sendResponse (std::istream &inputStream)=0
| Sends a completed response to the client along with a transport-specific "OK" indication.
virtual long | sendError (std::istream &inputStream)=0
| Sends an "error" response to the client along with a transport-specific error indication.
virtual long | sendResponse (std::istream &inputStream, long status)=0
| Sends a completed response to the client.

## Detailed Description

Interface to generic protocol responses that transport XML messages.

This interface need not be threadsafe.

## Member Function Documentation

## ◆ sendError()

virtual long xmltooling::GenericResponse::sendError | ( | std::istream & | inputStream | ) |
| pure virtual

Sends an "error" response to the client along with a transport-specific error indication.

Parameters

  inputStream | reference to source of response data

Returns
  a result code to return from the calling MessageEncoder

Implemented in xmltooling::HTTPResponse.

## ◆ sendResponse() [1/2]

virtual long xmltooling::GenericResponse::sendResponse | ( | std::istream & | inputStream | ) |
| pure virtual

Sends a completed response to the client along with a transport-specific "OK" indication.

Used for "normal" responses.

Parameters

  inputStream | reference to source of response data

Returns
  a result code to return from the calling MessageEncoder

Implemented in xmltooling::HTTPResponse.

## ◆ sendResponse() [2/2]

virtual long xmltooling::GenericResponse::sendResponse | ( | std::istream & | inputStream,
|  | long | status )
| pure virtual

Sends a completed response to the client.

Parameters

  inputStream | reference to source of response data
  status | transport-specific status to return

Returns
  a result code to return from the calling MessageEncoder

Implemented in xmltooling::HTTPResponse.

## ◆ setContentType()

virtual void xmltooling::GenericResponse::setContentType | ( | const char * | type = 0 | ) |
| pure virtual

Sets or clears the MIME type of the response.

Parameters

  type | the MIME type, or nullptr to clear

Implemented in xmltooling::HTTPResponse.

The documentation for this class was generated from the following file:

- xmltooling/io/GenericResponse.h