]>
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
17 bool RGWMultiDelObject::xml_end(const char *el
)
19 RGWMultiDelKey
*key_obj
= static_cast<RGWMultiDelKey
*>(find_first("Key"));
20 RGWMultiDelVersionId
*vid
= static_cast<RGWMultiDelVersionId
*>(find_first("VersionId"));
25 string s
= key_obj
->get_data();
32 version_id
= vid
->get_data();
38 bool RGWMultiDelDelete::xml_end(const char *el
) {
39 RGWMultiDelQuiet
*quiet_set
= static_cast<RGWMultiDelQuiet
*>(find_first("Quiet"));
41 string quiet_val
= quiet_set
->get_data();
42 quiet
= (strcasecmp(quiet_val
.c_str(), "true") == 0);
45 XMLObjIter iter
= find("Object");
46 RGWMultiDelObject
*object
= static_cast<RGWMultiDelObject
*>(iter
.get_next());
48 const string
& key
= object
->get_key();
49 const string
& instance
= object
->get_version_id();
50 rgw_obj_key
k(key
, instance
);
52 object
= static_cast<RGWMultiDelObject
*>(iter
.get_next());
57 XMLObj
*RGWMultiDelXMLParser::alloc_obj(const char *el
) {
59 if (strcmp(el
, "Delete") == 0) {
60 obj
= new RGWMultiDelDelete();
61 } else if (strcmp(el
, "Quiet") == 0) {
62 obj
= new RGWMultiDelQuiet();
63 } else if (strcmp(el
, "Object") == 0) {
64 obj
= new RGWMultiDelObject ();
65 } else if (strcmp(el
, "Key") == 0) {
66 obj
= new RGWMultiDelKey();
67 } else if (strcmp(el
, "VersionId") == 0) {
68 obj
= new RGWMultiDelVersionId();