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