#define __MONCAPS_H
#include "include/types.h"
+//#include ""
#define MON_CAP_R 0x1
#define MON_CAP_W 0x2
rwx_t allow;
rwx_t deny;
MonCap() : allow(0), deny(0) {}
+
+ void encode(bufferlist& bl) const {
+ ::encode(allow, bl);
+ ::encode(deny, bl);
+ }
+
+ void decode(bufferlist::iterator& bl) {
+ ::decode(allow, bl);
+ ::decode(deny, bl);
+ }
};
+WRITE_RAW_ENCODER(MonCap);
struct MonCaps {
string text;
__u64 auid=CEPH_AUTH_UID_DEFAULT);
void set_allow_all(bool allow) { allow_all = allow; }
void set_auid(__u64 uid) { auid = uid; }
+
+ void encode(bufferlist& bl) const {
+ ::encode(text, bl);
+ ::encode(default_action, bl);
+ ::encode(services_map, bl);
+ ::encode(pool_auid_map, bl);
+ ::encode(allow_all, bl);
+ ::encode(auid, bl);
+ }
+
+ void decode(bufferlist::iterator& bl) {
+ ::decode(text, bl);
+ ::decode(default_action, bl);
+ ::decode(services_map, bl);
+ ::decode(pool_auid_map, bl);
+ ::decode(allow_all, bl);
+ ::decode(auid, bl);
+ }
};
+WRITE_CLASS_ENCODER(MonCaps);
+
inline ostream& operator<<(ostream& out, const MonCaps& m) {
return out << m.get_str();
}