From 6a314cf420722e3701c1d8e6e1da29e496aaab57 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 14 Mar 2017 09:26:51 -0400 Subject: [PATCH] mgr: move MgrSession to its own header Signed-off-by: Sage Weil --- src/mgr/DaemonServer.h | 19 +------------------ src/mgr/MgrSession.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 src/mgr/MgrSession.h diff --git a/src/mgr/DaemonServer.h b/src/mgr/DaemonServer.h index 5f020ea7a5143..160bd5939a83b 100644 --- a/src/mgr/DaemonServer.h +++ b/src/mgr/DaemonServer.h @@ -24,10 +24,9 @@ #include #include -#include - #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 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 index 0000000000000..39b3dff7023c8 --- /dev/null +++ b/src/mgr/MgrSession.h @@ -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 MgrSessionRef; + + +#endif -- 2.39.5