]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_tag.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / rgw / rgw_tag.h
index fe8bbc348593a0722c53ff5cf74e2514fe3cfa62..d427cf064b8457eb1fb663c2b8d2e0e1f0f1ce99 100644 (file)
@@ -1,5 +1,5 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
+// vim: ts=8 sw=2 smarttab ft=cpp
 
 #ifndef RGW_TAG_H
 #define RGW_TAG_H
@@ -8,16 +8,21 @@
 #include <include/types.h>
 #include <boost/container/flat_map.hpp>
 
-#include "rgw_common.h"
-
 class RGWObjTags
 {
- protected:
+public:
   using tag_map_t = boost::container::flat_map <std::string, std::string>;
+
+protected:
   tag_map_t tag_map;
+
+  uint32_t max_obj_tags{10};
+  static constexpr uint32_t max_tag_key_size{128};
+  static constexpr uint32_t max_tag_val_size{256};
+
  public:
-  RGWObjTags() {}
-  ~RGWObjTags() {}
+  RGWObjTags() = default;
+  RGWObjTags(uint32_t max_obj_tags):max_obj_tags(max_obj_tags) {}
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1,1,bl);