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_POOL_WATCHER_REFRESH_IMAGES_REQUEST_H
5 #define CEPH_RBD_MIRROR_POOL_WATCHER_REFRESH_IMAGES_REQUEST_H
7 #include "include/buffer.h"
8 #include "include/rados/librados.hpp"
9 #include "tools/rbd_mirror/types.h"
14 namespace librbd { struct ImageCtx; }
18 namespace pool_watcher {
20 template <typename ImageCtxT = librbd::ImageCtx>
21 class RefreshImagesRequest {
23 static RefreshImagesRequest *create(librados::IoCtx &remote_io_ctx,
24 ImageIds *image_ids, Context *on_finish) {
25 return new RefreshImagesRequest(remote_io_ctx, image_ids, on_finish);
28 RefreshImagesRequest(librados::IoCtx &remote_io_ctx, ImageIds *image_ids,
30 : m_remote_io_ctx(remote_io_ctx), m_image_ids(image_ids),
31 m_on_finish(on_finish) {
45 * MIRROR_IMAGE_LIST ---/
53 librados::IoCtx &m_remote_io_ctx;
54 ImageIds *m_image_ids;
58 std::string m_start_after;
60 void mirror_image_list();
61 void handle_mirror_image_list(int r);
67 } // namespace pool_watcher
71 extern template class rbd::mirror::pool_watcher::RefreshImagesRequest<librbd::ImageCtx>;
73 #endif // CEPH_RBD_MIRROR_POOL_WATCHER_REFRESH_IMAGES_REQUEST_H