#region Copyright (c) 2011-2023 Technosoftware GmbH. All rights reserved //----------------------------------------------------------------------------- // Copyright (c) 2011-2023 Technosoftware GmbH. All rights reserved // Web: https://www.technosoftware.com // // The source code in this file is covered under a dual-license scenario: // - Owner of a purchased license: SCLA 1.0 // - GPL V3: everybody else // // SCLA license terms accompanied with this source code. // See SCLA 1.0: https://technosoftware.com/license/Source_Code_License_Agreement.pdf // // GNU General Public License as published by the Free Software Foundation; // version 3 of the License are accompanied with this source code. // See https://technosoftware.com/license/GPLv3License.txt // // This source code 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. //----------------------------------------------------------------------------- #endregion Copyright (c) 2011-2023 Technosoftware GmbH. All rights reserved #region Using Directives using System; #endregion namespace Technosoftware.DaAeHdaClient.Ae { /// /// An interface to an object which implements a AE event subscription. /// public interface ITsCAeSubscription : IDisposable { #region Events /// /// An event to receive event change updates. /// event TsCAeDataChangedEventHandler DataChangedEvent; #endregion #region State Management /// /// Returns the current state of the subscription. /// /// The current state of the subscription. TsCAeSubscriptionState GetState(); /// /// Changes the state of a subscription. /// /// A bit mask that indicates which elements of the subscription state are changing. /// The new subscription state. /// The actual subscription state after applying the changes. TsCAeSubscriptionState ModifyState(int masks, TsCAeSubscriptionState state); #endregion #region Filter Management /// /// Returns the current filters for the subscription. /// /// The current filters for the subscription. TsCAeSubscriptionFilters GetFilters(); /// /// Sets the current filters for the subscription. /// /// The new filters to use for the subscription. void SetFilters(TsCAeSubscriptionFilters filters); #endregion #region Attribute Management /// /// Returns the set of attributes to return with event notifications. /// /// The specific event category for which the attributes apply. /// The set of attribute ids which returned with event notifications. int[] GetReturnedAttributes(int eventCategory); /// /// Selects the set of attributes to return with event notifications. /// /// The specific event category for which the attributes apply. /// The list of attribute ids to return. void SelectReturnedAttributes(int eventCategory, int[] attributeIDs); #endregion #region Refresh /// /// Force a refresh for all active conditions and inactive, unacknowledged conditions whose event notifications match the filter of the event subscription. /// void Refresh(); /// /// Cancels an outstanding refresh request. /// void CancelRefresh(); #endregion } #region Delegate Declarations /// /// A delegate to receive data change updates from the server. /// /// The notifications sent by the server when a event change occurs. /// TRUE if this is a subscription refresh /// TRUE if this is the last subscription refresh in response to a specific invocation of the Refresh method. public delegate void TsCAeDataChangedEventHandler(TsCAeEventNotification[] notifications, bool refresh, bool lastRefresh); #endregion }