2012-07-09 20:32:02 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* Icinga 2 *
|
|
|
|
* Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/) *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License *
|
|
|
|
* as published by the Free Software Foundation; either version 2 *
|
|
|
|
* of the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the Free Software Foundation *
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
|
|
******************************************************************************/
|
|
|
|
|
2012-04-30 15:30:45 +02:00
|
|
|
#include "i2-discovery.h"
|
|
|
|
|
|
|
|
using namespace icinga;
|
2012-07-03 10:39:17 +02:00
|
|
|
|
|
|
|
DiscoveryMessage::DiscoveryMessage(void)
|
|
|
|
: MessagePart()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
DiscoveryMessage::DiscoveryMessage(const MessagePart& message)
|
|
|
|
: MessagePart(message)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
bool DiscoveryMessage::GetIdentity(string *value) const
|
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
return Get("identity", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void DiscoveryMessage::SetIdentity(const string& value)
|
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
Set("identity", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool DiscoveryMessage::GetNode(string *value) const
|
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
return Get("node", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void DiscoveryMessage::SetNode(const string& value)
|
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
Set("node", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool DiscoveryMessage::GetService(string *value) const
|
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
return Get("service", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void DiscoveryMessage::SetService(const string& value)
|
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
Set("service", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
2012-07-16 22:00:50 +02:00
|
|
|
bool DiscoveryMessage::GetSubscriptions(Dictionary::Ptr *value) const
|
2012-07-03 10:39:17 +02:00
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
return Get("subscriptions", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
2012-07-16 22:00:50 +02:00
|
|
|
void DiscoveryMessage::SetSubscriptions(const Dictionary::Ptr& value)
|
2012-07-03 10:39:17 +02:00
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
Set("subscriptions", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
2012-07-16 22:00:50 +02:00
|
|
|
bool DiscoveryMessage::GetPublications(Dictionary::Ptr *value) const
|
2012-07-03 10:39:17 +02:00
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
return Get("publications", value);
|
2012-07-03 10:39:17 +02:00
|
|
|
}
|
|
|
|
|
2012-07-16 22:00:50 +02:00
|
|
|
void DiscoveryMessage::SetPublications(const Dictionary::Ptr& value)
|
2012-07-03 10:39:17 +02:00
|
|
|
{
|
2012-07-09 16:19:56 +02:00
|
|
|
Set("publications", value);
|
|
|
|
}
|