]> git.proxmox.com Git - ceph.git/blame - ceph/src/librbd/crypto/ShutDownCryptoRequest.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / librbd / crypto / ShutDownCryptoRequest.h
CommitLineData
f67539c2
TL
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3
4#ifndef CEPH_LIBRBD_CRYPTO_SHUT_DOWN_CRYPTO_REQUEST_H
5#define CEPH_LIBRBD_CRYPTO_SHUT_DOWN_CRYPTO_REQUEST_H
6
1e59de90 7#include "librbd/ImageCtx.h"
f67539c2
TL
8
9struct Context;
10
11namespace librbd {
12
13class ImageCtx;
14
15namespace crypto {
16
f67539c2
TL
17template <typename I>
18class ShutDownCryptoRequest {
19public:
20 static ShutDownCryptoRequest* create(I* image_ctx, Context* on_finish) {
21 return new ShutDownCryptoRequest(image_ctx, on_finish);
22 }
23
24 ShutDownCryptoRequest(I* image_ctx, Context* on_finish);
1e59de90 25
f67539c2
TL
26 void send();
27 void shut_down_object_dispatch();
28 void handle_shut_down_object_dispatch(int r);
29 void shut_down_image_dispatch();
30 void handle_shut_down_image_dispatch(int r);
31 void finish(int r);
32
33private:
34 I* m_image_ctx;
35 Context* m_on_finish;
f67539c2
TL
36};
37
38} // namespace crypto
39} // namespace librbd
40
41extern template class librbd::crypto::ShutDownCryptoRequest<librbd::ImageCtx>;
42
43#endif // CEPH_LIBRBD_CRYPTO_SHUT_DOWN_CRYPTO_REQUEST_H