]> git.proxmox.com Git - ceph.git/blame - ceph/src/messages/MMonSubscribeAck.h
update sources to 12.2.8
[ceph.git] / ceph / src / messages / MMonSubscribeAck.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 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14
15#ifndef CEPH_MMONSUBSCRIBEACK_H
16#define CEPH_MMONSUBSCRIBEACK_H
17
18#include "msg/Message.h"
19
20struct MMonSubscribeAck : public Message {
21 __u32 interval;
22 uuid_d fsid;
23
24 MMonSubscribeAck() : Message(CEPH_MSG_MON_SUBSCRIBE_ACK),
25 interval(0) {
7c673cae
FG
26 }
27 MMonSubscribeAck(uuid_d& f, int i) : Message(CEPH_MSG_MON_SUBSCRIBE_ACK),
28 interval(i), fsid(f) { }
29private:
30 ~MMonSubscribeAck() override {}
31
32public:
33 const char *get_type_name() const override { return "mon_subscribe_ack"; }
34 void print(ostream& o) const override {
35 o << "mon_subscribe_ack(" << interval << "s)";
36 }
37
38 void decode_payload() override {
39 bufferlist::iterator p = payload.begin();
40 ::decode(interval, p);
41 ::decode(fsid, p);
42 }
43 void encode_payload(uint64_t features) override {
44 ::encode(interval, payload);
45 ::encode(fsid, payload);
46 }
47};
48
49#endif