]>
git.proxmox.com Git - ceph.git/blob - ceph/src/cls/refcount/cls_refcount_ops.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_CLS_REFCOUNT_OPS_H
5 #define CEPH_CLS_REFCOUNT_OPS_H
7 #include "include/types.h"
11 struct cls_refcount_get_op
{
15 cls_refcount_get_op() : implicit_ref(false) {}
17 void encode(bufferlist
& bl
) const {
18 ENCODE_START(1, 1, bl
);
20 ::encode(implicit_ref
, bl
);
24 void decode(bufferlist::iterator
& bl
) {
27 ::decode(implicit_ref
, bl
);
30 void dump(ceph::Formatter
*f
) const;
31 static void generate_test_instances(list
<cls_refcount_get_op
*>& ls
);
33 WRITE_CLASS_ENCODER(cls_refcount_get_op
)
35 struct cls_refcount_put_op
{
37 bool implicit_ref
; // assume wildcard reference for
38 // objects without a set ref
40 cls_refcount_put_op() : implicit_ref(false) {}
42 void encode(bufferlist
& bl
) const {
43 ENCODE_START(1, 1, bl
);
45 ::encode(implicit_ref
, bl
);
49 void decode(bufferlist::iterator
& bl
) {
52 ::decode(implicit_ref
, bl
);
56 void dump(ceph::Formatter
*f
) const;
57 static void generate_test_instances(list
<cls_refcount_put_op
*>& ls
);
59 WRITE_CLASS_ENCODER(cls_refcount_put_op
)
61 struct cls_refcount_set_op
{
64 cls_refcount_set_op() {}
66 void encode(bufferlist
& bl
) const {
67 ENCODE_START(1, 1, bl
);
72 void decode(bufferlist::iterator
& bl
) {
78 void dump(ceph::Formatter
*f
) const;
79 static void generate_test_instances(list
<cls_refcount_set_op
*>& ls
);
81 WRITE_CLASS_ENCODER(cls_refcount_set_op
)
83 struct cls_refcount_read_op
{
84 bool implicit_ref
; // assume wildcard reference for
85 // objects without a set ref
87 cls_refcount_read_op() : implicit_ref(false) {}
89 void encode(bufferlist
& bl
) const {
90 ENCODE_START(1, 1, bl
);
91 ::encode(implicit_ref
, bl
);
95 void decode(bufferlist::iterator
& bl
) {
97 ::decode(implicit_ref
, bl
);
101 void dump(ceph::Formatter
*f
) const;
102 static void generate_test_instances(list
<cls_refcount_read_op
*>& ls
);
104 WRITE_CLASS_ENCODER(cls_refcount_read_op
)
106 struct cls_refcount_read_ret
{
109 cls_refcount_read_ret() {}
111 void encode(bufferlist
& bl
) const {
112 ENCODE_START(1, 1, bl
);
117 void decode(bufferlist::iterator
& bl
) {
123 void dump(ceph::Formatter
*f
) const;
124 static void generate_test_instances(list
<cls_refcount_read_ret
*>& ls
);
126 WRITE_CLASS_ENCODER(cls_refcount_read_ret
)