diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-06-13 07:39:15 +0200 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-06-13 07:39:15 +0200 |
commit | bcdd4755f37a14c8aa71876509f35af044d112b2 (patch) | |
tree | ce2dee2fff72d779d86a3be2bdf49cf214fdbb37 /src/rgw/rgw_rest_client.h | |
parent | rgw: generate read request if source rgw is remote (diff) | |
download | ceph-bcdd4755f37a14c8aa71876509f35af044d112b2.tar.xz ceph-bcdd4755f37a14c8aa71876509f35af044d112b2.zip |
rgw: organize get_obj handling for copy a bit different
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Diffstat (limited to 'src/rgw/rgw_rest_client.h')
-rw-r--r-- | src/rgw/rgw_rest_client.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rgw/rgw_rest_client.h b/src/rgw/rgw_rest_client.h index a2c14b42cb5..973a88e7972 100644 --- a/src/rgw/rgw_rest_client.h +++ b/src/rgw/rgw_rest_client.h @@ -74,16 +74,20 @@ public: class RGWRESTStreamReadRequest : public RGWRESTSimpleRequest { Mutex lock; - void *handle; RGWGetDataCB *cb; + bufferlist in_data; + size_t chunk_ofs; + size_t ofs; public: int send_data(void *ptr, size_t len); + int receive_data(void *ptr, size_t len); - RGWRESTStreamReadRequest(CephContext *_cct, string& _url, list<pair<string, string> > *_headers, + RGWRESTStreamReadRequest(CephContext *_cct, string& _url, RGWGetDataCB *_cb, list<pair<string, string> > *_headers, list<pair<string, string> > *_params) : RGWRESTSimpleRequest(_cct, _url, _headers, _params), - lock("RGWRESTStreamReadRequest"), handle(NULL), cb(NULL) {} + lock("RGWRESTStreamReadRequest"), cb(_cb), + chunk_ofs(0), ofs(0) {} ~RGWRESTStreamReadRequest() {} - int get_obj_init(RGWAccessKey& key, rgw_obj& obj); + int get_obj(RGWAccessKey& key, rgw_obj& obj); int complete(string& etag, time_t *mtime); void set_in_cb(RGWGetDataCB *_cb) { cb = _cb; } |