]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: missing files
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 9 Dec 2008 22:20:44 +0000 (14:20 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 9 Dec 2008 22:20:44 +0000 (14:20 -0800)
src/messages/MMonObserve.h [new file with mode: 0644]
src/messages/MMonObserveNotify.h [new file with mode: 0644]

diff --git a/src/messages/MMonObserve.h b/src/messages/MMonObserve.h
new file mode 100644 (file)
index 0000000..d3a4e68
--- /dev/null
@@ -0,0 +1,58 @@
+// -*- 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 __MMONOBSERVE_H
+#define __MMONOBSERVE_H
+
+#include "msg/Message.h"
+
+#include <vector>
+using std::vector;
+
+class MMonObserve : public Message {
+ public:
+  ceph_fsid fsid;
+  vector<string> cmd;
+  uint32_t monitor_id;
+  version_t ver;
+
+  MMonObserve() : Message(MSG_MON_OBSERVE) {}
+  MMonObserve(ceph_fsid &f, int mon_id, version_t v) : 
+    Message(MSG_MON_OBSERVE),
+    fsid(f), monitor_id(mon_id), ver(v) { }
+  
+  const char *get_type_name() { return "mon_observe"; }
+  void print(ostream& o) {
+    o << "observe(";
+    for (unsigned i=0; i<cmd.size(); i++) {
+      if (i) o << ' ';
+      o << cmd[i];
+    }
+    o << ")";
+  }
+  
+  void encode_payload() {
+    ::encode(fsid, payload);
+    ::encode(monitor_id, payload);
+    ::encode(ver, payload);
+  }
+  void decode_payload() {
+    bufferlist::iterator p = payload.begin();
+    ::decode(fsid, p);
+    ::decode(monitor_id, p);
+    ::decode(ver, p);
+  }
+};
+
+#endif
diff --git a/src/messages/MMonObserveNotify.h b/src/messages/MMonObserveNotify.h
new file mode 100644 (file)
index 0000000..782acf0
--- /dev/null
@@ -0,0 +1,53 @@
+// -*- 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 __MMONOBSERVENOTIFY_H
+#define __MMONOBSERVENOTIFY_H
+
+#include "msg/Message.h"
+
+class MMonObserveNotify : public Message {
+ public:
+  int32_t machine_id;
+  bufferlist bl;
+  version_t ver;
+  int8_t is_incremental;
+  
+  MMonObserveNotify() : Message(MSG_MON_OBSERVE_NOTIFY), 
+                        ver(0), is_incremental(false) {}
+  MMonObserveNotify(int id, bufferlist& b, version_t v, bool incremental) :
+    Message(MSG_MON_OBSERVE_NOTIFY), machine_id(id), bl(b), ver(v), is_incremental(incremental) {}
+    
+  
+  const char *get_type_name() { return "mon_observe_notify"; }
+  void print(ostream& o) {
+    o << "mon_observe_notify() ver=" << ver;
+  }
+  
+  void encode_payload() {
+    ::encode(machine_id, payload);
+    ::encode(bl, payload);
+    ::encode(ver, payload);
+    ::encode(is_incremental, payload);
+  }
+  void decode_payload() {
+    bufferlist::iterator p = payload.begin();
+    ::decode(machine_id, p);
+    ::decode(bl, p);
+    ::decode(ver, p);
+    ::decode(is_incremental, p);
+  }
+};
+
+#endif