]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: move MgrSession to its own header
authorSage Weil <sage@redhat.com>
Tue, 14 Mar 2017 13:26:51 +0000 (09:26 -0400)
committerSage Weil <sage@redhat.com>
Wed, 29 Mar 2017 15:39:26 +0000 (11:39 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/DaemonServer.h
src/mgr/MgrSession.h [new file with mode: 0644]

index 5f020ea7a51432a668a08d427962c5a566e32776..160bd5939a83b82c6a103cd73fb5c4746bb3cc16 100644 (file)
 #include <msg/Messenger.h>
 #include <mon/MonClient.h>
 
-#include <mon/MonCap.h>
-
 #include "auth/AuthAuthorizeHandler.h"
 
+#include "MgrSession.h"
 #include "DaemonState.h"
 
 class MMgrReport;
@@ -35,22 +34,6 @@ class MMgrOpen;
 class MCommand;
 struct MgrCommand;
 
-/**
- * Session state associated with the Connection.
- */
-struct MgrSession : public RefCountedObject {
-  uint64_t global_id = 0;
-  EntityName entity_name;
-  entity_addr_t addr;
-
-  // mon caps are suitably generic for mgr
-  MonCap caps;
-
-  MgrSession() : RefCountedObject(0) {}
-  ~MgrSession() override {}
-};
-
-typedef boost::intrusive_ptr<MgrSession> MgrSessionRef;
 
 /**
  * Server used in ceph-mgr to communicate with Ceph daemons like
diff --git a/src/mgr/MgrSession.h b/src/mgr/MgrSession.h
new file mode 100644 (file)
index 0000000..39b3dff
--- /dev/null
@@ -0,0 +1,31 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#ifndef CEPH_MGR_MGRSESSION_H
+#define CEPH_MGR_MGRSESSION_H
+
+#include "common/RefCountedObj.h"
+#include "common/entity_name.h"
+#include "msg/msg_types.h"
+#include "mon/MonCap.h"
+
+
+/**
+ * Session state associated with the Connection.
+ */
+struct MgrSession : public RefCountedObject {
+  uint64_t global_id = 0;
+  EntityName entity_name;
+  entity_addr_t addr;
+
+  // mon caps are suitably generic for mgr
+  MonCap caps;
+
+  MgrSession() : RefCountedObject(0) {}
+  ~MgrSession() override {}
+};
+
+typedef boost::intrusive_ptr<MgrSession> MgrSessionRef;
+
+
+#endif