]>
git.proxmox.com Git - ceph.git/blob - ceph/src/tools/rbd_mirror/image_replayer/GetMirrorImageIdRequest.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef RBD_MIRROR_IMAGE_REPLAYER_GET_MIRROR_IMAGE_ID_REQUEST_H
5 #define RBD_MIRROR_IMAGE_REPLAYER_GET_MIRROR_IMAGE_ID_REQUEST_H
7 #include "include/buffer.h"
10 namespace librados
{ struct IoCtx
; }
11 namespace librbd
{ struct ImageCtx
; }
17 namespace image_replayer
{
19 template <typename ImageCtxT
= librbd::ImageCtx
>
20 class GetMirrorImageIdRequest
{
22 static GetMirrorImageIdRequest
*create(librados::IoCtx
&io_ctx
,
23 const std::string
&global_image_id
,
24 std::string
*image_id
,
26 return new GetMirrorImageIdRequest(io_ctx
, global_image_id
, image_id
,
30 GetMirrorImageIdRequest(librados::IoCtx
&io_ctx
,
31 const std::string
&global_image_id
,
32 std::string
*image_id
,
34 : m_io_ctx(io_ctx
), m_global_image_id(global_image_id
),
35 m_image_id(image_id
), m_on_finish(on_finish
) {
55 librados::IoCtx
&m_io_ctx
;
56 std::string m_global_image_id
;
57 std::string
*m_image_id
;
63 void handle_get_image_id(int r
);
69 } // namespace image_replayer
73 extern template class rbd::mirror::image_replayer::GetMirrorImageIdRequest
<librbd::ImageCtx
>;
75 #endif // RBD_MIRROR_IMAGE_REPLAYER_GET_MIRROR_IMAGE_ID_REQUEST_H