1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_LIBRBD_IMAGE_WATCHER_NOTIFY_LOCK_OWNER_H
5 #define CEPH_LIBRBD_IMAGE_WATCHER_NOTIFY_LOCK_OWNER_H
7 #include "include/buffer.h"
8 #include "librbd/watcher/Types.h"
16 namespace watcher { class Notifier; }
18 namespace image_watcher {
20 class NotifyLockOwner {
22 static NotifyLockOwner *create(ImageCtx &image_ctx,
23 watcher::Notifier ¬ifier,
24 bufferlist &&bl, Context *on_finish) {
25 return new NotifyLockOwner(image_ctx, notifier, std::move(bl), on_finish);
28 NotifyLockOwner(ImageCtx &image_ctx, watcher::Notifier ¬ifier,
29 bufferlist &&bl, Context *on_finish);
34 ImageCtx &m_image_ctx;
35 watcher::Notifier &m_notifier;
38 watcher::NotifyResponse m_notify_response;
42 void handle_notify(int r);
47 } // namespace image_watcher
50 #endif // CEPH_LIBRBD_IMAGE_WATCHER_NOTIFY_LOCK_OWNER_H