1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_RBD_MIRROR_MIRROR_STATUS_WATCHER_H
5 #define CEPH_RBD_MIRROR_MIRROR_STATUS_WATCHER_H
7 #include "librbd/Watcher.h"
9 namespace librbd { class ImageCtx; }
14 template <typename ImageCtxT = librbd::ImageCtx>
15 class MirrorStatusWatcher : protected librbd::Watcher {
17 static MirrorStatusWatcher *create(librados::IoCtx &io_ctx,
18 ContextWQ *work_queue) {
19 return new MirrorStatusWatcher(io_ctx, work_queue);
25 MirrorStatusWatcher(librados::IoCtx &io_ctx, ContextWQ *work_queue);
26 ~MirrorStatusWatcher() override;
28 void init(Context *on_finish);
29 void shut_down(Context *on_finish);
32 void handle_notify(uint64_t notify_id, uint64_t handle,
33 uint64_t notifier_id, bufferlist &bl) override;
39 #endif // CEPH_RBD_MIRROR_MIRROR_STATUS_WATCHER_H