summaryrefslogtreecommitdiffstats
path: root/src/messages/MMonSubscribe.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-08-29 01:48:09 +0200
committerSage Weil <sage@newdream.net>2009-08-29 01:48:09 +0200
commitafd038b431456e1571689f8ea1b31df6691be974 (patch)
tree5bb22c44aceb0db5b141e7ecd0580d6fb92c8546 /src/messages/MMonSubscribe.h
parentmsgr: oops (diff)
downloadceph-afd038b431456e1571689f8ea1b31df6691be974.tar.xz
ceph-afd038b431456e1571689f8ea1b31df6691be974.zip
mon: add subscribe function
Diffstat (limited to 'src/messages/MMonSubscribe.h')
-rw-r--r--src/messages/MMonSubscribe.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/messages/MMonSubscribe.h b/src/messages/MMonSubscribe.h
new file mode 100644
index 00000000000..be9426b7251
--- /dev/null
+++ b/src/messages/MMonSubscribe.h
@@ -0,0 +1,39 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation. See file COPYING.
+ *
+ */
+
+#ifndef __MMONSUBSCRIBE_H
+#define __MMONSUBSCRIBE_H
+
+#include "msg/Message.h"
+
+struct MMonSubscribe : public Message {
+ map<nstring, version_t> what;
+
+ MMonSubscribe() : Message(CEPH_MSG_MON_SUBSCRIBE) {}
+
+ const char *get_type_name() { return "mon_subscribe"; }
+ void print(ostream& o) {
+ o << "mon_subscribe(" << what << ")";
+ }
+
+ void decode_payload() {
+ bufferlist::iterator p = payload.begin();
+ ::decode(what, p);
+ }
+ void encode_payload() {
+ ::encode(what, payload);
+ }
+};
+
+#endif