]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_tag_s3.h
import ceph 15.2.10
[ceph.git] / ceph / src / rgw / rgw_tag_s3.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
3
4 #ifndef RGW_TAG_S3_H
5 #define RGW_TAG_S3_H
6
7 #include <map>
8 #include <string>
9 #include <iostream>
10 #include <include/types.h>
11 #include <common/Formatter.h>
12 #include <expat.h>
13
14 #include "rgw_tag.h"
15 #include "rgw_xml.h"
16
17 class RGWObjTagEntry_S3
18 {
19 std::string key;
20 std::string val;
21 public:
22 RGWObjTagEntry_S3() {}
23 RGWObjTagEntry_S3(const std::string &k, const std::string &v):key(k),val(v) {};
24 ~RGWObjTagEntry_S3() {}
25
26 const std::string& get_key () const { return key; }
27 const std::string& get_val () const { return val; }
28
29 void dump_xml(Formatter *f) const;
30 void decode_xml(XMLObj *obj);
31 };
32
33 class RGWObjTagSet_S3: public RGWObjTags
34 {
35 public:
36 int rebuild(RGWObjTags& dest);
37
38 void dump_xml(Formatter *f) const;
39 void decode_xml(XMLObj *obj);
40 };
41
42 class RGWObjTagging_S3
43 {
44 RGWObjTagSet_S3 tagset;
45 public:
46 void decode_xml(XMLObj *obj);
47 int rebuild(RGWObjTags& dest) {
48 return tagset.rebuild(dest);
49 }
50 };
51
52
53 #endif /* RGW_TAG_S3_H */