]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_multi_del.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
8 #include "include/types.h"
11 #include "rgw_multi_del.h"
13 #define dout_subsys ceph_subsys_rgw
18 bool RGWMultiDelObject::xml_end(const char *el
)
20 RGWMultiDelKey
*key_obj
= static_cast<RGWMultiDelKey
*>(find_first("Key"));
21 RGWMultiDelVersionId
*vid
= static_cast<RGWMultiDelVersionId
*>(find_first("VersionId"));
26 string s
= key_obj
->get_data();
33 version_id
= vid
->get_data();
39 bool RGWMultiDelDelete::xml_end(const char *el
) {
40 RGWMultiDelQuiet
*quiet_set
= static_cast<RGWMultiDelQuiet
*>(find_first("Quiet"));
42 string quiet_val
= quiet_set
->get_data();
43 quiet
= (strcasecmp(quiet_val
.c_str(), "true") == 0);
46 XMLObjIter iter
= find("Object");
47 RGWMultiDelObject
*object
= static_cast<RGWMultiDelObject
*>(iter
.get_next());
49 const string
& key
= object
->get_key();
50 const string
& instance
= object
->get_version_id();
51 rgw_obj_key
k(key
, instance
);
53 object
= static_cast<RGWMultiDelObject
*>(iter
.get_next());
58 XMLObj
*RGWMultiDelXMLParser::alloc_obj(const char *el
) {
60 if (strcmp(el
, "Delete") == 0) {
61 obj
= new RGWMultiDelDelete();
62 } else if (strcmp(el
, "Quiet") == 0) {
63 obj
= new RGWMultiDelQuiet();
64 } else if (strcmp(el
, "Object") == 0) {
65 obj
= new RGWMultiDelObject ();
66 } else if (strcmp(el
, "Key") == 0) {
67 obj
= new RGWMultiDelKey();
68 } else if (strcmp(el
, "VersionId") == 0) {
69 obj
= new RGWMultiDelVersionId();