23 _request_mode = RM_any;
24 _cache_control = CC_allow_cache;
34 DocumentSpec(
const string &url) :
37 _request_mode = RM_any;
38 _cache_control = CC_allow_cache;
48 DocumentSpec(
const URLSpec &url) :
51 _request_mode = RM_any;
52 _cache_control = CC_allow_cache;
66 _request_mode(copy._request_mode),
67 _cache_control(copy._cache_control),
77 INLINE
void DocumentSpec::
82 _request_mode = copy._request_mode;
83 _cache_control = copy._cache_control;
92 INLINE
bool DocumentSpec::
102 INLINE
bool DocumentSpec::
112 INLINE
bool DocumentSpec::
162 return (_flags & F_has_tag) != 0;
189 _flags &= ~F_has_tag;
201 _flags |= F_has_date;
212 return (_flags & F_has_date) != 0;
236 _flags &= ~F_has_date;
280 _request_mode = request_mode;
291 return _request_mode;
318 _cache_control = cache_control;
329 return _cache_control;
334 if (!doc.
input(in)) {
335 in.clear(ios::failbit | in.rdstate());
void clear_tag()
Removes the identity tag associated with the DocumentSpec, if there is one.
A container for a URL, e.g.
const URLSpec & get_url() const
Retrieves the URL of the DocumentSpec.
A container for an "entity tag" from an HTTP server.
bool has_date() const
Returns true if a last-modified date is associated with the DocumentSpec.
void set_cache_control(CacheControl cache_control)
Specifies what kind of cached value is acceptable for this document.
void set_date(const HTTPDate &date)
Changes the last-modified date associated with the DocumentSpec.
bool input(istream &in)
Can be used to read in the DocumentSpec from a stream generated either by output() or write()...
void set_request_mode(RequestMode request_mode)
Sets the request mode of this DocumentSpec.
void set_tag(const HTTPEntityTag &tag)
Changes the identity tag associated with the DocumentSpec.
RequestMode get_request_mode() const
Returns the request mode of this DocumentSpec.
const HTTPDate & get_date() const
Returns the last-modified date associated with the DocumentSpec, if there is one. ...
void set_url(const URLSpec &url)
Changes the URL of the DocumentSpec without modifying its other properties.
const HTTPEntityTag & get_tag() const
Returns the identity tag associated with the DocumentSpec, if there is one.
A container for an HTTP-legal time/date indication.
void clear_date()
Removes the last-modified date associated with the DocumentSpec, if there is one. ...
An STL function object class, this is intended to be used on any ordered collection of class objects ...
CacheControl get_cache_control() const
Returns the request mode of this DocumentSpec.
A descriptor that refers to a particular version of a document.
bool has_tag() const
Returns true if an identity tag is associated with the DocumentSpec.