]> git.proxmox.com Git - ceph.git/blame - ceph/src/cls/version/cls_version_ops.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / cls / version / cls_version_ops.h
CommitLineData
7c673cae
FG
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_CLS_VERSION_OPS_H
5#define CEPH_CLS_VERSION_OPS_H
6
7c673cae
FG
7#include "cls_version_types.h"
8
9struct cls_version_set_op {
10 obj_version objv;
11
12 cls_version_set_op() {}
13
14 void encode(bufferlist& bl) const {
15 ENCODE_START(1, 1, bl);
11fdf7f2 16 encode(objv, bl);
7c673cae
FG
17 ENCODE_FINISH(bl);
18 }
19
11fdf7f2 20 void decode(bufferlist::const_iterator& bl) {
7c673cae 21 DECODE_START(1, bl);
11fdf7f2 22 decode(objv, bl);
7c673cae
FG
23 DECODE_FINISH(bl);
24 }
25};
26WRITE_CLASS_ENCODER(cls_version_set_op)
27
28struct cls_version_inc_op {
29 obj_version objv;
30 list<obj_version_cond> conds;
31
32 cls_version_inc_op() {}
33
34 void encode(bufferlist& bl) const {
35 ENCODE_START(1, 1, bl);
11fdf7f2
TL
36 encode(objv, bl);
37 encode(conds, bl);
7c673cae
FG
38 ENCODE_FINISH(bl);
39 }
40
11fdf7f2 41 void decode(bufferlist::const_iterator& bl) {
7c673cae 42 DECODE_START(1, bl);
11fdf7f2
TL
43 decode(objv, bl);
44 decode(conds, bl);
7c673cae
FG
45 DECODE_FINISH(bl);
46 }
47};
48WRITE_CLASS_ENCODER(cls_version_inc_op)
49
50struct cls_version_check_op {
51 obj_version objv;
52 list<obj_version_cond> conds;
53
54 cls_version_check_op() {}
55
56 void encode(bufferlist& bl) const {
57 ENCODE_START(1, 1, bl);
11fdf7f2
TL
58 encode(objv, bl);
59 encode(conds, bl);
7c673cae
FG
60 ENCODE_FINISH(bl);
61 }
62
11fdf7f2 63 void decode(bufferlist::const_iterator& bl) {
7c673cae 64 DECODE_START(1, bl);
11fdf7f2
TL
65 decode(objv, bl);
66 decode(conds, bl);
7c673cae
FG
67 DECODE_FINISH(bl);
68 }
69};
70WRITE_CLASS_ENCODER(cls_version_check_op)
71
72struct cls_version_read_ret {
73 obj_version objv;
74
75 cls_version_read_ret() {}
76
77 void encode(bufferlist& bl) const {
78 ENCODE_START(1, 1, bl);
11fdf7f2 79 encode(objv, bl);
7c673cae
FG
80 ENCODE_FINISH(bl);
81 }
82
11fdf7f2 83 void decode(bufferlist::const_iterator& bl) {
7c673cae 84 DECODE_START(1, bl);
11fdf7f2 85 decode(objv, bl);
7c673cae
FG
86 DECODE_FINISH(bl);
87 }
88};
89WRITE_CLASS_ENCODER(cls_version_read_ret)
90
91
92#endif