]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_cors_s3.h
import ceph pacific 16.2.5
[ceph.git] / ceph / src / rgw / rgw_cors_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 /*
5 * Ceph - scalable distributed file system
6 *
7 * Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
8 *
9 * This is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License version 2.1, as published by the Free Software
12 * Foundation. See file COPYING.
13 *
14 */
15
16 #ifndef CEPH_RGW_CORS_S3_H
17 #define CEPH_RGW_CORS_S3_H
18
19 #include <map>
20 #include <string>
21 #include <iosfwd>
22
23 #include <include/types.h>
24 #include <common/Formatter.h>
25 #include <common/dout.h>
26 #include "rgw_xml.h"
27 #include "rgw_cors.h"
28
29 class RGWCORSRule_S3 : public RGWCORSRule, public XMLObj
30 {
31 const DoutPrefixProvider *dpp;
32 public:
33 RGWCORSRule_S3(const DoutPrefixProvider *dpp) : dpp(dpp) {}
34 ~RGWCORSRule_S3() override {}
35
36 bool xml_end(const char *el) override;
37 void to_xml(XMLFormatter& f);
38 };
39
40 class RGWCORSConfiguration_S3 : public RGWCORSConfiguration, public XMLObj
41 {
42 const DoutPrefixProvider *dpp;
43 public:
44 RGWCORSConfiguration_S3(const DoutPrefixProvider *dpp) : dpp(dpp) {}
45 ~RGWCORSConfiguration_S3() override {}
46
47 bool xml_end(const char *el) override;
48 void to_xml(ostream& out);
49 };
50
51 class RGWCORSXMLParser_S3 : public RGWXMLParser
52 {
53 const DoutPrefixProvider *dpp;
54 CephContext *cct;
55
56 XMLObj *alloc_obj(const char *el) override;
57 public:
58 explicit RGWCORSXMLParser_S3(const DoutPrefixProvider *_dpp, CephContext *_cct) : dpp(_dpp), cct(_cct) {}
59 };
60 #endif /*CEPH_RGW_CORS_S3_H*/