1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
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.
15 #ifndef CEPH_MMONSUBSCRIBEACK_H
16 #define CEPH_MMONSUBSCRIBEACK_H
18 #include "msg/Message.h"
20 class MMonSubscribeAck final
: public Message
{
25 MMonSubscribeAck() : Message
{CEPH_MSG_MON_SUBSCRIBE_ACK
},
28 MMonSubscribeAck(uuid_d
& f
, int i
) : Message
{CEPH_MSG_MON_SUBSCRIBE_ACK
},
29 interval(i
), fsid(f
) { }
31 ~MMonSubscribeAck() final
{}
34 std::string_view
get_type_name() const override
{ return "mon_subscribe_ack"; }
35 void print(std::ostream
& o
) const override
{
36 o
<< "mon_subscribe_ack(" << interval
<< "s)";
39 void decode_payload() override
{
41 auto p
= payload
.cbegin();
45 void encode_payload(uint64_t features
) override
{
47 encode(interval
, payload
);
48 encode(fsid
, payload
);
51 template<class T
, typename
... Args
>
52 friend boost::intrusive_ptr
<T
> ceph::make_message(Args
&&... args
);