]> git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/api/Namespace.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / librbd / api / Namespace.h
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_API_NAMESPACE_H
5 #define CEPH_LIBRBD_API_NAMESPACE_H
6
7 #include "include/rados/librados_fwd.hpp"
8 #include "include/rbd/librbd.hpp"
9 #include <string>
10 #include <vector>
11
12 namespace librbd {
13
14 struct ImageCtx;
15
16 namespace api {
17
18 template <typename ImageCtxT = librbd::ImageCtx>
19 struct Namespace {
20
21 static int create(librados::IoCtx& io_ctx, const std::string& name);
22 static int remove(librados::IoCtx& io_ctx, const std::string& name);
23 static int list(librados::IoCtx& io_ctx, std::vector<std::string>* names);
24 static int exists(librados::IoCtx& io_ctx, const std::string& name, bool *exists);
25
26 };
27
28 } // namespace api
29 } // namespace librbd
30
31 extern template class librbd::api::Namespace<librbd::ImageCtx>;
32
33 #endif // CEPH_LIBRBD_API_NAMESPACE_H