[icinga-checkins] icinga.org: icinga2/master: livestatus: add parentObjectAccessor to function prototypes

git at icinga.org git at icinga.org
Thu Jul 11 11:51:21 CEST 2013


Module: icinga2
Branch: master
Commit: 0a033b0f875d46bc526ddd8ecfcdd751616abc31
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=0a033b0f875d46bc526ddd8ecfcdd751616abc31

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Jul 11 11:10:56 2013 +0200

livestatus: add parentObjectAccessor to function prototypes

comments and downtimes where missing, even if unused.

---

 components/livestatus/commentstable.cpp  |    4 ++--
 components/livestatus/commentstable.h    |    2 +-
 components/livestatus/downtimestable.cpp |    4 ++--
 components/livestatus/downtimestable.h   |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/components/livestatus/commentstable.cpp b/components/livestatus/commentstable.cpp
index 088f926..f820de2 100644
--- a/components/livestatus/commentstable.cpp
+++ b/components/livestatus/commentstable.cpp
@@ -48,7 +48,7 @@ void CommentsTable::AddColumns(Table *table, const String& prefix,
 	table->AddColumn(prefix + "expires", Column(&CommentsTable::ExpiresAccessor, objectAccessor));
 	table->AddColumn(prefix + "expire_time", Column(&CommentsTable::ExpireTimeAccessor, objectAccessor));
 
-	ServicesTable::AddColumns(table, "service_", &CommentsTable::ServiceAccessor);
+	ServicesTable::AddColumns(table, "service_", boost::bind(&CommentsTable::ServiceAccessor, _1, objectAccessor));
 }
 
 String CommentsTable::GetName(void) const
@@ -75,7 +75,7 @@ void CommentsTable::FetchRows(const AddRowFunction& addRowFn)
 	}
 }
 
-Object::Ptr CommentsTable::ServiceAccessor(const Value& row)
+Object::Ptr CommentsTable::ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor)
 {
 	return Service::GetOwnerByCommentID(row);
 }
diff --git a/components/livestatus/commentstable.h b/components/livestatus/commentstable.h
index 8d7ea18..2e63c78 100644
--- a/components/livestatus/commentstable.h
+++ b/components/livestatus/commentstable.h
@@ -46,7 +46,7 @@ protected:
 	virtual void FetchRows(const AddRowFunction& addRowFn);
 
 private:
-	static Object::Ptr ServiceAccessor(const Value& row);
+	static Object::Ptr ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor);
 
 	static Value AuthorAccessor(const Value& row);
 	static Value CommentAccessor(const Value& row);
diff --git a/components/livestatus/downtimestable.cpp b/components/livestatus/downtimestable.cpp
index 880798d..0911341 100644
--- a/components/livestatus/downtimestable.cpp
+++ b/components/livestatus/downtimestable.cpp
@@ -48,7 +48,7 @@ void DowntimesTable::AddColumns(Table *table, const String& prefix,
 	table->AddColumn(prefix + "duration", Column(&DowntimesTable::DurationAccessor, objectAccessor));
 	table->AddColumn(prefix + "triggered_by", Column(&DowntimesTable::TriggeredByAccessor, objectAccessor));
 
-	ServicesTable::AddColumns(table, "service_", &DowntimesTable::ServiceAccessor);
+	ServicesTable::AddColumns(table, "service_", boost::bind(&DowntimesTable::ServiceAccessor, _1, objectAccessor));
 }
 
 String DowntimesTable::GetName(void) const
@@ -75,7 +75,7 @@ void DowntimesTable::FetchRows(const AddRowFunction& addRowFn)
 	}
 }
 
-Object::Ptr DowntimesTable::ServiceAccessor(const Value& row)
+Object::Ptr DowntimesTable::ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor)
 {
 	return Service::GetOwnerByDowntimeID(row);
 }
diff --git a/components/livestatus/downtimestable.h b/components/livestatus/downtimestable.h
index 2e08bdc..3dd5bc2 100644
--- a/components/livestatus/downtimestable.h
+++ b/components/livestatus/downtimestable.h
@@ -46,7 +46,7 @@ protected:
 	virtual void FetchRows(const AddRowFunction& addRowFn);
 
 private:
-	static Object::Ptr ServiceAccessor(const Value& row);
+	static Object::Ptr ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor);
 
 	static Value AuthorAccessor(const Value& row);
 	static Value CommentAccessor(const Value& row);





More information about the icinga-checkins mailing list