1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
4 #ifndef RGW_SYNC_MODULE_AWS_H
5 #define RGW_SYNC_MODULE_AWS_H
7 #include "rgw_sync_module.h"
9 struct rgw_sync_aws_multipart_part_info
{
15 void encode(bufferlist
& bl
) const {
16 ENCODE_START(1, 1, bl
);
24 void decode(bufferlist::const_iterator
& bl
) {
33 WRITE_CLASS_ENCODER(rgw_sync_aws_multipart_part_info
)
35 struct rgw_sync_aws_src_obj_properties
{
36 ceph::real_time mtime
;
38 uint32_t zone_short_id
{0};
40 uint64_t versioned_epoch
{0};
42 void encode(bufferlist
& bl
) const {
43 ENCODE_START(1, 1, bl
);
46 encode(zone_short_id
, bl
);
48 encode(versioned_epoch
, bl
);
52 void decode(bufferlist::const_iterator
& bl
) {
56 decode(zone_short_id
, bl
);
58 decode(versioned_epoch
, bl
);
62 WRITE_CLASS_ENCODER(rgw_sync_aws_src_obj_properties
)
64 struct rgw_sync_aws_multipart_upload_info
{
65 std::string upload_id
;
67 rgw_sync_aws_src_obj_properties src_properties
;
68 uint32_t part_size
{0};
69 uint32_t num_parts
{0};
74 std::map
<int, rgw_sync_aws_multipart_part_info
> parts
;
76 void encode(bufferlist
& bl
) const {
77 ENCODE_START(1, 1, bl
);
78 encode(upload_id
, bl
);
80 encode(src_properties
, bl
);
81 encode(part_size
, bl
);
82 encode(num_parts
, bl
);
89 void decode(bufferlist::const_iterator
& bl
) {
91 decode(upload_id
, bl
);
93 decode(src_properties
, bl
);
94 decode(part_size
, bl
);
95 decode(num_parts
, bl
);
102 WRITE_CLASS_ENCODER(rgw_sync_aws_multipart_upload_info
)
104 class RGWAWSSyncModule
: public RGWSyncModule
{
106 RGWAWSSyncModule() {}
107 bool supports_data_export() override
{ return false;}
108 int create_instance(const DoutPrefixProvider
*dpp
, CephContext
*cct
, const JSONFormattable
& config
, RGWSyncModuleInstanceRef
*instance
) override
;
111 #endif /* RGW_SYNC_MODULE_AWS_H */