#include "rgw_lc.h"
#include "rgw_torrent.h"
+#include "rgw_tag.h"
#include "include/assert.h"
}
};
+class RGWGetObjTags : public RGWOp {
+ protected:
+ bufferlist tags_bl;
+ bool has_tags{false};
+ public:
+ int verify_permission();
+ void execute();
+ void pre_exec();
+
+ virtual void send_response_data(bufferlist& bl) = 0;
+ virtual const string name() noexcept override { return "get_obj_tags"; }
+ virtual uint32_t op_mask() { return RGW_OP_TYPE_READ; }
+ RGWOpType get_type() { return RGW_OP_GET_OBJ_TAGGING; }
+
+};
+
+class RGWPutObjTags : public RGWOp {
+ protected:
+ bufferlist tags_bl;
+ public:
+ int verify_permission();
+ void execute();
+
+ virtual void send_response() = 0;
+ virtual int get_params() = 0;
+ virtual const string name() { return "put_obj_tags"; }
+ virtual uint32_t op_mask() { return RGW_OP_TYPE_WRITE; }
+ RGWOpType get_type() { return RGW_OP_PUT_OBJ_TAGGING; }
+
+};
+
+class RGWDeleteObjTags: public RGWOp {
+ public:
+ void pre_exec();
+ int verify_permission();
+ void execute();
+
+ virtual void send_response() = 0;
+ virtual const string name() { return "delete_obj_tags"; }
+ virtual uint32_t op_mask() { return RGW_OP_TYPE_DELETE; }
+ RGWOpType get_type() { return RGW_OP_DELETE_OBJ_TAGGING;}
+};
+
class RGWBulkDelete : public RGWOp {
public:
struct acct_path_t {
string etag;
bool chunked_upload;
RGWAccessControlPolicy policy;
+ std::unique_ptr <RGWObjTags> obj_tags;
const char *dlo_manifest;
RGWSLOInfo *slo_info;
map<string, bufferlist> attrs;
attrs[RGW_ATTR_DELETE_AT] = delatbl;
} /* encode_delete_at_attr */
+static inline void encode_obj_tags_attr(RGWObjTags* obj_tags, map<string, bufferlist>& attrs)
+{
+ if (obj_tags == nullptr){
+ // we assume the user submitted a tag format which we couldn't parse since
+ // this wouldn't be parsed later by get/put obj tags, lets delete if the
+ // attr was populated
+ return;
+ }
+
+ bufferlist tagsbl;
+ obj_tags->encode(tagsbl);
+ attrs[RGW_ATTR_TAGS] = tagsbl;
+}
+
static inline int encode_dlo_manifest_attr(const char * const dlo_manifest,
map<string, bufferlist>& attrs)
{