]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_pubsub.h
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / rgw / rgw_pubsub.h
index 974581ce3d9175d124c4eea6f7d03ebcd233c7a1..290c52c2b8fe58044c6a3a241cb83eb01641cba1 100644 (file)
@@ -18,6 +18,7 @@ struct rgw_s3_key_filter {
 
   bool has_content() const;
 
+  void dump(Formatter *f) const;
   bool decode_xml(XMLObj *obj);
   void dump_xml(Formatter *f) const;
   
@@ -46,7 +47,8 @@ struct rgw_s3_key_value_filter {
   KeyValueMap kv;
   
   bool has_content() const;
-  
+
+  void dump(Formatter *f) const;
   bool decode_xml(XMLObj *obj);
   void dump_xml(Formatter *f) const;
   
@@ -69,7 +71,8 @@ struct rgw_s3_filter {
   rgw_s3_key_value_filter tag_filter;
 
   bool has_content() const;
-  
+
+  void dump(Formatter *f) const;
   bool decode_xml(XMLObj *obj);
   void dump_xml(Formatter *f) const;
   
@@ -563,6 +566,8 @@ public:
     // return 0 on success, error code otherwise
     int write_topics(const DoutPrefixProvider *dpp, const rgw_pubsub_bucket_topics& topics,
                     RGWObjVersionTracker* objv_tracker, optional_yield y) const;
+    int remove_notification_inner(const DoutPrefixProvider *dpp, const std::string& notification_id,
+                                  bool notif_id_or_topic, optional_yield y) const;
   public:
     Bucket(const RGWPubSub& _ps, rgw::sal::Bucket* _bucket) : 
       ps(_ps), bucket(_bucket)
@@ -573,6 +578,10 @@ public:
     int get_topics(const DoutPrefixProvider *dpp, rgw_pubsub_bucket_topics& result, optional_yield y) const {
       return read_topics(dpp, result, nullptr, y);
     }
+    // get a bucket_topic with by its name and populate it into "result"
+    // return -ENOENT if the topic does not exists
+    // return 0 on success, error code otherwise
+    int get_notification_by_id(const DoutPrefixProvider *dpp, const std::string& notification_id, rgw_pubsub_topic_filter& result, optional_yield y) const;
     // adds a topic + filter (event list, and possibly name metadata or tags filters) to a bucket
     // assigning a notification name is optional (needed for S3 compatible notifications)
     // if the topic already exist on the bucket, the filter event list may be updated
@@ -585,8 +594,9 @@ public:
         const rgw::notify::EventTypeList& events, OptionalFilter s3_filter, const std::string& notif_name, optional_yield y) const;
     // remove a topic and filter from bucket
     // if the topic does not exists on the bucket it is a no-op (considered success)
-    // return -ENOENT if the topic does not exists
+    // return -ENOENT if the notification-id/topic does not exists
     // return 0 on success, error code otherwise
+    int remove_notification_by_id(const DoutPrefixProvider *dpp, const std::string& notif_id, optional_yield y) const;
     int remove_notification(const DoutPrefixProvider *dpp, const std::string& topic_name, optional_yield y) const;
     // remove all notifications (and autogenerated topics) associated with the bucket
     // return 0 on success or if no topic was associated with the bucket, error code otherwise