acl  3.5.3.0
GetObjectRequest.hpp
浏览该文件的文档.
1 #pragma once
3 #include <list>
5 
6 namespace acl
7 {
8 
9 class dbuf_pool;
10 class ResponseHeaderOverrides;
11 
13 {
14 public:
15  GetObjectRequest(const char* bucket, const char* key,
16  dbuf_pool* pool = NULL);
18 
19  GetObjectRequest& setBucketName(const char* name);
20  GetObjectRequest& setKey(const char* key);
21  GetObjectRequest& setRange(long long int start, long long int end);
22  GetObjectRequest& setMatchingETagConstraints(
23  const std::list<string>& etags);
24  GetObjectRequest& setNonmatchingETagConstraints(
25  const std::list<string>& etags);
26  GetObjectRequest& setUnmodifiedSinceConstraint(time_t date);
27  GetObjectRequest& setModifiedSinceConstraint(time_t date);
28  GetObjectRequest& setResponseHeaders(
29  ResponseHeaderOverrides* responseHeaders);
30 
31  void reset();
32 
33  const char* getBucketName() const
34  {
35  return bucket_;
36  }
37 
38  const char* getKey() const
39  {
40  return key_;
41  }
42 
43  void getRange(long long int& start, long long int& end) const
44  {
45  start = range_[0];
46  end = range_[1];
47  }
48 
49  const std::list<char*>& getMatchingETagConstraints() const
50  {
51  return matching_etags_;
52  }
53 
54  const std::list<char*>& getNonmatchingETagConstraints() const
55  {
56  return non_matching_etags_;
57  }
58 
60  {
61  return unmodified_since_;
62  }
63 
65  {
66  return modified_since_;
67  }
68 
70  {
71  return response_headers_;
72  }
73 
74 private:
75  dbuf_pool* pool_;
76  char* bucket_;
77  char* key_;
78  long long int range_[2];
79  std::list<char*> matching_etags_;
80  std::list<char*> non_matching_etags_;
81  time_t unmodified_since_;
82  time_t modified_since_;
83  ResponseHeaderOverrides* response_headers_;
84 };
85 
86 } // namespace acl
HTTP_API void const char * name
Definition: lib_http.h:620
time_t getModifiedSinceConstraint() const
const char * getBucketName() const
void getRange(long long int &start, long long int &end) const
const std::list< char * > & getMatchingETagConstraints() const
time_t getUnmodifiedSinceConstraint() const
const char * getKey() const
const std::list< char * > & getNonmatchingETagConstraints() const
ResponseHeaderOverrides * getResponseHeaders() const
#define ACL_CPP_API