]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_rest_pubsub.h
import ceph 15.2.10
[ceph.git] / ceph / src / rgw / rgw_rest_pubsub.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 #pragma once
4
5 #include "rgw_rest_s3.h"
6
7 // s3 compliant notification handler factory
8 class RGWHandler_REST_PSNotifs_S3 : public RGWHandler_REST_S3 {
9 protected:
10 int init_permissions(RGWOp* op) override {return 0;}
11 int read_permissions(RGWOp* op) override {return 0;}
12 bool supports_quota() override {return false;}
13 RGWOp* op_get() override;
14 RGWOp* op_put() override;
15 RGWOp* op_delete() override;
16 public:
17 using RGWHandler_REST_S3::RGWHandler_REST_S3;
18 virtual ~RGWHandler_REST_PSNotifs_S3() = default;
19 // following are used to generate the operations when invoked by another REST handler
20 static RGWOp* create_get_op();
21 static RGWOp* create_put_op();
22 static RGWOp* create_delete_op();
23 };
24
25 // AWS compliant topics handler factory
26 class RGWHandler_REST_PSTopic_AWS : public RGWHandler_REST {
27 const rgw::auth::StrategyRegistry& auth_registry;
28 const std::string& post_body;
29 void rgw_topic_parse_input();
30 //static int init_from_header(struct req_state *s, int default_formatter, bool configurable_format);
31 protected:
32 RGWOp* op_post() override;
33 public:
34 RGWHandler_REST_PSTopic_AWS(const rgw::auth::StrategyRegistry& _auth_registry, const std::string& _post_body) :
35 auth_registry(_auth_registry),
36 post_body(_post_body) {}
37 virtual ~RGWHandler_REST_PSTopic_AWS() = default;
38 int postauth_init() override { return 0; }
39 int authorize(const DoutPrefixProvider* dpp) override;
40 };
41