From c17875567f5534478930d5fcc3db1927a1b34782 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 18 Apr 2017 14:08:53 -0400 Subject: [PATCH] rgw: remove extra RGWMPObj in rgw_multi.h two separate PRs had done refactoring around RGWMPObj, and it ended up in two different places. remove the one in rgw_multi.h, because rgw_rados.h now depends on its definition Signed-off-by: Casey Bodley --- src/rgw/rgw_multi.h | 64 --------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/src/rgw/rgw_multi.h b/src/rgw/rgw_multi.h index a2b03bdf5ec69..953a3624380d0 100644 --- a/src/rgw/rgw_multi.h +++ b/src/rgw/rgw_multi.h @@ -79,70 +79,6 @@ public: } }; -class RGWMPObj { - string oid; - string prefix; - string meta; - string upload_id; -public: - RGWMPObj() {} - RGWMPObj(const string& _oid, const string& _upload_id) { - init(_oid, _upload_id, _upload_id); - } - void init(const string& _oid, const string& _upload_id) { - init(_oid, _upload_id, _upload_id); - } - void init(const string& _oid, const string& _upload_id, const string& part_unique_str) { - if (_oid.empty()) { - clear(); - return; - } - oid = _oid; - upload_id = _upload_id; - prefix = oid + "."; - meta = prefix + upload_id + MP_META_SUFFIX; - prefix.append(part_unique_str); - } - string& get_meta() { return meta; } - string get_part(int num) { - char buf[16]; - snprintf(buf, 16, ".%d", num); - string s = prefix; - s.append(buf); - return s; - } - string get_part(string& part) { - string s = prefix; - s.append("."); - s.append(part); - return s; - } - string& get_upload_id() { - return upload_id; - } - string& get_key() { - return oid; - } - bool from_meta(string& meta) { - int end_pos = meta.rfind('.'); // search for ".meta" - if (end_pos < 0) - return false; - int mid_pos = meta.rfind('.', end_pos - 1); // . - if (mid_pos < 0) - return false; - oid = meta.substr(0, mid_pos); - upload_id = meta.substr(mid_pos + 1, end_pos - mid_pos - 1); - init(oid, upload_id, upload_id); - return true; - } - void clear() { - oid = ""; - prefix = ""; - meta = ""; - upload_id = ""; - } -}; - extern bool is_v2_upload_id(const string& upload_id); extern int list_multipart_parts(RGWRados *store, RGWBucketInfo& bucket_info, CephContext *cct, -- 2.39.5