Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / 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
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 struct RGWObjTagKey_S3: public XMLObj
18 {
19 };
20
21 struct RGWObjTagValue_S3: public XMLObj
22 {
23 };
24
25 class RGWObjTagEntry_S3: public XMLObj
26 {
27   std::string key;
28   std::string val;
29 public:
30   RGWObjTagEntry_S3() {}
31   RGWObjTagEntry_S3(std::string k,std::string v):key(k),val(v) {};
32   ~RGWObjTagEntry_S3() {}
33
34   bool xml_end(const char*) override;
35   const std::string& get_key () const { return key;}
36   const std::string& get_val () const { return val;}
37   //void to_xml(CephContext *cct, ostream& out) const;
38 };
39
40 class RGWObjTagSet_S3: public RGWObjTags, public XMLObj
41 {
42 public:
43   bool xml_end(const char*) override;
44   void dump_xml(Formatter *f);
45   int rebuild(RGWObjTags& dest);
46 };
47
48 class RGWObjTagging_S3: public XMLObj
49 {
50 public:
51   bool xml_end(const char*) override;
52 };
53
54 class RGWObjTagsXMLParser : public RGWXMLParser
55 {
56   XMLObj *alloc_obj(const char *el);
57 public:
58   RGWObjTagsXMLParser() {}
59   ~RGWObjTagsXMLParser() {}
60 };
61
62 #endif /* RGW_TAG_S3_H */