X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Flibrbd%2FMirroringWatcher.h;fp=src%2Fceph%2Fsrc%2Flibrbd%2FMirroringWatcher.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=90f43329de582ef03c9ca63dd298325046731d49;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/librbd/MirroringWatcher.h b/src/ceph/src/librbd/MirroringWatcher.h deleted file mode 100644 index 90f4332..0000000 --- a/src/ceph/src/librbd/MirroringWatcher.h +++ /dev/null @@ -1,69 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_LIBRBD_MIRRORING_WATCHER_H -#define CEPH_LIBRBD_MIRRORING_WATCHER_H - -#include "include/int_types.h" -#include "cls/rbd/cls_rbd_types.h" -#include "librbd/ImageCtx.h" -#include "librbd/Watcher.h" -#include "librbd/mirroring_watcher/Types.h" - -namespace librados { - class IoCtx; -} - -namespace librbd { - -namespace watcher { -namespace util { -template struct HandlePayloadVisitor; -} -} - -template -class MirroringWatcher : public Watcher { - friend struct watcher::util::HandlePayloadVisitor>; - -public: - MirroringWatcher(librados::IoCtx &io_ctx, ContextWQ *work_queue); - - static int notify_mode_updated(librados::IoCtx &io_ctx, - cls::rbd::MirrorMode mirror_mode); - static void notify_mode_updated(librados::IoCtx &io_ctx, - cls::rbd::MirrorMode mirror_mode, - Context *on_finish); - - static int notify_image_updated(librados::IoCtx &io_ctx, - cls::rbd::MirrorImageState mirror_image_state, - const std::string &image_id, - const std::string &global_image_id); - static void notify_image_updated(librados::IoCtx &io_ctx, - cls::rbd::MirrorImageState mirror_image_state, - const std::string &image_id, - const std::string &global_image_id, - Context *on_finish); - - virtual void handle_mode_updated(cls::rbd::MirrorMode mirror_mode) = 0; - virtual void handle_image_updated(cls::rbd::MirrorImageState state, - const std::string &image_id, - const std::string &global_image_id) = 0; - -private: - bool handle_payload(const mirroring_watcher::ModeUpdatedPayload &payload, - Context *on_notify_ack); - bool handle_payload(const mirroring_watcher::ImageUpdatedPayload &payload, - Context *on_notify_ack); - bool handle_payload(const mirroring_watcher::UnknownPayload &payload, - Context *on_notify_ack); - - void handle_notify(uint64_t notify_id, uint64_t handle, - uint64_t notifier_id, bufferlist &bl) override; -}; - -} // namespace librbd - -extern template class librbd::MirroringWatcher; - -#endif // CEPH_LIBRBD_MIRRORING_WATCHER_H