From 0a033b0f875d46bc526ddd8ecfcdd751616abc31 Mon Sep 17 00:00:00 2001
From: Michael Friedrich <michael.friedrich@netways.de>
Date: Thu, 11 Jul 2013 11:10:56 +0200
Subject: [PATCH] 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 088f92633..f820de286 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 8d7ea1863..2e63c7860 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 880798de9..0911341bc 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 2e08bdca9..3dd5bc218 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);