%attribute number "check_interval",
%attribute number "retry_interval",
+ %attribute number "enable_notifications",
%attribute number "notification_interval",
%attribute name(TimePeriod) "notification_period",
%attribute number "check_interval",
%attribute number "retry_interval",
+ %attribute number "enable_notifications",
%attribute number "notification_interval",
%attribute name(TimePeriod) "notification_period",
%attribute number "end",
},
+ %attribute number "enable_notifications",
+
%attribute name(NotificationCommand) "notification_command",
%attribute number "notification_interval",
%attribute name(UserGroup) "*"
},
+ %attribute number "enable_notifications",
%attribute number "notification_type_filter",
%attribute number "notification_state_filter"
RegisterAttribute("display_name", Attribute_Config, &m_DisplayName);
RegisterAttribute("macros", Attribute_Config, &m_Macros);
RegisterAttribute("groups", Attribute_Config, &m_Groups);
+ RegisterAttribute("enable_notifications", Attribute_Config, &m_EnableNotifications);
RegisterAttribute("notification_period", Attribute_Config, &m_NotificationPeriod);
RegisterAttribute("notification_type_filter", Attribute_Config, &m_NotificationTypeFilter);
RegisterAttribute("notification_state_filter", Attribute_Config, &m_NotificationStateFilter);
return m_Macros;
}
+bool User::GetEnableNotifications(void) const
+{
+ if (m_EnableNotifications.IsEmpty())
+ return true;
+ else
+ return m_EnableNotifications;
+}
+
+void User::SetEnableNotifications(bool enabled)
+{
+ m_EnableNotifications = enabled;
+ Touch("enable_notifications");
+}
+
TimePeriod::Ptr User::GetNotificationPeriod(void) const
{
return TimePeriod::GetByName(m_NotificationPeriod);
String GetDisplayName(void) const;
Array::Ptr GetGroups(void) const;
+
+ /* Notifications */
+ bool GetEnableNotifications(void) const;
+ void SetEnableNotifications(bool enabled);
TimePeriod::Ptr GetNotificationPeriod(void) const;
unsigned long GetNotificationTypeFilter(void) const;
unsigned long GetNotificationStateFilter(void) const;
private:
Attribute<String> m_DisplayName;
Attribute<Dictionary::Ptr> m_Macros;
- Attribute<String> m_NotificationPeriod;
Attribute<Array::Ptr> m_Groups;
+ Attribute<bool> m_EnableNotifications;
+ Attribute<String> m_NotificationPeriod;
Attribute<long> m_NotificationTypeFilter;
Attribute<long> m_NotificationStateFilter;
};