]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/driver/rados/rgw_rest_pubsub.h
bump version to 18.2.2-pve1
[ceph.git] / ceph / src / rgw / driver / rados / 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, optional_yield y) override {return 0;}
11 int read_permissions(RGWOp* op, optional_yield y) 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 protected:
29 RGWOp* op_post() override;
30 public:
31 RGWHandler_REST_PSTopic_AWS(const rgw::auth::StrategyRegistry& _auth_registry) :
32 auth_registry(_auth_registry) {}
33 virtual ~RGWHandler_REST_PSTopic_AWS() = default;
34 int postauth_init(optional_yield) override { return 0; }
35 int authorize(const DoutPrefixProvider* dpp, optional_yield y) override;
36 static bool action_exists(const req_state* s);
37 };
38