]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_tag.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rgw / rgw_tag.h
index f5d787ae9b2546a3d92a36ab07750a000bb81977..fe8bbc348593a0722c53ff5cf74e2514fe3cfa62 100644 (file)
@@ -1,3 +1,6 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
 #ifndef RGW_TAG_H
 #define RGW_TAG_H
 
@@ -18,21 +21,24 @@ class RGWObjTags
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(tag_map, bl);
+    encode(tag_map, bl);
     ENCODE_FINISH(bl);
   }
 
-  void decode(bufferlist::iterator &bl) {
+  void decode(bufferlist::const_iterator &bl) {
     DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, bl);
-    ::decode(tag_map,bl);
+    decode(tag_map,bl);
     DECODE_FINISH(bl);
   }
 
   void dump(Formatter *f) const;
   bool add_tag(const std::string& key, const std::string& val="");
+  bool emplace_tag(std::string&& key, std::string&& val);
   int check_and_add_tag(const std::string& key, const std::string& val="");
   size_t count() const {return tag_map.size();}
   int set_from_string(const std::string& input);
+  void clear() { tag_map.clear(); }
+  bool empty() const noexcept { return tag_map.empty(); }
   const tag_map_t& get_tags() const {return tag_map;}
 };
 WRITE_CLASS_ENCODER(RGWObjTags)