123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- #region --------------- Copyright Dresser Wayne Pignone -------------
- /*
- * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/Com/IPumpEvents.cs $
- *
- * 9 07-02-27 12:35 roger.månsson
- * Set decimal MarshalAs Currency to be better compliant with COM.
- *
- * 8 07-02-26 14:06 roger.månsson
- * Added marshalAs Currency on decimal parameters.
- *
- * 7 07-02-16 9:59 roger.månsson
- * FxCop changes
- *
- * 6 07-02-02 17:17 roger.månsson
- * Renamed OnReadPumpAccumulatorsCompleted->OnReadPumpAccumulatorCompleted
- *
- * 5 07-01-09 9:28 roger.månsson
- * Documentation fixes
- *
- * 4 07-01-08 16:11 roger.månsson
- * Added support for the SignalEvent/OnEventOccured on the pump
- * interfaces.
- *
- * 3 07-01-05 15:15 roger.månsson
- * Changed sender type to IPump
- *
- * 2 07-01-05 9:01 roger.månsson
- * Documentation changes
- */
- #endregion
- using System.Runtime.InteropServices;
- using System.Diagnostics.CodeAnalysis;
- namespace Wayne.ForecourtControl.Com
- {
- /// <summary>
- /// Event interface for an IPump object. Contains the events that can be fired from a pump object.
- /// </summary>
- [ComVisible(true)]
- [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
- public interface IPumpEvents
- {
- #region Response events
- /// <summary>
- /// Event invoked when a Reserve request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnReserveCompleted(IPump sender, bool success, object userToken);
- /// <summary>
- /// Event invoked when a Suspend request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnSuspendCompleted(IPump sender, bool success, object userToken);
-
- /// <summary>
- /// Event invoked when a Resume request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnResumeCompleted(IPump sender, bool success, object userToken);
- /// <summary>
- /// Event invoked when a Stop request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnStopCompleted(IPump sender, bool success, object userToken);
- /// <summary>
- /// Event invoked when a SetBlocked request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnSetBlockedCompleted(IPump sender, bool success, object userToken);
- /// <summary>
- /// Event invoked when a SetPriceGroup request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnSetPriceGroupCompleted(IPump sender, bool success, object userToken);
- /// <summary>
- /// Event invoked when an Unreserve request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnUnreserveCompleted(IPump sender, bool success, object userToken);
- /// <summary>
- /// Event invoked when an Authorize request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="authorizationId">Unique Id that identifies the authorization. Used to match an authorization to its fuelling later.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Interoperability", "CA1406:AvoidInt64ArgumentsForVB6Clients")]
- void OnAuthorizeCompleted(IPump sender, bool success, int authorizationId, object userToken);
- /// <summary>
- /// Event invoked when an AuthorizeUpdate request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnAuthorizeUpdateCompleted(IPump sender, bool success, object userToken);
- /// <summary>
- /// Event invoked when an Unauthorize request has completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnUnauthorizeCompleted(IPump sender, bool success, object userToken);
- /// <summary>
- /// Event invoked when an SignalEvent request completed.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="success">True if the request succeeded.</param>
- /// <param name="userToken">Token object that was supplied in the asynchronous request.</param>
- void OnSignalEventCompleted(IPump sender, bool success, object userToken);
- #endregion
- #region Unsolicited events
- /// <summary>
- /// Event fired when the pump state has changed.
- /// </summary>
- /// <param name="sender">The object that fired the event.</param>
- /// <param name="newPumpState">The new pump state.</param>
- void OnStateChange(IPump sender, PumpState newPumpState);
- /// <summary>
- /// Event fired when a nozzle state changes.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="nozzle"></param>
- /// <param name="newNozzleState"></param>
- void OnNozzleStateChanged(IPump sender, INozzle nozzle, NozzleState newNozzleState);
- /// <summary>
- /// Event fired when the fuelling data for a fuelling ( current fuelling ) changes.
- /// </summary>
- /// <param name="sender">Pump object that fired the event.</param>
- /// <param name="fuelling">The fuelling which data changed.</param>
- /// <param name="amount">The new amount.</param>
- /// <param name="quantity">The new quantity.</param>
- void OnFuellingDataChanged(IPump sender, IFuelling fuelling, [param: MarshalAs(UnmanagedType.Currency)] decimal amount, [param: MarshalAs(UnmanagedType.Currency)] decimal quantity);
- /// <summary>
- /// Event fired when a fuelling's state has changed.
- /// </summary>
- /// <param name="sender">Pump object that fired the event.</param>
- /// <param name="fuelling">The fuelling which state changed.</param>
- /// <param name="newState">New state of the fuelling.</param>
- void OnFuellingStateChanged(IPump sender, IFuelling fuelling, FuellingState newState);
- /// <summary>
- /// Event that is fired when a client has signalled an event using the SignalEventAsync method or from inside the forecourt
- /// controller.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="eventType">Type of the event that occured.</param>
- [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Occured")]
- void OnEventOccured(IPump sender, PumpEventType eventType);
- #endregion
- }
- }
|