blob: 8b1b5b9422f637c6e382e70fc53acb94728ed2d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_LIBRBD_LIBRBDADMINSOCKETHOOK_H
#define CEPH_LIBRBD_LIBRBDADMINSOCKETHOOK_H
#include <map>
#include "common/admin_socket.h"
namespace librbd {
struct ImageCtx;
class LibrbdAdminSocketCommand;
class LibrbdAdminSocketHook : public AdminSocketHook {
public:
LibrbdAdminSocketHook(ImageCtx *ictx);
~LibrbdAdminSocketHook() override;
bool call(std::string_view command, const cmdmap_t& cmdmap,
std::string_view format, bufferlist& out) override;
private:
typedef std::map<std::string,LibrbdAdminSocketCommand*,
std::less<>> Commands;
AdminSocket *admin_socket;
Commands commands;
};
}
#endif
|