]>
git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/watcher/Types.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #include "librbd/watcher/Types.h"
5 #include "common/Formatter.h"
10 void ClientId::encode(bufferlist
&bl
) const {
15 void ClientId::decode(bufferlist::iterator
&iter
) {
17 ::decode(handle
, iter
);
20 void ClientId::dump(Formatter
*f
) const {
21 f
->dump_unsigned("gid", gid
);
22 f
->dump_unsigned("handle", handle
);
25 WRITE_CLASS_ENCODER(ClientId
);
27 void NotifyResponse::encode(bufferlist
& bl
) const {
29 ::encode(timeouts
, bl
);
32 void NotifyResponse::decode(bufferlist::iterator
& iter
) {
34 ::decode(timeouts
, iter
);
37 } // namespace watcher
40 std::ostream
&operator<<(std::ostream
&out
,
41 const librbd::watcher::ClientId
&client_id
) {
42 out
<< "[" << client_id
.gid
<< "," << client_id
.handle
<< "]";