2014-10-17 13:44:31 -04:00
|
|
|
/******************************************************************************
|
|
|
|
|
* Icinga 2 *
|
2015-01-22 06:00:23 -05:00
|
|
|
* Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) *
|
2014-10-17 13:44:31 -04:00
|
|
|
* *
|
|
|
|
|
* 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. *
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
2013-10-26 03:41:45 -04:00
|
|
|
namespace icinga
|
|
|
|
|
{
|
|
|
|
|
|
2014-04-05 16:17:20 -04:00
|
|
|
code {{{
|
2014-08-13 14:30:28 -04:00
|
|
|
enum HAMode
|
|
|
|
|
{
|
|
|
|
|
HARunOnce,
|
|
|
|
|
HARunEverywhere
|
|
|
|
|
};
|
|
|
|
|
|
2014-04-06 02:09:49 -04:00
|
|
|
class NameComposer {
|
2014-04-05 16:17:20 -04:00
|
|
|
public:
|
2014-11-06 13:35:47 -05:00
|
|
|
virtual String MakeName(const String& shortName, const Object::Ptr& context) const = 0;
|
2014-04-05 16:17:20 -04:00
|
|
|
};
|
|
|
|
|
}}}
|
|
|
|
|
|
2013-11-08 05:17:46 -05:00
|
|
|
abstract class DynamicObject
|
2013-10-26 03:41:45 -04:00
|
|
|
{
|
2014-10-31 03:53:25 -04:00
|
|
|
[config, internal] String __name (Name);
|
2014-04-05 03:15:40 -04:00
|
|
|
[config] String name (ShortName) {
|
|
|
|
|
get {{{
|
|
|
|
|
if (m_ShortName.IsEmpty())
|
|
|
|
|
return GetName();
|
|
|
|
|
else
|
|
|
|
|
return m_ShortName;
|
|
|
|
|
}}}
|
|
|
|
|
};
|
2015-02-09 02:50:17 -05:00
|
|
|
[config, internal, get_protected] String type (TypeNameV);
|
|
|
|
|
[config] String zone (ZoneName);
|
2014-10-31 03:53:25 -04:00
|
|
|
[config, internal, get_protected] Array::Ptr templates;
|
2013-10-26 03:41:45 -04:00
|
|
|
[get_protected] bool active;
|
2014-05-09 07:02:30 -04:00
|
|
|
[get_protected] bool paused {
|
|
|
|
|
default {{{ return true; }}}
|
|
|
|
|
};
|
2013-12-14 01:36:49 -05:00
|
|
|
[get_protected] bool start_called;
|
|
|
|
|
[get_protected] bool stop_called;
|
2014-05-09 05:32:24 -04:00
|
|
|
[get_protected] bool pause_called;
|
|
|
|
|
[get_protected] bool resume_called;
|
2014-08-13 14:30:28 -04:00
|
|
|
[enum] HAMode ha_mode (HAMode);
|
2013-10-26 03:41:45 -04:00
|
|
|
[protected] Dictionary::Ptr extensions;
|
2014-04-15 11:33:56 -04:00
|
|
|
|
2014-10-29 06:14:04 -04:00
|
|
|
[protected] bool state_loaded;
|
2013-10-26 03:41:45 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|