1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
5 #include "rgw_rest_s3.h"
7 // s3 compliant notification handler factory
8 class RGWHandler_REST_PSNotifs_S3
: public RGWHandler_REST_S3
{
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
;
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();
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);
32 RGWOp
* op_post() override
;
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
;