]>
git.proxmox.com Git - ceph.git/blob - ceph/src/include/health.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
9 #include "include/encoding.h"
12 enum health_status_t
{
18 static inline void encode(health_status_t hs
, bufferlist
& bl
) {
22 static inline void decode(health_status_t
& hs
, bufferlist::iterator
& p
) {
25 hs
= health_status_t(v
);
28 struct denc_traits
<health_status_t
> {
29 static constexpr bool supported
= true;
30 static constexpr bool featured
= false;
31 static constexpr bool bounded
= true;
32 static constexpr bool need_contiguous
= false;
33 static void bound_encode(const bufferptr
& v
, size_t& p
, uint64_t f
=0) {
36 static void encode(const health_status_t
& v
,
37 buffer::list::contiguous_appender
& p
,
39 ::denc((uint8_t)v
, p
);
41 static void decode(health_status_t
& v
, buffer::ptr::iterator
& p
,
45 v
= health_status_t(tmp
);
47 static void decode(health_status_t
& v
, buffer::list::iterator
& p
,
51 v
= health_status_t(tmp
);
55 inline std::ostream
& operator<<(std::ostream
&oss
, const health_status_t status
) {