]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_lc_s3.h
import ceph 15.2.10
[ceph.git] / ceph / src / rgw / rgw_lc_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 CEPH_RGW_LC_S3_H
5 #define CEPH_RGW_LC_S3_H
6
7 #include <map>
8 #include <string>
9 #include <iostream>
10 #include <include/types.h>
11
12 #include "include/str_list.h"
13 #include "rgw_lc.h"
14 #include "rgw_xml.h"
15 #include "rgw_tag_s3.h"
16
17 class LCFilter_S3 : public LCFilter
18 {
19 public:
20 void dump_xml(Formatter *f) const;
21 void decode_xml(XMLObj *obj);
22 };
23
24 class LCExpiration_S3 : public LCExpiration
25 {
26 private:
27 bool dm_expiration{false};
28 public:
29 LCExpiration_S3() {}
30 LCExpiration_S3(string _days, string _date, bool _dm_expiration) : LCExpiration(_days, _date), dm_expiration(_dm_expiration) {}
31
32 void dump_xml(Formatter *f) const;
33 void decode_xml(XMLObj *obj);
34
35 void set_dm_expiration(bool _dm_expiration) {
36 dm_expiration = _dm_expiration;
37 }
38
39 bool get_dm_expiration() {
40 return dm_expiration;
41 }
42 };
43
44 class LCNoncurExpiration_S3 : public LCExpiration
45 {
46 public:
47 LCNoncurExpiration_S3() {}
48
49 void decode_xml(XMLObj *obj);
50 void dump_xml(Formatter *f) const;
51 };
52
53 class LCMPExpiration_S3 : public LCExpiration
54 {
55 public:
56 LCMPExpiration_S3() {}
57
58 void decode_xml(XMLObj *obj);
59 void dump_xml(Formatter *f) const;
60 };
61
62 class LCTransition_S3 : public LCTransition
63 {
64 public:
65 LCTransition_S3() {}
66
67 void decode_xml(XMLObj *obj);
68 void dump_xml(Formatter *f) const;
69 };
70
71 class LCNoncurTransition_S3 : public LCTransition
72 {
73 public:
74 LCNoncurTransition_S3() {}
75 ~LCNoncurTransition_S3() {}
76
77 void decode_xml(XMLObj *obj);
78 void dump_xml(Formatter *f) const;
79 };
80
81
82 class LCRule_S3 : public LCRule
83 {
84 public:
85 LCRule_S3() {}
86
87 void dump_xml(Formatter *f) const;
88 void decode_xml(XMLObj *obj);
89 };
90
91 class RGWLifecycleConfiguration_S3 : public RGWLifecycleConfiguration
92 {
93 public:
94 explicit RGWLifecycleConfiguration_S3(CephContext *_cct) : RGWLifecycleConfiguration(_cct) {}
95 RGWLifecycleConfiguration_S3() : RGWLifecycleConfiguration(nullptr) {}
96
97 void decode_xml(XMLObj *obj);
98 int rebuild(RGWRados *store, RGWLifecycleConfiguration& dest);
99 void dump_xml(Formatter *f) const;
100 };
101
102 #endif