19 _request_mode = RM_any;
20 _cache_control = CC_allow_cache;
28DocumentSpec(
const std::string &url) :
31 _request_mode = RM_any;
32 _cache_control = CC_allow_cache;
40DocumentSpec(
const URLSpec &url) :
43 _request_mode = RM_any;
44 _cache_control = CC_allow_cache;
56 _request_mode(copy._request_mode),
57 _cache_control(copy._cache_control),
65INLINE
void DocumentSpec::
70 _request_mode = copy._request_mode;
71 _cache_control = copy._cache_control;
78INLINE
bool DocumentSpec::
86INLINE
bool DocumentSpec::
94INLINE
bool DocumentSpec::
132 return (_flags & F_has_tag) != 0;
153 _flags &= ~F_has_tag;
162 _flags |= F_has_date;
170 return (_flags & F_has_date) != 0;
189 _flags &= ~F_has_date;
225 _request_mode = request_mode;
233 return _request_mode;
254 _cache_control = cache_control;
262 return _cache_control;
267 if (!doc.
input(in)) {
268 in.clear(std::ios::failbit | in.rdstate());
274operator << (std::ostream &out,
const DocumentSpec &doc) {
A descriptor that refers to a particular version of a document.
set_date
Changes the last-modified date associated with the DocumentSpec.
set_cache_control
Specifies what kind of cached value is acceptable for this document.
get_cache_control
Returns the request mode of this DocumentSpec.
set_tag
Changes the identity tag associated with the DocumentSpec.
get_request_mode
Returns the request mode of this DocumentSpec.
get_url
Retrieves the URL of the DocumentSpec.
set_url
Changes the URL of the DocumentSpec without modifying its other properties.
get_tag
Returns the identity tag associated with the DocumentSpec, if there is one.
set_request_mode
Sets the request mode of this DocumentSpec.
clear_date
Removes the last-modified date associated with the DocumentSpec, if there is one.
get_date
Returns the last-modified date associated with the DocumentSpec, if there is one.
clear_tag
Removes the identity tag associated with the DocumentSpec, if there is one.
has_date
Returns true if a last-modified date is associated with the DocumentSpec.
bool input(std::istream &in)
Can be used to read in the DocumentSpec from a stream generated either by output() or write().
has_tag
Returns true if an identity tag is associated with the DocumentSpec.
A container for an HTTP-legal time/date indication.
A container for an "entity tag" from an HTTP server.
A container for a URL, e.g.
An STL function object class, this is intended to be used on any ordered collection of class objects ...