libdap::HTTPCacheResponse Class Reference

`#include <HTTPCacheResponse.h>`

Inheritance diagram for libdap::HTTPCacheResponse:

## Public Member Functions

Suppressed default methods
void | transform_to_cpp ()
Accessors
virtual std::vector< std::string > * | get_headers () const
virtual std::string | get_file () const
Mutators
virtual void | set_headers (std::vector< std::string > *h)
virtual void | set_file (const std::string &n)
getters
virtual int | get_status () const
virtual FILE * | get_stream () const
virtual std::istream * | get_cpp_stream () const
virtual ObjectType | get_type () const
virtual std::string | get_version () const
virtual std::string | get_protocol () const
setters
virtual void | set_status (int s)
virtual void | set_stream (FILE *s)
virtual void | set_cpp_stream (std::istream *s)
virtual void | set_type (ObjectType o)
virtual void | set_version (const std::string &v)
virtual void | set_protocol (const std::string &p)

## Suppressed default methods

| HTTPCacheResponse ()
| HTTPCacheResponse (const HTTPCacheResponse &rs)
HTTPCacheResponse & | operator= (const HTTPCacheResponse &)
| HTTPCacheResponse (FILE *s, int status_code, vector< string > *headers, HTTPCache *c)
| HTTPCacheResponse (FILE *s, int status_code, vector< string > *headers, const string &file_name, HTTPCache *c)
virtual | ~HTTPCacheResponse ()

## Detailed Description

Encapsulate a response. Instead of directly returning the FILE pointer from which a response is read, return an instance of this object.

Definition at line 44 of file HTTPCacheResponse.h.

## Constructor & Destructor Documentation

## HTTPCacheResponse() [1/2]

libdap::HTTPCacheResponse::HTTPCacheResponse | ( | FILE * | s,
|  | int | status_code,
|  | vector< string > * | headers,
|  | HTTPCache * | c
| ) |  |

inline

Build a Response object. Instances of this class are used to represent responses from a local HTTP/1.1 cache. The stream and headers pointer are passed to the parent (HTTPResponse); there's no temporary file for the parent to manage since the body is read from a file managed by the cache subsystem. This class releases the lock on the cache entry when the destructor is called.

Definition at line 64 of file HTTPCacheResponse.h.

## HTTPCacheResponse() [2/2]

libdap::HTTPCacheResponse::HTTPCacheResponse | ( | FILE * | s,
|  | int | status_code,
|  | vector< string > * | headers,
|  | const string & | file_name,
|  | HTTPCache * | c
| ) |  |

inline

Build a Response object. Instances of this class are used to represent responses from a local HTTP/1.1 cache. The stream and headers pointer are passed to the parent (HTTPResponse); there's no temporary file for the parent to manage since the body is read from a file managed by the cache subsystem. This class releases the lock on the cache entry when the destructor is called.

Definition at line 74 of file HTTPCacheResponse.h.

## ~HTTPCacheResponse()

virtual libdap::HTTPCacheResponse::~HTTPCacheResponse | ( |  | ) |

inline virtual

Free the cache entry lock. Call the parent's destructor.

Definition at line 80 of file HTTPCacheResponse.h.

## Member Function Documentation

## transform_to_cpp()

void libdap::HTTPResponse::transform_to_cpp | ( |  | ) |

inline inherited

Build a new HTTPResponse object that works with C++ streams. Assume that the FILE* references a disk file.

Returns

Definition at line 151 of file HTTPResponse.h.

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

- HTTPCacheResponse.h