summaryrefslogtreecommitdiffstats
path: root/src/mgr
diff options
context:
space:
mode:
authorAdam C. Emerson <aemerson@redhat.com>2020-03-07 10:33:10 +0100
committerAdam C. Emerson <aemerson@redhat.com>2020-03-07 10:33:10 +0100
commit4ccebbfa2f27d08fbdf55c1017ef70cb42a0e2f9 (patch)
tree965062975740662a6b39724d7856192561f33e90 /src/mgr
parentauth: Build target 'common' without using namespace in headers (diff)
downloadceph-4ccebbfa2f27d08fbdf55c1017ef70cb42a0e2f9.tar.xz
ceph-4ccebbfa2f27d08fbdf55c1017ef70cb42a0e2f9.zip
mgr: Build target 'common' without using namespace in headers
Part of a changeset to allow building all of 'common' without relying on 'using namespace std' or 'using namespace ceph' at toplevel in headers. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Diffstat (limited to 'src/mgr')
-rw-r--r--src/mgr/MetricTypes.h24
-rw-r--r--src/mgr/MgrClient.cc3
-rw-r--r--src/mgr/MgrClient.h4
3 files changed, 17 insertions, 14 deletions
diff --git a/src/mgr/MetricTypes.h b/src/mgr/MetricTypes.h
index 3d4d4a68ee6..1bcc0170659 100644
--- a/src/mgr/MetricTypes.h
+++ b/src/mgr/MetricTypes.h
@@ -47,7 +47,7 @@ typedef boost::variant<OSDMetricPayload,
class EncodeMetricPayloadVisitor : public boost::static_visitor<void> {
public:
- explicit EncodeMetricPayloadVisitor(bufferlist &bl) : m_bl(bl) {
+ explicit EncodeMetricPayloadVisitor(ceph::buffer::list &bl) : m_bl(bl) {
}
template <typename MetricPayload>
@@ -58,12 +58,12 @@ public:
}
private:
- bufferlist &m_bl;
+ ceph::buffer::list &m_bl;
};
class DecodeMetricPayloadVisitor : public boost::static_visitor<void> {
public:
- DecodeMetricPayloadVisitor(bufferlist::const_iterator &iter) : m_iter(iter) {
+ DecodeMetricPayloadVisitor(ceph::buffer::list::const_iterator &iter) : m_iter(iter) {
}
template <typename MetricPayload>
@@ -73,7 +73,7 @@ public:
}
private:
- bufferlist::const_iterator &m_iter;
+ ceph::buffer::list::const_iterator &m_iter;
};
struct MetricReportMessage {
@@ -83,11 +83,11 @@ struct MetricReportMessage {
: payload(payload) {
}
- void encode(bufferlist &bl) const {
+ void encode(ceph::buffer::list &bl) const {
boost::apply_visitor(EncodeMetricPayloadVisitor(bl), payload);
}
- void decode(bufferlist::const_iterator &iter) {
+ void decode(ceph::buffer::list::const_iterator &iter) {
using ceph::decode;
uint32_t metric_report_type;
@@ -149,7 +149,7 @@ typedef boost::variant<OSDConfigPayload,
class EncodeConfigPayloadVisitor : public boost::static_visitor<void> {
public:
- explicit EncodeConfigPayloadVisitor(bufferlist &bl) : m_bl(bl) {
+ explicit EncodeConfigPayloadVisitor(ceph::buffer::list &bl) : m_bl(bl) {
}
template <typename ConfigPayload>
@@ -160,12 +160,12 @@ public:
}
private:
- bufferlist &m_bl;
+ ceph::buffer::list &m_bl;
};
class DecodeConfigPayloadVisitor : public boost::static_visitor<void> {
public:
- DecodeConfigPayloadVisitor(bufferlist::const_iterator &iter) : m_iter(iter) {
+ DecodeConfigPayloadVisitor(ceph::buffer::list::const_iterator &iter) : m_iter(iter) {
}
template <typename ConfigPayload>
@@ -175,7 +175,7 @@ public:
}
private:
- bufferlist::const_iterator &m_iter;
+ ceph::buffer::list::const_iterator &m_iter;
};
struct MetricConfigMessage {
@@ -185,11 +185,11 @@ struct MetricConfigMessage {
: payload(payload) {
}
- void encode(bufferlist &bl) const {
+ void encode(ceph::buffer::list &bl) const {
boost::apply_visitor(EncodeConfigPayloadVisitor(bl), payload);
}
- void decode(bufferlist::const_iterator &iter) {
+ void decode(ceph::buffer::list::const_iterator &iter) {
using ceph::decode;
uint32_t metric_config_type;
diff --git a/src/mgr/MgrClient.cc b/src/mgr/MgrClient.cc
index 4903fa3a083..2f998635c3f 100644
--- a/src/mgr/MgrClient.cc
+++ b/src/mgr/MgrClient.cc
@@ -33,6 +33,9 @@ using std::string;
using std::vector;
using ceph::bufferlist;
+using ceph::make_message;
+using ceph::ref_cast;
+using ceph::ref_t;
#define dout_subsys ceph_subsys_mgrc
#undef dout_prefix
diff --git a/src/mgr/MgrClient.h b/src/mgr/MgrClient.h
index 6ac56fec970..aed1072c674 100644
--- a/src/mgr/MgrClient.h
+++ b/src/mgr/MgrClient.h
@@ -126,7 +126,7 @@ public:
bool handle_mgr_close(ceph::ref_t<MMgrClose> m);
bool handle_command_reply(
uint64_t tid,
- bufferlist& data,
+ ceph::buffer::list& data,
const std::string& rs,
int r);
@@ -151,7 +151,7 @@ public:
ceph::buffer::list *outbl, std::string *outs,
Context *onfinish);
int start_tell_command(
- const string& name,
+ const std::string& name,
const std::vector<std::string>& cmd, const ceph::buffer::list& inbl,
ceph::buffer::list *outbl, std::string *outs,
Context *onfinish);