Module: check_mk
Branch: master
Commit: 55fa603065ad2ac539ee18f031d41149b91b716d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=55fa603065ad2a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Oct 27 11:43:41 2017 +0200
Renamed BlobColumn::getBlob() to getValue() for consistency with other column types.
Change-Id: Ic2c3c75420ef2f336e5ee86ce8c55439edcb006b
---
livestatus/src/BlobColumn.cc | 2 +-
livestatus/src/BlobColumn.h | 3 ++-
livestatus/src/DynamicEventConsoleReplicationColumn.cc | 2 +-
livestatus/src/HostFileColumn.cc | 2 +-
livestatus/src/HostFileColumn.h | 2 +-
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/livestatus/src/BlobColumn.cc b/livestatus/src/BlobColumn.cc
index 00908de..001278f 100644
--- a/livestatus/src/BlobColumn.cc
+++ b/livestatus/src/BlobColumn.cc
@@ -29,7 +29,7 @@
void BlobColumn::output(Row row, RowRenderer &r,
const contact * /* auth_user */) const {
- if (std::unique_ptr<std::vector<char>> blob = getBlob(row)) {
+ if (std::unique_ptr<std::vector<char>> blob = getValue(row)) {
r.output(*blob);
} else {
r.output(Null());
diff --git a/livestatus/src/BlobColumn.h b/livestatus/src/BlobColumn.h
index 451b948..ba1d0b9 100644
--- a/livestatus/src/BlobColumn.h
+++ b/livestatus/src/BlobColumn.h
@@ -43,6 +43,7 @@ public:
int offset)
: Column(name, description, indirect_offset, extra_offset,
extra_extra_offset, offset) {}
+
ColumnType type() const override { return ColumnType::blob; }
void output(Row row, RowRenderer &r,
@@ -51,7 +52,7 @@ public:
std::unique_ptr<Filter> createFilter(
RelationalOperator relOp, const std::string &value) const override;
- virtual std::unique_ptr<std::vector<char>> getBlob(Row row) const = 0;
+ virtual std::unique_ptr<std::vector<char>> getValue(Row row) const = 0;
};
#endif // BlobColumn_h
diff --git a/livestatus/src/DynamicEventConsoleReplicationColumn.cc
b/livestatus/src/DynamicEventConsoleReplicationColumn.cc
index b5efd20..eadcde3 100644
--- a/livestatus/src/DynamicEventConsoleReplicationColumn.cc
+++ b/livestatus/src/DynamicEventConsoleReplicationColumn.cc
@@ -61,7 +61,7 @@ public:
extra_extra_offset, offset)
, _blob(std::move(blob)) {}
- std::unique_ptr<std::vector<char>> getBlob(
+ std::unique_ptr<std::vector<char>> getValue(
Row /* unused */) const override {
return std::make_unique<std::vector<char>>(_blob.begin(),
_blob.end());
};
diff --git a/livestatus/src/HostFileColumn.cc b/livestatus/src/HostFileColumn.cc
index c4ccedf..c201343 100644
--- a/livestatus/src/HostFileColumn.cc
+++ b/livestatus/src/HostFileColumn.cc
@@ -49,7 +49,7 @@ HostFileColumn::HostFileColumn(const std::string& name,
, _base_dir(std::move(base_dir))
, _suffix(std::move(suffix)) {}
-std::unique_ptr<std::vector<char>> HostFileColumn::getBlob(Row row) const {
+std::unique_ptr<std::vector<char>> HostFileColumn::getValue(Row row) const {
if (_base_dir.empty()) {
return nullptr; // Path is not configured
}
diff --git a/livestatus/src/HostFileColumn.h b/livestatus/src/HostFileColumn.h
index 27b562e..d122c98 100644
--- a/livestatus/src/HostFileColumn.h
+++ b/livestatus/src/HostFileColumn.h
@@ -39,7 +39,7 @@ public:
int extra_extra_offset, int offset, std::string base_dir,
std::string suffix);
- std::unique_ptr<std::vector<char>> getBlob(Row row) const override;
+ std::unique_ptr<std::vector<char>> getValue(Row row) const override;
private:
std::string _base_dir;