]> git.proxmox.com Git - ceph.git/blame - ceph/src/librbd/watcher/Types.cc
bump version to 12.0.3-pve3
[ceph.git] / ceph / src / librbd / watcher / Types.cc
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#include "librbd/watcher/Types.h"
5#include "common/Formatter.h"
6
7namespace librbd {
8namespace watcher {
9
10void ClientId::encode(bufferlist &bl) const {
11 ::encode(gid, bl);
12 ::encode(handle, bl);
13}
14
15void ClientId::decode(bufferlist::iterator &iter) {
16 ::decode(gid, iter);
17 ::decode(handle, iter);
18}
19
20void ClientId::dump(Formatter *f) const {
21 f->dump_unsigned("gid", gid);
22 f->dump_unsigned("handle", handle);
23}
24
25WRITE_CLASS_ENCODER(ClientId);
26
27void NotifyResponse::encode(bufferlist& bl) const {
28 ::encode(acks, bl);
29 ::encode(timeouts, bl);
30}
31
32void NotifyResponse::decode(bufferlist::iterator& iter) {
33 ::decode(acks, iter);
34 ::decode(timeouts, iter);
35}
36
37} // namespace watcher
38} // namespace librbd
39
40std::ostream &operator<<(std::ostream &out,
41 const librbd::watcher::ClientId &client_id) {
42 out << "[" << client_id.gid << "," << client_id.handle << "]";
43 return out;
44}